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 @@ - @@ -54,7 +54,7 @@ -
+
@@ -83,4 +83,4 @@
-
\ 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 ) {