From aed8cddad7a0e707a91c3e683b9a4662c732418f Mon Sep 17 00:00:00 2001 From: sriramv Date: Tue, 17 Jan 2023 10:32:55 +0530 Subject: [PATCH] GWM --- .../Dashboard/controllers/Dashboard.php | 6 +- .../Dashboard/models/Dashboard_model.php | 18 +- .../modules/Dashboard/views/dashboard.php | 433 +++--------------- application/modules/User/controllers/User.php | 2 +- 4 files changed, 80 insertions(+), 379 deletions(-) diff --git a/application/modules/Dashboard/controllers/Dashboard.php b/application/modules/Dashboard/controllers/Dashboard.php index 038b342..8c25e66 100644 --- a/application/modules/Dashboard/controllers/Dashboard.php +++ b/application/modules/Dashboard/controllers/Dashboard.php @@ -61,11 +61,11 @@ public function index() $amc = $this->Dashboard_model->get_amc(user()->business_id); - // print_r(json_encode($amc));die(); + //print_r(json_encode($amc)); $this->layout->set('amc', $amc); - +//echo "


"; $insurence = $this->Dashboard_model->get_insurence(user()->business_id); - // print_r(json_encode($insurence));die(); + //print_r(json_encode($insurence));die(); $this->layout->set('insurence', $insurence); } $this->layout->buffer('main_content', 'dashboard/dashboard'); diff --git a/application/modules/Dashboard/models/Dashboard_model.php b/application/modules/Dashboard/models/Dashboard_model.php index 2e987dd..3b2c47e 100644 --- a/application/modules/Dashboard/models/Dashboard_model.php +++ b/application/modules/Dashboard/models/Dashboard_model.php @@ -35,7 +35,7 @@ public function get_amc_count($business_id) $this->db->where('valid_to <=', date('Y-m-d', strtotime('+30 day', strtotime(date("Y-m-d"))))); $this->db->group_by('asset_id'); $this->db->order_by('id','DESC'); - $this->db->limit(1); + //$this->db->limit(1); $query = $this->db->get(); $query = $query->num_rows(); return $query; @@ -52,7 +52,7 @@ public function get_expired_amc_count($business_id) $this->db->where('valid_to <', date("Y-m-d")); $this->db->group_by('asset_id'); $this->db->order_by('id','DESC'); - $this->db->limit(1); + //$this->db->limit(1); $query = $this->db->get(); $query = $query->num_rows(); return $query; @@ -69,7 +69,7 @@ public function get_insurance_count($business_id) $this->db->where('valid_to <=', date('Y-m-d', strtotime('+30 day', strtotime(date("Y-m-d"))))); $this->db->group_by('asset_id'); $this->db->order_by('id','DESC'); - $this->db->limit(1); + //$this->db->limit(1); $query = $this->db->get(); $query = $query->num_rows(); return $query; @@ -86,7 +86,7 @@ public function get_expired_insurance_count($business_id) $this->db->where('valid_to <', date("Y-m-d")); $this->db->group_by('asset_id'); $this->db->order_by('id','DESC'); - $this->db->limit(1); + //$this->db->limit(1); $query = $this->db->get(); $query = $query->num_rows(); return $query; @@ -105,7 +105,10 @@ public function get_amc($business_id) $this->db->where('a.business_id', $business_id); $this->db->where('a.is_active', 1); $this->db->where('a.type', 3); - $this->db->order_by('asset_id', "ASC"); + + $this->db->group_by('asset_id'); + $this->db->order_by('id','DESC'); + $query = $this->db->get(); $query = $query->result(); return $query; @@ -120,7 +123,10 @@ public function get_insurence($business_id) $this->db->where('a.business_id', $business_id); $this->db->where('a.is_active', 1); $this->db->where('a.type', 4); - $this->db->order_by('asset_id', "ASC"); + + $this->db->group_by('asset_id'); + $this->db->order_by('id','DESC'); + $query = $this->db->get(); $query = $query->result(); return $query; diff --git a/application/modules/Dashboard/views/dashboard.php b/application/modules/Dashboard/views/dashboard.php index 626baa7..694d253 100644 --- a/application/modules/Dashboard/views/dashboard.php +++ b/application/modules/Dashboard/views/dashboard.php @@ -15,25 +15,25 @@
- Total AMC + Total AMC
- below 30 days left + below 30 days left
-
- Total Insurance -
- below 30 days left -
- -
- Total AMC +
+ Total AMC
Date Expired
- Total Insurance + Total Insurance +
+ below 30 days left +
+ +
+ Total Insurance
Date Expired
@@ -41,76 +41,7 @@
-
-
-
- -
-
-

