39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
/**
|
|
* Created by Pensare Software.
|
|
* User: Theo Weijmer
|
|
* Date: 14/02/2018
|
|
* Time: 11:14
|
|
*/
|
|
|
|
|
|
dbo.reportsDataService = {
|
|
|
|
getUsedYears: function ( callback ) {
|
|
$.getJSON( 'index.php/reports/reportsdefaultController/getUsedYears' )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
getRecapProjects: function(callback){
|
|
$.getJSON( 'index.php/reports/reportsController/recapProjects' )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
getEmployeeHours: function ( employeeID, year, callback ) {
|
|
$.getJSON( 'index.php/reports/reportsController/getMonthlyEmployeeHoursPerProject/' + employeeID + '/' + year )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
} );
|
|
},
|
|
|
|
saveCurrentFinnacialYear: function(projectID, amount, callback){
|
|
$.post( 'index.php/reports/reportsController/saveCurrentFinnacialYear/' + projectID, {amount:amount} )
|
|
.done( function ( data ) {
|
|
callback( data );
|
|
}, 'json' );
|
|
}
|
|
|
|
} |