Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/Fix Invalid individual loan requested amount #212

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion app/scripts/controllers/loanAccount/NewLoanAccAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,25 @@
if(scope.clientId){
resourceFactory.clientResource.get({clientId: scope.clientId}, function (data) {
scope.prequalificationOptions = data.clientPrequalifications;
scope.clientData = data;
});
}

scope.prequalificationChange = function (prequalificationId){
resourceFactory.prequalificationResource.get({groupId: prequalificationId}, function (data) {
var loanProductId = data.productId;
scope.totalApprovedAmount = data.totalApprovedAmount;
if(scope.clientId){
var groupMembers = data.groupMembers;
if(groupMembers.length > 0){
for(var i = 0; i < groupMembers.length; i++){
if(groupMembers[i].dpi == scope.clientData.dpiNumber){
scope.totalApprovedAmount = groupMembers[i].approvedAmount ? groupMembers[i].approvedAmount : groupMembers[i].requestedAmount;
}
}
}
} else {
scope.totalApprovedAmount = data.totalApprovedAmount ? data.totalApprovedAmount : data.totalApprovedAmount;
}
scope.loanProductChange(loanProductId);
});
}
Expand Down
2 changes: 0 additions & 2 deletions app/views/groups/viewgroup.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ <h3 class="panel-title ng-binding">{{ 'label.heading.clients' | translate }}</h3
</td>
<td class="pointer" data-ng-click="routeToMem(member.id)">{{member.displayName}}</td>
</td>
<td><a class="btn btn-primary btn-sm" ng-href="#/newindividualjlgloanaccount/{{group.id}}/{{member.id}}?isIndividualJlgLoanAccount=true" data-ng-show="isActiveMember(member.status.code)"><i
class="fa fa-plus "></i>{{ 'label.button.jlgloanapplication' | translate }}</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 1 addition & 3 deletions app/views/loans/newloanaccount.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<form name="Details" novalidate="" ng-submit="goNext(Details)" class="form-inline">
<fieldset>
<api-validate></api-validate>
<!--<h3>{{'label.heading.details' | translate}}</h3>-->
<hr>
<table class="" style="border-spacing: 10px; border-collapse: separate">
<tr>
Expand All @@ -29,8 +28,7 @@
</td>
<td class="width36 paddedbottom20" ng-hide="isIndividualJlgLoanAccount">
<select id="prequalificationId" ng-model="prequalificationId" ng-options="prequalification.id as prequalification.prequalificationNumber for prequalification in prequalificationOptions"
value="{{prequalification.id}}" ng-change="prequalificationChange(prequalificationId)" class="form-control width170px"
required="required">
value="{{prequalification.id}}" ng-change="prequalificationChange(prequalificationId)" class="form-control width170px">
<option style="display:none" value="">{{'label.input.select.prequalification' | translate}}
</option>
</select>
Expand Down
Loading