mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:11:54 +00:00
Fix #2879 - Added fixed and recurring account overview
This commit is contained in:
parent
fd0f77e023
commit
38813f1316
@ -53,6 +53,8 @@
|
||||
"label.heading.loanaccoverview": "Loan Account Overview",
|
||||
"label.heading.upcomingcharges": "Upcoming Charges",
|
||||
"label.heading.savingsaccoverview": "Savings Account Overview",
|
||||
"label.heading.fixedaccoverview": "Fixed Deposits Overview",
|
||||
"label.heading.recurringaccoverview": "Recurring Deposits Overview",
|
||||
"label.heading.members": "Members",
|
||||
"label.heading.confirm": "Confirm",
|
||||
"label.heading.attendance": "Attendance",
|
||||
@ -687,6 +689,8 @@
|
||||
"label.button.capture": "Capture",
|
||||
"label.button.viewclosedloans": "View Closed Loans",
|
||||
"label.button.viewclosedsavings": "View Closed Savings",
|
||||
"label.button.viewclosedfixed": "View Closed Fixed",
|
||||
"label.button.viewclosedrecurring": "View Closed Recurring",
|
||||
"label.button.uploadpic": "Upload Client Image",
|
||||
"label.button.capturepic": "Capture Client Image",
|
||||
"label.button.deletepic": "Delete Client Image",
|
||||
@ -695,6 +699,8 @@
|
||||
"label.button.viewsig": "View Client Signature",
|
||||
"label.button.viewactiveloans": "View Active Loans",
|
||||
"label.button.viewactivesavings": "View Active Savings",
|
||||
"label.button.viewactivefixed": "View Active Fixed",
|
||||
"label.button.viewactiverecurring": "View Active Recurring",
|
||||
"label.button.chargesoverview": "Charges Overview",
|
||||
"label.button.reactivate": "Reactivate",
|
||||
"label.button.ok": "OK",
|
||||
|
||||
@ -10,6 +10,10 @@
|
||||
scope.openLoan = true;
|
||||
scope.openSaving = true;
|
||||
scope.openShares = true ;
|
||||
scope.openFixed = true;
|
||||
scope.openRecurring = true;
|
||||
scope.showFixed = false;
|
||||
scope.showRecurring = false;
|
||||
scope.updateDefaultSavings = false;
|
||||
scope.charges = [];
|
||||
|
||||
@ -516,8 +520,45 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
for(var i in data.savingsAccounts){
|
||||
if(data.savingsAccounts[i].depositType.value == 'Recurring Deposit'){
|
||||
scope.showRecurring = true;
|
||||
}
|
||||
}
|
||||
for(var i in data.savingsAccounts){
|
||||
if(data.savingsAccounts[i].depositType.value == 'Fixed Deposit'){
|
||||
scope.showFixed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
scope.isSavings = function (savingaccount) {
|
||||
if(savingaccount.depositType.value == 'Savings'){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
scope.isFixed = function (savingaccount) {
|
||||
if(savingaccount.depositType.value == 'Fixed Deposit'){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
scope.isRecurring = function(savingaccount) {
|
||||
if(savingaccount.depositType.value == 'Recurring Deposit'){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
resourceFactory.clientChargesResource.getCharges({clientId: routeParams.id, pendingPayment:true}, function (data) {
|
||||
scope.charges = data.pageItems;
|
||||
});
|
||||
@ -575,6 +616,22 @@
|
||||
}
|
||||
};
|
||||
|
||||
scope.setFixed = function () {
|
||||
if(scope.openFixed) {
|
||||
scope.openFixed = false;
|
||||
} else {
|
||||
scope.openFixed = true;
|
||||
}
|
||||
};
|
||||
|
||||
scope.setRecurring = function () {
|
||||
if(scope.openRecurring) {
|
||||
scope.openRecurring = false;
|
||||
}else {
|
||||
scope.openRecurring = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
resourceFactory.clientNotesResource.getAllNotes({clientId: routeParams.id}, function (data) {
|
||||
scope.clientNotes = data;
|
||||
|
||||
@ -430,7 +430,7 @@
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingNotClosed">
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingNotClosed | filter:isSavings">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip-placement="right" ng-show="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
<i uib-tooltip-placement="right" ng-hide="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value+':'+savingaccount.subStatus.value}}" class="fa fa-stop {{savingaccount.status.code+savingaccount.subStatus.value | StatusLookup}}"></i>
|
||||
@ -469,7 +469,165 @@
|
||||
<th>{{'label.heading.closedate' | translate}}</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingClosed">
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingClosed | filter:isSavings">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
{{savingaccount.accountNo}}
|
||||
</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.productName}}</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<span data-ng-show="savingaccount.timeline.closedOnDate">{{savingaccount.timeline.closedOnDate | DateFormat}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Fixed deposits overview -->
|
||||
<div data-ng-show="showFixed">
|
||||
<div class="pull-right">
|
||||
<span data-ng-show="clientAccounts.savingsAccounts">
|
||||
<button data-ng-show="openFixed" type="button" data-ng-click="setFixed()"
|
||||
class="btn-primary btn btn-sm">
|
||||
{{ 'label.button.viewclosedfixed' | translate }}
|
||||
</button>
|
||||
<button data-ng-show="!openFixed" type="button" data-ng-click="setFixed()"
|
||||
class="btn-primary btn btn-sm">
|
||||
{{ 'label.button.viewactivefixed' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="span gray-head">
|
||||
<span class="boldlabel">
|
||||
<strong>{{'label.heading.fixedaccoverview' | translate }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
<table class="table table-condensed" data-ng-show="openFixed">
|
||||
<tr class="graybg">
|
||||
<th>{{'label.heading.accnum' | translate}}</th>
|
||||
<th>{{'label.heading.savingaccount' | translate}}</th>
|
||||
<th>{{'label.heading.lastActive' | translate}}</th>
|
||||
<th class="center">{{'label.heading.balance' | translate}}</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingNotClosed | filter:isFixed">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip-placement="right" ng-show="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
<i uib-tooltip-placement="right" ng-hide="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value+':'+savingaccount.subStatus.value}}" class="fa fa-stop {{savingaccount.status.code+savingaccount.subStatus.value | StatusLookup}}"></i>
|
||||
{{savingaccount.accountNo}}
|
||||
</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.productName}}</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.lastActiveTransactionDate|DateFormat}}</td>
|
||||
<td class="pointer center" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.accountBalance|number}}</td>
|
||||
<td class="pointer" ng-if="savingaccount.status.active">
|
||||
<span ng-repeat="button in savingsActionbuttons">
|
||||
<a uib-tooltip="{{'label.'+button.name | translate}}" ng-show="button.name" has-permission='{{button.taskPermissionName}}'
|
||||
ng-click="navigateToSavingsOrDepositAccount(button.name.replace('button.',''), savingaccount.id, savingaccount.depositType.id)"
|
||||
class="btn btn-xs btn-primary ng-binding" ng-if="savingaccount.depositType.id==button.type"><i class="{{button.icon}} "></i>
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td class="pointer" ng-if="savingaccount.status.submittedAndPendingApproval">
|
||||
<a uib-tooltip="{{'label.button.approve' | translate}}" has-permission='APPROVE_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/approve" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-check "></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="pointer" ng-if="!savingaccount.status.submittedAndPendingApproval && !savingaccount.status.active">
|
||||
<a uib-tooltip="{{'label.button.undoapproval' | translate}}" has-permission='APPROVALUNDO_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/undoapproval" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-undo "></i>
|
||||
</a>
|
||||
<a uib-tooltip="{{'label.button.activate' | translate}}" has-permission='ACTIVATE_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/activate" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-check-circle "></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-condensed" data-ng-show="!openFixed">
|
||||
<tr class="graybg">
|
||||
<th>{{'label.heading.accnum' | translate}}</th>
|
||||
<th>{{'label.heading.savingaccount' | translate}}</th>
|
||||
<th>{{'label.heading.closedate' | translate}}</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingClosed | filter:isFixed">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
{{savingaccount.accountNo}}
|
||||
</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.productName}}</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<span data-ng-show="savingaccount.timeline.closedOnDate">{{savingaccount.timeline.closedOnDate | DateFormat}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Recurring deposits overview -->
|
||||
<div ng-show="showRecurring">
|
||||
<div class="pull-right">
|
||||
<span data-ng-show="clientAccounts.savingsAccounts">
|
||||
<button data-ng-show="openRecurring" type="button" data-ng-click="setRecurring()"
|
||||
class="btn-primary btn btn-sm">
|
||||
{{ 'label.button.viewclosedrecurring' | translate }}
|
||||
</button>
|
||||
<button data-ng-show="!openRecurring" type="button" data-ng-click="setRecurring()"
|
||||
class="btn-primary btn btn-sm">
|
||||
{{ 'label.button.viewactiverecurring' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="span gray-head">
|
||||
<span class="boldlabel">
|
||||
<strong>{{'label.heading.recurringaccoverview' | translate }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
<table class="table table-condensed" data-ng-show="openRecurring">
|
||||
<tr class="graybg">
|
||||
<th>{{'label.heading.accnum' | translate}}</th>
|
||||
<th>{{'label.heading.savingaccount' | translate}}</th>
|
||||
<th>{{'label.heading.lastActive' | translate}}</th>
|
||||
<th class="center">{{'label.heading.balance' | translate}}</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingNotClosed | filter:isRecurring">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip-placement="right" ng-show="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
<i uib-tooltip-placement="right" ng-hide="savingaccount.subStatus.id==0" uib-tooltip="{{savingaccount.status.value+':'+savingaccount.subStatus.value}}" class="fa fa-stop {{savingaccount.status.code+savingaccount.subStatus.value | StatusLookup}}"></i>
|
||||
{{savingaccount.accountNo}}
|
||||
</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.productName}}</td>
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.lastActiveTransactionDate|DateFormat}}</td>
|
||||
<td class="pointer center" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">{{savingaccount.accountBalance|number}}</td>
|
||||
<td class="pointer" ng-if="savingaccount.status.active">
|
||||
<span ng-repeat="button in savingsActionbuttons">
|
||||
<a uib-tooltip="{{'label.'+button.name | translate}}" ng-show="button.name" has-permission='{{button.taskPermissionName}}'
|
||||
ng-click="navigateToSavingsOrDepositAccount(button.name.replace('button.',''), savingaccount.id, savingaccount.depositType.id)"
|
||||
class="btn btn-xs btn-primary ng-binding" ng-if="savingaccount.depositType.id==button.type"><i class="{{button.icon}} "></i>
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td class="pointer" ng-if="savingaccount.status.submittedAndPendingApproval">
|
||||
<a uib-tooltip="{{'label.button.approve' | translate}}" has-permission='APPROVE_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/approve" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-check "></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="pointer" ng-if="!savingaccount.status.submittedAndPendingApproval && !savingaccount.status.active">
|
||||
<a uib-tooltip="{{'label.button.undoapproval' | translate}}" has-permission='APPROVALUNDO_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/undoapproval" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-undo "></i>
|
||||
</a>
|
||||
<a uib-tooltip="{{'label.button.activate' | translate}}" has-permission='ACTIVATE_SAVINGSACCOUNT' ng-href="#/savingaccount/{{savingaccount.id}}/activate" class="btn btn-xs btn-primary ng-binding">
|
||||
<i class="fa fa-check-circle "></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-condensed" data-ng-show="!openRecurring">
|
||||
<tr class="graybg">
|
||||
<th>{{'label.heading.accnum' | translate}}</th>
|
||||
<th>{{'label.heading.savingaccount' | translate}}</th>
|
||||
<th>{{'label.heading.closedate' | translate}}</th>
|
||||
</tr>
|
||||
<tr class="pointer-main"
|
||||
ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingClosed | filter:isRecurring">
|
||||
<td class="pointer" data-ng-click="routeToSaving(savingaccount.id, savingaccount.depositType.code)">
|
||||
<i uib-tooltip="{{savingaccount.status.value}}" class="fa fa-stop {{savingaccount.status.code | StatusLookup}}"></i>
|
||||
{{savingaccount.accountNo}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user