From 32fb52073901ce1c5855561e48f05a6e827a1ffc Mon Sep 17 00:00:00 2001 From: Theo Weijmer Date: Mon, 17 Jan 2022 16:40:03 +0100 Subject: [PATCH] diversen uren en dashboard --- .../dashboard/DashboardController.php | 2 +- application/core/MY_Controller.php | 2 +- .../modules/projects/employeehoursModule.js | 26 ++++++++----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/application/controllers/dashboard/DashboardController.php b/application/controllers/dashboard/DashboardController.php index 4b4066a..5671340 100644 --- a/application/controllers/dashboard/DashboardController.php +++ b/application/controllers/dashboard/DashboardController.php @@ -133,7 +133,7 @@ class DashboardController extends MY_Controller { { $totalChance += ROUND( - ( $offer->own_revenue + $offer->other_revenue ) * + ( $offer->own_revenue ) * // + $offer->other_revenue mail 17-01-2022 ( $offer->acceptance_chance / 100 ), 0 ); } diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index b109640..3acc3ff 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -16,7 +16,7 @@ class MY_Controller extends CI_Controller { { parent::__construct(); - $this->version = '1.00.7'; + $this->version = '1.00.8'; $this->load->library( 'beheer/session/RetrieveUserSession' ); diff --git a/public/js/lib/modules/projects/employeehoursModule.js b/public/js/lib/modules/projects/employeehoursModule.js index f2381cc..fb5e706 100644 --- a/public/js/lib/modules/projects/employeehoursModule.js +++ b/public/js/lib/modules/projects/employeehoursModule.js @@ -92,19 +92,10 @@ dbo.employeehoursInit = function () { saveDelayedEmployeehours: function () { var vm = dbo.employeehoursModel; - var self = this; - self.dirty( true ); - if ( timeout ) { - clearTimeout( timeout ); - timeout = null; - } - timeout = setTimeout( function () { - vm.saveEmployeehours( self ); - }, 300 ); + vm.saveEmployeehours( this ); }, saveEmployeehours: function ( self = false ) { - console.log( 'inside' ); self.dirty( true ); if ( !self ) self = this; @@ -124,11 +115,16 @@ dbo.employeehoursInit = function () { hourType : self.hourType(), project_id : self.projectID() }; - - dbo.employeehoursDataService.saveEmployeehour( submitDATA, function ( data ) { - self.id( data.employeehourID ); - self.dirty( false ); - } ); + if(timeout) { + clearTimeout(timeout); + timeout = null; + } + timeout = setTimeout(function(){ + dbo.employeehoursDataService.saveEmployeehour( submitDATA, function ( data ) { + self.id( data.employeehourID ); + self.dirty( false ); + } ); + },200); }, editEmployeehour: function () {