mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 11:26:51 +00:00
23 lines
853 B
JavaScript
23 lines
853 B
JavaScript
|
|
(function(module) {
|
||
|
|
mifosX.controllers = _.extend(module, {
|
||
|
|
CreateEmployeeController: function(scope, resourceFactory, location) {
|
||
|
|
scope.offices = [];
|
||
|
|
resourceFactory.officeResource.getAllOffices(function(data) {
|
||
|
|
scope.offices = data;
|
||
|
|
scope.formData = {
|
||
|
|
isLoanOfficer: true
|
||
|
|
};
|
||
|
|
});
|
||
|
|
|
||
|
|
scope.submit = function() {
|
||
|
|
resourceFactory.employeeResource.save(this.formData,function(data){
|
||
|
|
location.path('/viewemployee/' + data.resourceId);
|
||
|
|
});
|
||
|
|
};
|
||
|
|
}
|
||
|
|
});
|
||
|
|
mifosX.ng.application.controller('CreateEmployeeController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.CreateEmployeeController]).run(function($log) {
|
||
|
|
$log.info("CreateEmployeeController initialized");
|
||
|
|
});
|
||
|
|
}(mifosX.controllers || {}));
|