mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 19:16:55 +00:00
23 lines
1010 B
JavaScript
23 lines
1010 B
JavaScript
(function(module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
ViewCodeController: function(scope, routeParams , resourceFactory, location ) {
|
|
scope.codevalues = [];
|
|
resourceFactory.codeResources.get({codeId: routeParams.id} , function(data) {
|
|
scope.code = data;
|
|
});
|
|
resourceFactory.codeValueResource.getAllCodeValues({codeId: routeParams.id} , function(data) {
|
|
scope.codevalues = data;
|
|
});
|
|
scope.delcode = function(){
|
|
resourceFactory.codeResources.remove({codeId: routeParams.id},this.code,function(data){
|
|
location.path('/codes');
|
|
|
|
});
|
|
}
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('ViewCodeController', ['$scope', '$routeParams','ResourceFactory','$location', mifosX.controllers.ViewCodeController]).run(function($log) {
|
|
$log.info("ViewCodeController initialized");
|
|
});
|
|
}(mifosX.controllers || {}));
|