Files
dbois/public/js/lib/dataservices/employeehoursDataService.js
T
2018-01-31 21:56:13 +01:00

38 lines
1.1 KiB
JavaScript

/**
* Created by Pensare Software.
* User: Theo Weijmer
* Date: 31/01/2018
* Time: 20:41
*/
dbo.employeehoursDataService = {
getEmployeehours: function ( $month, $year, callback ) {
$.getJSON( 'index.php/projects/employeehoursController/getEmployeehours/' + $month + '/' + $year )
.done( function ( data ) {
callback( data );
} );
},
getHourtypes: function ( callback ) {
$.getJSON( 'index.php/projects/employeehoursController/getHourtypes' )
.done( function ( data ) {
callback( data );
} );
},
saveEmployeehour: function ( submitDATA, callback ) {
$.post( 'index.php/projects/employeehoursController/saveEmployeehour', submitDATA, 'json' )
.done( function ( data ) {
callback( data );
} );
},
removeEmployeehour: function ( employeehourID, callback ) {
$.getJSON( 'index.php/projects/employeehoursController/removeEmployeehour/' + employeehourID )
.done( function ( data ) {
callback( data );
} )
}
};