diversen uren en dashboard
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user