From 321432efa2c20083aad8529255d632bef6f5493e Mon Sep 17 00:00:00 2001
From: Theo Weijmer <>
Date: Thu, 1 Apr 2021 15:06:20 +0200
Subject: [PATCH] fix voor onderhanden werkpositie uren per werknemer
---
.../views/pages/monthlyemployeehours_view.php | 8 ++++----
composer.json | 2 --
.../modules/reports/monthlyEmployeeHoursModule.js | 13 +++++++------
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/application/views/pages/monthlyemployeehours_view.php b/application/views/pages/monthlyemployeehours_view.php
index 6d6be2b..f42abf0 100644
--- a/application/views/pages/monthlyemployeehours_view.php
+++ b/application/views/pages/monthlyemployeehours_view.php
@@ -40,8 +40,8 @@
-
+
\ No newline at end of file
+
diff --git a/composer.json b/composer.json
index 70ea60a..b0a0b95 100755
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,5 @@
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
},
"require-dev": {
- "mikey179/vfsStream": "1.1.*",
- "phpunit/phpunit": "4.* || 5.*"
}
}
diff --git a/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js b/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
index 9217a7f..7d363d4 100644
--- a/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
+++ b/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
@@ -162,12 +162,13 @@ dbo.monthlyemployeehoursInit = function () {
}, 700 );
},
- refreshTab: function () {
+ refreshTab: function (userID) {
var vm = dbo.monthlyEmployeeHoursModel;
if ( vm.currentTab == false ) return;
- dbo.reportsDataService.getEmployeeHours( vm.currentTab.id, vm.selectedYear(), function ( data ) {
+ dbo.reportsDataService.getEmployeeHours( userID, vm.selectedYear(), function ( data ) {
+ console.log( data );
vm.currentTab.myData( data );
vm.currentTab.totalJanuari( 0 );
vm.currentTab.totalFebruari( 0 );
@@ -259,17 +260,17 @@ dbo.monthlyemployeehoursInit = function () {
dbo.monthlyEmployeeHoursModel.drawCharts( this );
},
- setActivetab: function ( tab ) {
+ setActivetab: function ( userID ) {
var vm = dbo.monthlyEmployeeHoursModel;
$.each( vm.uniqueEmployees(), function ( i, p ) {
- if ( tab == p.slug ) {
+ if ( userID == p.id ) {
vm.currentTab = p;
- vm.refreshTab();
+ vm.refreshTab( userID );
+ vm.sluggy( userID );
}
} )
- vm.sluggy( tab );
},
UniqueEmployee: function ( data ) {