mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 13:51:55 +00:00
* Fixed #2904 - Recreated from another in-active PR - https://github.com/openMF/community-app/pull/2905 - Had merge conflicts and branch is inactive - Tested the scenarios * Fixed #2904 - Fixed the existing test
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
(function (module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
RoleController: function (scope, resourceFactory, location) {
|
|
scope.roles = [];
|
|
scope.routeTo = function (id) {
|
|
location.path('/admin/viewrole/' + id);
|
|
};
|
|
|
|
scope.RolesPerPage = 15;
|
|
resourceFactory.roleResource.getAllRoles({}, function (data) {
|
|
scope.roles = data;
|
|
});
|
|
|
|
scope.isRoleEnable = function(value) {
|
|
return value;
|
|
};
|
|
|
|
if (!scope.searchCriteria.rolesFilterText) {
|
|
scope.searchCriteria.rolesFilterText = null;
|
|
scope.saveSC();
|
|
}
|
|
scope.filterText = scope.searchCriteria.rolesFilterText || '';
|
|
|
|
scope.onFilter = function () {
|
|
scope.searchCriteria.rolesFilterText = scope.filterText;
|
|
scope.saveSC();
|
|
};
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('RoleController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.RoleController]).run(function ($log) {
|
|
$log.info("RoleController initialized");
|
|
});
|
|
}(mifosX.controllers || {}));
|