From 35ddff70db0c0518c2f7c0df13fd799b40867241 Mon Sep 17 00:00:00 2001 From: resicovenba Date: Fri, 1 Dec 2017 10:31:59 +0530 Subject: [PATCH 1/3] add student , employee count on dashboard --- .../application/models/Announcement_model.php | 2 - Apollo/assets/js/controllers/dashboardCtrl.js | 56 ++++ Apollo/assets/js/main.js | 2 +- Apollo/assets/views/dashboard.html | 248 +++++++++++------- 4 files changed, 205 insertions(+), 103 deletions(-) diff --git a/Apollo/api/application/models/Announcement_model.php b/Apollo/api/application/models/Announcement_model.php index e32c7915..3bd7d72b 100644 --- a/Apollo/api/application/models/Announcement_model.php +++ b/Apollo/api/application/models/Announcement_model.php @@ -75,8 +75,6 @@ class Announcement_model extends CI_Model { $result['message'] = "Something went wrong.please try again"; } - - return $result; } diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index c905b8a2..04eb8bda 100644 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -64,3 +64,59 @@ app.controller('dashboardCtrl', ["$scope","toaster", "$filter", "ngTableParams", }]); +app.controller('OnotherCtrl', ["$scope", function ($scope) { + + // Chart.js Data + $scope.data = [ + + { + value: 50, + color: '#46BFBD', + highlight: '#5AD3D1', + label: 'Student' + }, + { + value: 100, + color: '#FDB45C', + highlight: '#FFC870', + label: 'Staff' + } + ]; + $scope.total = 150; + // Chart.js Options + $scope.options = { + + // Sets the chart to be responsive + responsive: false, + + //Boolean - Whether we should show a stroke on each segment + segmentShowStroke: true, + + //String - The colour of each segment stroke + segmentStrokeColor: '#fff', + + //Number - The width of each segment stroke + segmentStrokeWidth: 2, + + //Number - The percentage of the chart that we cut out of the middle + percentageInnerCutout: 50, // This is 0 for Pie charts + + //Number - Amount of animation steps + animationSteps: 100, + + //String - Animation easing effect + animationEasing: 'easeOutBounce', + + //Boolean - Whether we animate the rotation of the Doughnut + animateRotate: true, + + //Boolean - Whether we animate scaling the Doughnut from the centre + animateScale: false, + + //String - A legend template + legendTemplate: '' + + }; + +}]); + diff --git a/Apollo/assets/js/main.js b/Apollo/assets/js/main.js index 57c5c298..0a1bad8f 100644 --- a/Apollo/assets/js/main.js +++ b/Apollo/assets/js/main.js @@ -29,7 +29,7 @@ function ($rootScope, $state, $stateParams) { isNavbarFixed: true, //true if you want to initialize the template with fixed header isSidebarFixed: true, // true if you want to initialize the template with fixed sidebar isSidebarClosed: true, // true if you want to initialize the template with closed sidebar - isFooterFixed: true, // true if you want to initialize the template with fixed footer + isFooterFixed: false, // true if you want to initialize the template with fixed footer theme: 'theme-5', // indicate the theme chosen for your project logo: 'assets/images/logo.png', // relative path of the project logo } diff --git a/Apollo/assets/views/dashboard.html b/Apollo/assets/views/dashboard.html index e809332f..452e58da 100644 --- a/Apollo/assets/views/dashboard.html +++ b/Apollo/assets/views/dashboard.html @@ -1,6 +1,6 @@ @@ -17,131 +17,179 @@
-
-
-
-

Today Follow Up Details

- -
-
-
-
No Followup!
+
+
+
+

Today Follow Up Details

+
-
- - - - - - - - +
+
+
+
No Followup!
+
+
+
+
Tracking IDLead NameMobile NoActivityStatus
+ + + + + + + - - - + + + - - - - - - - + + + + + + + - - + + -
Tracking IDLead NameMobile NoActivityStatus
{{today.TrackingID}}{{today.LeadName}}{{today.MobileNumber}}{{today.ListName}}
{{today.TrackingID}}{{today.LeadName}}{{today.MobileNumber}}{{today.ListName}}
+ +
-
-
-
-
-

Pending Follow Up Details

- -
-
-
-
No Pending Followup!
+
+
+
+

Pending Follow Up Details

+
-
- - - - - - - - - +
+
+
+
No Pending Followup!
+
+
+
+
Tracking IDLead NameMobile NoActivityFollowup OnStatus
+ + + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + -
Tracking IDLead NameMobile NoActivityFollowup OnStatus
{{pending.TrackingID}}{{pending.LeadName}}{{pending.MobileNumber}}{{pending.ListName}}{{pending.FollowupOn}}
{{pending.TrackingID}}{{pending.LeadName}}{{pending.MobileNumber}}{{pending.ListName}}{{pending.FollowupOn}}
+ +
-
-
-
-
-

Today Created Lead Details

- -
-
-
-
No Lead Created By Today!
+
+
+
+

Today Created Lead Details

+
-
- - - - - - - - - +
+
+
+
No Lead Created By Today!
+
+
+
+
Tracking IDLead NameMobile NoActivityFollowup OnStatus
+ + + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + + -
Tracking IDLead NameMobile NoActivityFollowup OnStatus
{{lead.TrackingID}}{{lead.LeadName}}{{lead.MobileNumber}}{{lead.ListName}}{{lead.FollowupOn}}
{{lead.TrackingID}}{{lead.LeadName}}{{lead.MobileNumber}}{{lead.ListName}}{{lead.FollowupOn}}
+ +
+
+
+
+
+
+
+

New Users

+
+
+ +
+
+ {{total}} + +
+
+
+
+
+
+
-
-
+
+
+
\ No newline at end of file From 6ae6af39e8de208233baddf23560da637f06b0fc Mon Sep 17 00:00:00 2001 From: resicovenba Date: Fri, 1 Dec 2017 10:34:44 +0530 Subject: [PATCH 2/3] new added --- Apollo/assets/js/controllers/dashboardCtrl.js | 57 ------------------- Apollo/assets/views/dashboard.html | 40 +------------ 2 files changed, 1 insertion(+), 96 deletions(-) diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index 04eb8bda..745209ff 100644 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -63,60 +63,3 @@ app.controller('dashboardCtrl', ["$scope","toaster", "$filter", "ngTableParams", }; }]); - -app.controller('OnotherCtrl', ["$scope", function ($scope) { - - // Chart.js Data - $scope.data = [ - - { - value: 50, - color: '#46BFBD', - highlight: '#5AD3D1', - label: 'Student' - }, - { - value: 100, - color: '#FDB45C', - highlight: '#FFC870', - label: 'Staff' - } - ]; - $scope.total = 150; - // Chart.js Options - $scope.options = { - - // Sets the chart to be responsive - responsive: false, - - //Boolean - Whether we should show a stroke on each segment - segmentShowStroke: true, - - //String - The colour of each segment stroke - segmentStrokeColor: '#fff', - - //Number - The width of each segment stroke - segmentStrokeWidth: 2, - - //Number - The percentage of the chart that we cut out of the middle - percentageInnerCutout: 50, // This is 0 for Pie charts - - //Number - Amount of animation steps - animationSteps: 100, - - //String - Animation easing effect - animationEasing: 'easeOutBounce', - - //Boolean - Whether we animate the rotation of the Doughnut - animateRotate: true, - - //Boolean - Whether we animate scaling the Doughnut from the centre - animateScale: false, - - //String - A legend template - legendTemplate: '
    <% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>
' - - }; - -}]); - diff --git a/Apollo/assets/views/dashboard.html b/Apollo/assets/views/dashboard.html index 452e58da..22cc4afe 100644 --- a/Apollo/assets/views/dashboard.html +++ b/Apollo/assets/views/dashboard.html @@ -149,45 +149,7 @@
-
-
-
-

New Users

-
-
- -
-
- {{total}} - -
-
-
-
-
-
- -
-
+
From 547119db545e93f4046556fac9549a9859c56e25 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 1 Dec 2017 11:11:55 +0530 Subject: [PATCH 3/3] timezone change --- .../application/controllers/Batch_Controller.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/controllers/Batch_Controller.php b/Apollo/api/application/controllers/Batch_Controller.php index 09156b66..e05fc83f 100644 --- a/Apollo/api/application/controllers/Batch_Controller.php +++ b/Apollo/api/application/controllers/Batch_Controller.php @@ -31,12 +31,15 @@ class Batch_Controller extends REST_Controller { public function addBatchDetails_post() { - + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); $details['BatchCode'] = $this->post('batchcode'); $details['BatchName'] = $this->post('batcheName'); $details['UniversityID'] = $this->post('universityName'); $details['CreatedBy'] = $this->post('createdBy'); $details['IsActive'] = $this->post('status'); + $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + $batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL) if ($batchDetails) { @@ -86,11 +89,16 @@ class Batch_Controller extends REST_Controller { * */ public function updateBatchDetails_post() { + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); $details['BatchCode'] = $this->post('batchCode'); $details['BatchName'] = $this->post('batchName'); $details['IsActive'] = $this->post('status'); $details['UpdatedBy'] = $this->post('updatedBy'); - $details['UpdatedOn'] = date("Y-m-d", time()); + $details['UpdatedOn'] = $now->format("Y-m-d H:i:s"); + + // print_r( $details['UpdatedOn']) + //exit(); $updateDetails = $this->batch_model->updateBatch($details);// Check if the users data store contains users (in case the database result returns NULL) if ($updateDetails) @@ -112,4 +120,4 @@ class Batch_Controller extends REST_Controller { } -} \ No newline at end of file +}