fix voor onderhanden werkpositie uren per werknemer

This commit is contained in:
Theo Weijmer
2021-04-01 15:06:20 +02:00
parent 54f84f8c22
commit 321432efa2
3 changed files with 11 additions and 12 deletions
@@ -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 ) {