mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:11:54 +00:00
When assigning staff to Centers, Groups, Client, Loan, Savings a/c: Only loan officers who belong to the branch should be displayed in dropdown
This commit is contained in:
parent
ed47781f9d
commit
0b1f4c86f3
@ -8,7 +8,7 @@
|
||||
scope.formData = {};
|
||||
scope.restrictDate = new Date();
|
||||
scope.first.date = new Date();
|
||||
resourceFactory.centerTemplateResource.get(function (data) {
|
||||
resourceFactory.centerTemplateResource.get({staffInSelectedOfficeOnly:true},function (data) {
|
||||
scope.offices = data.officeOptions;
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.groups = data.groupMembersOptions;
|
||||
@ -16,7 +16,7 @@
|
||||
});
|
||||
|
||||
scope.changeOffice = function () {
|
||||
resourceFactory.centerTemplateResource.get({staffInSelectedOfficeOnly: false, officeId: scope.formData.officeId
|
||||
resourceFactory.centerTemplateResource.get({staffInSelectedOfficeOnly:true, officeId: scope.formData.officeId
|
||||
}, function (data) {
|
||||
scope.staffs = data.staffOptions;
|
||||
});
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
scope.first.date = new Date();
|
||||
scope.centerId = routeParams.id;
|
||||
scope.restrictDate = new Date();
|
||||
resourceFactory.centerResource.get({centerId: routeParams.id, template: 'true'}, function (data) {
|
||||
resourceFactory.centerResource.get({centerId: routeParams.id, template: 'true',staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.edit = data;
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.formData = {
|
||||
@ -49,5 +49,4 @@
|
||||
mifosX.ng.application.controller('EditCenterController', ['$scope', 'ResourceFactory', '$location', '$routeParams', 'dateFilter', mifosX.controllers.EditCenterController]).run(function ($log) {
|
||||
$log.info("EditCenterController initialized");
|
||||
});
|
||||
}(mifosX.controllers || {}));
|
||||
|
||||
}(mifosX.controllers || {}));
|
||||
@ -10,7 +10,7 @@
|
||||
scope.restrictDate = new Date();
|
||||
scope.showSavingOptions = false;
|
||||
scope.opensavingsproduct = false;
|
||||
resourceFactory.clientTemplateResource.get(function (data) {
|
||||
resourceFactory.clientTemplateResource.get({staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.offices = data.officeOptions;
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.formData.officeId = scope.offices[0].id;
|
||||
@ -22,7 +22,7 @@
|
||||
});
|
||||
|
||||
scope.changeOffice = function (officeId) {
|
||||
resourceFactory.clientTemplateResource.get({staffInSelectedOfficeOnly: false, officeId: officeId
|
||||
resourceFactory.clientTemplateResource.get({staffInSelectedOfficeOnly:true, officeId: officeId
|
||||
}, function (data) {
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.savingproducts = data.savingProductOptions;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
scope.clientId = routeParams.id;
|
||||
scope.showSavingOptions = 'false';
|
||||
scope.opensavingsproduct = 'false';
|
||||
resourceFactory.clientResource.get({clientId: routeParams.id, template: 'true'}, function (data) {
|
||||
resourceFactory.clientResource.get({clientId: routeParams.id, template:'true', staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.offices = data.officeOptions;
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.savingproducts = data.savingProductOptions;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
scope.added = [];
|
||||
scope.formData = {};
|
||||
scope.formData.clientMembers = [];
|
||||
resourceFactory.groupTemplateResource.get({orderBy: 'name', sortOrder: 'ASC'}, function (data) {
|
||||
resourceFactory.groupTemplateResource.get({orderBy: 'name', sortOrder: 'ASC',staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.offices = data.officeOptions;
|
||||
scope.staffs = data.staffOptions;
|
||||
scope.clients = data.clientOptions;
|
||||
@ -47,7 +47,7 @@
|
||||
};
|
||||
scope.changeOffice = function (officeId) {
|
||||
scope.addedClients = [];
|
||||
resourceFactory.groupTemplateResource.get({staffInSelectedOfficeOnly: false, officeId: officeId
|
||||
resourceFactory.groupTemplateResource.get({staffInSelectedOfficeOnly: false, officeId: officeId,staffInSelectedOfficeOnly:true
|
||||
}, function (data) {
|
||||
scope.staffs = data.staffOptions;
|
||||
});
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
scope.first = {};
|
||||
scope.managecode = routeParams.managecode;
|
||||
scope.restrictDate = new Date();
|
||||
resourceFactory.groupResource.get({groupId: routeParams.id, associations: 'clientMembers', template: 'true'}, function (data) {
|
||||
resourceFactory.groupResource.get({groupId: routeParams.id, associations: 'clientMembers', template: 'true',staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.editGroup = data;
|
||||
scope.formData = {
|
||||
name: data.name,
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
scope.collaterals = [];
|
||||
scope.restrictDate = new Date();
|
||||
|
||||
resourceFactory.loanResource.get({loanId: routeParams.id, template: true, associations: 'charges,collateral,meeting,multiDisburseDetails'}, function (data) {
|
||||
resourceFactory.loanResource.get({loanId: routeParams.id, template: true, associations: 'charges,collateral,meeting,multiDisburseDetails',staffInSelectedOfficeOnly:true}, function (data) {
|
||||
scope.loanaccountinfo = data;
|
||||
|
||||
resourceFactory.loanResource.get({resourceType: 'template', templateType: 'collateral', productId: data.loanProductId, fields: 'id,loanCollateralOptions'}, function (data) {
|
||||
@ -62,6 +62,8 @@
|
||||
inparams.groupId = scope.groupId;
|
||||
}
|
||||
|
||||
inparams.staffInSelectedOfficeOnly = true;
|
||||
|
||||
resourceFactory.loanResource.get(inparams, function (data) {
|
||||
scope.loanaccountinfo = data;
|
||||
scope.collaterals = [];
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
scope.restrictDate = new Date();
|
||||
scope.chargeFormData = {}; //For charges
|
||||
scope.collateralFormData = {}; //For collaterals
|
||||
scope.staffInSelectedOfficeOnly = true;
|
||||
scope.inparams = { resourceType: 'template', templateType: 'jlgbulk', lendingStrategy: 300 };
|
||||
|
||||
if (scope.groupId) {
|
||||
|
||||
@ -31,6 +31,8 @@
|
||||
scope.inparams.templateType = 'individual';
|
||||
}
|
||||
|
||||
scope.inparams.staffInSelectedOfficeOnly = true;
|
||||
|
||||
resourceFactory.loanResource.get(scope.inparams, function (data) {
|
||||
scope.products = data.productOptions;
|
||||
if (data.clientName) {
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
}
|
||||
;
|
||||
|
||||
scope.inparams.staffInSelectedOfficeOnly = true;
|
||||
|
||||
resourceFactory.savingsTemplateResource.get(scope.inparams, function (data) {
|
||||
scope.products = data.productOptions;
|
||||
scope.chargeOptions = data.chargeOptions;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
scope.accountId = routeParams.id;
|
||||
scope.charges = [];
|
||||
scope.restrictDate = new Date();
|
||||
resourceFactory.savingsResource.get({accountId: scope.accountId, template: 'true', associations: 'charges'}, function (data) {
|
||||
resourceFactory.savingsResource.get({accountId: scope.accountId, template: 'true', associations: 'charges',staffInSelectedOfficeOnly:'true'}, function (data) {
|
||||
scope.data = data;
|
||||
scope.charges = data.charges || [];
|
||||
if (scope.charges) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user