Network Activities Graph title sub-title

-
-
-
- - December 30, 2014 - January 28, 2015 -
-
-
- -
-
-
-
-
-

Top Campaign Performance

-
-
- -
-
-

Facebook Campaign

-
-
-
-
-
-
-
-

Twitter Campaign

-
-
-
-
-
-
-
-
-
-

Conventional Media

-
-
-
-
-
-
-
-

Bill boards

-
-
-
-
-
-
-
- -
- -
-
-
- -
-
+
@@ -136,7 +67,7 @@

Remaining Days To Expire

- +
$value) { ?> @@ -221,7 +152,7 @@

Remaining Days To Expire

- +
$value) { ?> @@ -286,116 +217,12 @@
-
-
-
-
-

Recent Activities Sessions

- -
-
-
-
- - -
-
-
-
- - -
- - - -
- -
+ +

Visitors location geo-presentation

- +
@@ -432,186 +259,54 @@
-
- -
-
- - - -
-
-
-

To Do List Sample tasks

- -
-
-
- -
-
    -
  • -

    - Schedule meeting with new client

    -
  • -
  • -

    - Create email address for new intern

    -
  • -
  • -

    - Have IT fix the network printer

    -
  • -
  • -

    - Copy backups to offsite location

    -
  • -
  • -

    - Food truck fixie locavors mcsweeney

    -
  • -
  • -

    - Food truck fixie locavors mcsweeney

    -
  • -
  • -

    - Create email address for new intern

    -
  • -
  • -

    - Have IT fix the network printer

    -
  • -
  • -

    - Copy backups to offsite location

    -
  • -
-
-
-
-
- - - -
-
-
-

Daily active users Sessions

- -
-
-
-
-
-
Monday, 07:30 AM - F - C -
-
-
-
-
-
- -
-
-
-
-

Texas
Partly Cloudy Day

-
-
-
-
-
-

23

-
-
- -
- -
-
-
-

Mon

-

25

- -
15 km/h
-
-
-
-
-

Tue

-

25

- -
12 km/h
-
-
-
-
-

Wed

-

27

- -
14 km/h
-
-
-
-
-

Thu

-

28

- -
15 km/h
-
-
-
-
-

Fri

-

28

- -
11 km/h
-
-
-
-
-

Sat

-

26

- -
10 km/h
-
-
-
-
-
-
- -
- -
+ + +
+
+
+

Visitors location geo-presentation

+ +
+
+
+
+
+

125.7k Views from 60 countries

+ + + + + + + + + + + + + + + + + + + + + + + + +
United States33%
France27%
Germany16%
Spain11%
Britain10%
+
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/application/modules/User/controllers/User.php b/application/modules/User/controllers/User.php index c2a747e..2d73d44 100644 --- a/application/modules/User/controllers/User.php +++ b/application/modules/User/controllers/User.php @@ -235,7 +235,7 @@ public function view_business_history($id) { $table = 'business'; $user_history = $this->audit_model->get_history( $id , $table , user()->business_id); - $data = array('title'=> "view" , 'user_history'=> $user_history ); + $data = array('title'=> "User History" , 'user_history'=> $user_history ); $htmlPage = $this->load->view('view_history.php',$data,true); echo json_encode($htmlPage); }