From 38813f1316d3d87f6602620100a697b3b7f2f364 Mon Sep 17 00:00:00 2001 From: ankit01ojha Date: Mon, 12 Feb 2018 23:26:18 +0530 Subject: [PATCH] Fix #2879 - Added fixed and recurring account overview --- app/global-translations/locale-en.json | 6 + .../client/ViewClientController.js | 57 ++++++ app/views/clients/viewclient.html | 162 +++++++++++++++++- 3 files changed, 223 insertions(+), 2 deletions(-) diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 2c1051c9..781da555 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -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", diff --git a/app/scripts/controllers/client/ViewClientController.js b/app/scripts/controllers/client/ViewClientController.js index 02c69d85..d59e0907 100644 --- a/app/scripts/controllers/client/ViewClientController.js +++ b/app/scripts/controllers/client/ViewClientController.js @@ -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; diff --git a/app/views/clients/viewclient.html b/app/views/clients/viewclient.html index 3029203e..d9f0c678 100755 --- a/app/views/clients/viewclient.html +++ b/app/views/clients/viewclient.html @@ -430,7 +430,7 @@ Actions + ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingNotClosed | filter:isSavings"> @@ -469,7 +469,165 @@ {{'label.heading.closedate' | translate}} + ng-repeat="savingaccount in clientAccounts.savingsAccounts | orderBy:'id':true | filter:isSavingClosed | filter:isSavings"> + + + {{savingaccount.accountNo}} + + {{savingaccount.productName}} + + {{savingaccount.timeline.closedOnDate | DateFormat}} + + + + + +
+
+ + + + +
+
+ + {{'label.heading.fixedaccoverview' | translate }} + +
+ + + + + + + + + + + + + + + + + +
{{'label.heading.accnum' | translate}}{{'label.heading.savingaccount' | translate}}{{'label.heading.lastActive' | translate}}{{'label.heading.balance' | translate}}Actions
+ + + {{savingaccount.accountNo}} + {{savingaccount.productName}}{{savingaccount.lastActiveTransactionDate|DateFormat}}{{savingaccount.accountBalance|number}} + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
{{'label.heading.accnum' | translate}}{{'label.heading.savingaccount' | translate}}{{'label.heading.closedate' | translate}}
+ + {{savingaccount.accountNo}} + {{savingaccount.productName}} + {{savingaccount.timeline.closedOnDate | DateFormat}} +
+
+ +
+
+ + + + +
+
+ + {{'label.heading.recurringaccoverview' | translate }} + +
+ + + + + + + + + + + + + + + + + +
{{'label.heading.accnum' | translate}}{{'label.heading.savingaccount' | translate}}{{'label.heading.lastActive' | translate}}{{'label.heading.balance' | translate}}Actions
+ + + {{savingaccount.accountNo}} + {{savingaccount.productName}}{{savingaccount.lastActiveTransactionDate|DateFormat}}{{savingaccount.accountBalance|number}} + + + + + + + + + + + + + + + +
+ + + + + + +
{{'label.heading.accnum' | translate}}{{'label.heading.savingaccount' | translate}}{{'label.heading.closedate' | translate}}
{{savingaccount.accountNo}}