From 86130bcfe3051703f2f52c4954ca205690ebf54d Mon Sep 17 00:00:00 2001 From: goutham-M Date: Fri, 30 May 2014 15:50:03 +0530 Subject: [PATCH] Select staff only from the branch office --- app/scripts/controllers/client/ClientActionsController.js | 2 +- app/scripts/controllers/groups/AssignStaffController.js | 2 +- .../controllers/loanAccount/AssignLoanOfficerController.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/controllers/client/ClientActionsController.js b/app/scripts/controllers/client/ClientActionsController.js index 287bda99..642131cd 100644 --- a/app/scripts/controllers/client/ClientActionsController.js +++ b/app/scripts/controllers/client/ClientActionsController.js @@ -29,7 +29,7 @@ scope.breadcrumbName = 'label.anchor.assignstaff'; scope.labelName = 'label.input.staff'; scope.staffField = true; - resourceFactory.clientResource.get({clientId: routeParams.id, template: 'true'}, function (data) { + resourceFactory.clientResource.get({clientId: routeParams.id, template: 'true',staffInSelectedOfficeOnly:true}, function (data) { if (data.staffOptions) { scope.staffOptions = data.staffOptions; scope.formData.staffId = scope.staffOptions[0].id; diff --git a/app/scripts/controllers/groups/AssignStaffController.js b/app/scripts/controllers/groups/AssignStaffController.js index 8e731c17..9593c40b 100644 --- a/app/scripts/controllers/groups/AssignStaffController.js +++ b/app/scripts/controllers/groups/AssignStaffController.js @@ -4,7 +4,7 @@ scope.group = []; scope.staff = []; scope.formData = {}; - resourceFactory.assignStaffResource.get({groupOrCenter: routeParams.entityType, groupOrCenterId: routeParams.id, template: 'true'}, function (data) { + resourceFactory.assignStaffResource.get({groupOrCenter: routeParams.entityType, groupOrCenterId: routeParams.id, template: 'true',staffInSelectedOfficeOnly:true}, function (data) { scope.group = data; scope.staffs = data.staffOptions; scope.formData.staffId = data.staffOptions[0].id; diff --git a/app/scripts/controllers/loanAccount/AssignLoanOfficerController.js b/app/scripts/controllers/loanAccount/AssignLoanOfficerController.js index f5ddde04..a45761d2 100644 --- a/app/scripts/controllers/loanAccount/AssignLoanOfficerController.js +++ b/app/scripts/controllers/loanAccount/AssignLoanOfficerController.js @@ -7,7 +7,7 @@ scope.loanId = routeParams.id; var fields = "id,loanOfficerId,loanOfficerOptions"; - resourceFactory.loanResource.get({loanId: scope.loanId, template: true, fields: fields}, function (data) { + resourceFactory.loanResource.get({loanId: scope.loanId, template: true, fields: fields, staffInSelectedOfficeOnly:true}, function (data) { if (data.loanOfficerOptions) { scope.loanOfficers = data.loanOfficerOptions; scope.formData.toLoanOfficerId = data.loanOfficerOptions[0].id;