mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 15:56:48 +00:00
22 lines
954 B
JavaScript
22 lines
954 B
JavaScript
(function(module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
ViewUserController: function(scope, routeParams, location, resourceFactory ) {
|
|
scope.user = [];
|
|
resourceFactory.userListResource.get({userId: routeParams.id} , function(data) {
|
|
scope.user = data;
|
|
});
|
|
|
|
scope.deleteuser = function (){
|
|
resourceFactory.userListResource.delete({userId: routeParams.id} , {} , function(data) {
|
|
location.path('/users');
|
|
// added dummy request param because Content-Type header gets removed
|
|
// if the request does not contain any data (a request body)
|
|
});
|
|
};
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('ViewUserController', ['$scope', '$routeParams', '$location', 'ResourceFactory', mifosX.controllers.ViewUserController]).run(function($log) {
|
|
$log.info("ViewUserController initialized");
|
|
});
|
|
}(mifosX.controllers || {}));
|