fix: add recurring and fixed account table in clients view section (#956)

Fixes: #955
This commit is contained in:
Muskan Khedia
2020-06-30 10:21:48 +05:30
committed by GitHub
parent ce8ca77ad7
commit 7bd84899cf
7 changed files with 300 additions and 31 deletions
+14 -1
View File
@@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from '@angular/core';
})
export class AccountsFilterPipe implements PipeTransform {
transform(accounts: any, type: any, status: any): any {
transform(accounts: any, type: any, status: any, checkSavings: any): any {
if (accounts) {
if (type === 'loan') {
if (status === 'closed') {
@@ -27,6 +27,19 @@ export class AccountsFilterPipe implements PipeTransform {
}
}
if (type === 'saving') {
if (checkSavings === 'isFixed') {
accounts = accounts.filter((account: any) => {
return (account.depositType.value === 'Fixed Deposit');
});
} else if (checkSavings === 'isRecurring') {
accounts = accounts.filter((account: any) => {
return (account.depositType.value === 'Recurring Deposit');
});
} else if (checkSavings === 'isSavings') {
accounts = accounts.filter((account: any) => {
return (account.depositType.value === 'Savings');
});
}
if (status === 'closed') {
accounts = accounts.filter((account: any) => {
return (account.status.code === 'savingsAccountStatusType.withdrawn.by.applicant' ||