fix for employeehours (remove) and refresh active offers / projects
This commit is contained in:
@@ -35,8 +35,8 @@ dbo.employeehoursDataService = {
|
||||
} );
|
||||
},
|
||||
|
||||
removeEmployeehour: function ( employeehourID, callback ) {
|
||||
$.getJSON( 'index.php/projects/employeeHoursController/removeEmployeehour/' + employeehourID )
|
||||
removeEmployeehour: function ( employeehourID, hourType, callback ) {
|
||||
$.getJSON( 'index.php/projects/employeeHoursController/removeEmployeehour/' + employeehourID + '/' + hourType )
|
||||
.done( function ( data ) {
|
||||
callback( data );
|
||||
} )
|
||||
|
||||
@@ -48,8 +48,6 @@ $( function () {
|
||||
vm[page]( true );
|
||||
|
||||
var func = page.toLowerCase() + 'Init';
|
||||
console.log( func );
|
||||
|
||||
|
||||
window.dbo[func]();
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
dbo.employeehoursInit = function () {
|
||||
|
||||
if ( dbo.employeehoursModel !== undefined ) {
|
||||
dbo.employeehoursModel.refreshEmployeehours();
|
||||
dbo.employeehoursModel.init();
|
||||
} else {
|
||||
dbo.employeehoursModel = {
|
||||
|
||||
@@ -138,7 +138,7 @@ dbo.employeehoursInit = function () {
|
||||
modalClass: 'modal-warning'
|
||||
}, function ( response ) {
|
||||
if ( response ) {
|
||||
dbo.employeehoursDataService.removeEmployeehour( self.id(), function ( data ) {
|
||||
dbo.employeehoursDataService.removeEmployeehour( self.id(), self.hourType(), function ( data ) {
|
||||
if ( data.result ) {
|
||||
vm.refreshEmployeehours();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user