From b23efd3e1c9c30f872fa77b5dd26085424e8cd54 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Sun, 9 Jun 2024 22:04:54 -0600 Subject: [PATCH] fix: Recurring Deposit accounts issues --- .../fixed-deposit-account-actions.resolver.ts | 2 + ...ed-deposits-account-actions.component.html | 1 + ...ixed-deposits-account-actions.component.ts | 4 +- ...d-deposits-cash-transaction.component.html | 88 +++++++++++++ ...d-deposits-cash-transaction.component.scss | 15 +++ ...eposits-cash-transaction.component.spec.ts | 23 ++++ ...xed-deposits-cash-transaction.component.ts | 123 ++++++++++++++++++ .../fixed-deposits/fixed-deposits.module.ts | 4 +- .../fixed-deposits/fixed-deposits.service.ts | 8 ++ ...t-recurring-deposit-account.component.html | 2 +- ...-recurring-deposits-account.component.html | 14 +- ...it-recurring-deposits-account.component.ts | 12 +- ...posits-account-charges-step.component.html | 6 +- ...nt-interest-rate-chart-step.component.html | 8 +- ...posits-account-preview-step.component.html | 32 ++--- ...osits-account-settings-step.component.html | 15 +-- ...eposits-account-settings-step.component.ts | 57 ++++---- ...deposits-account-terms-step.component.html | 8 +- .../general-tab/general-tab.component.html | 36 ++--- .../interest-rate-chart-tab.component.html | 8 +- .../recurring-deposits-buttons.config.ts | 25 ++-- .../edit-transaction.component.html | 26 ++-- .../edit-transaction.component.ts | 6 + 23 files changed, 402 insertions(+), 121 deletions(-) create mode 100644 src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html create mode 100644 src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.scss create mode 100644 src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.spec.ts create mode 100644 src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts diff --git a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts index 5273850b6..71e537970 100644 --- a/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts +++ b/src/app/deposits/fixed-deposits/common-resolvers/fixed-deposit-account-actions.resolver.ts @@ -35,6 +35,8 @@ export class FixedDepositsAccountActionsResolver implements Resolve { return this.savingsService.getSavingsChargeTemplateResource(fixedDepositAccountId); case 'Close': return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(fixedDepositAccountId); + case 'Withdrawal': + return this.fixedDepositsService.getFixedDepositsAccountTransactionTemplate(fixedDepositAccountId); default: return undefined; } diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html index ffb6adba9..57409d92b 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.html @@ -6,3 +6,4 @@ + diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts index ea3f464ea..01d912ee4 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-account-actions.component.ts @@ -23,6 +23,7 @@ export class FixedDepositsAccountActionsComponent { 'Add Charge': boolean 'Premature Close': boolean 'Withdrawn by Client': boolean + 'Withdrawal': boolean } = { 'Approve': false, 'Reject': false, @@ -32,7 +33,8 @@ export class FixedDepositsAccountActionsComponent { 'Undo Activation': false, 'Add Charge': false, 'Premature Close': false, - 'Withdrawn by Client': false + 'Withdrawn by Client': false, + 'Withdrawal': false }; /** diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html new file mode 100644 index 000000000..491fe7c9a --- /dev/null +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html @@ -0,0 +1,88 @@ +
+ + + +

{{'labels.menus.' + actionName | translate }} {{'labels.heading.Fixed Deposit Transactions' | translate}}

+ +
+ + + + + {{'labels.inputs.Transaction Date' | translate}} + + + + + {{'labels.inputs.Transaction Date' | translate}} {{ "labels.commons.is" | translate}} {{ "labels.commons.required" | translate}} + + + + + + + + {{'labels.inputs.Payment Type' | translate}} + + + {{ paymentType.name }} + + + + +
+ + +
+ {{'labels.inputs.Show Payment Details' | translate}} +
+
+
+
+ + + {{'labels.inputs.Account Number' | translate}} + + + + + {{'labels.inputs.Cheque' | translate}} + + + + + {{'labels.inputs.Routing Code' | translate}} + + + + + {{'labels.inputs.Receipt Number' | translate}} + + + + + {{'labels.inputs.Bank' | translate}} + + + + + {{'labels.inputs.Notes' | translate}} + + + + + + + + +
+ +
+ +
+ +
+ \ No newline at end of file diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.scss b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.scss new file mode 100644 index 000000000..1deab97fb --- /dev/null +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.scss @@ -0,0 +1,15 @@ +.expandcollapsebutton { + margin-top: -7px; +} + +.container { + max-width: 37rem; +} + +.right-input { + text-align: right; +} + +.right-label { + padding-right: 25px !important; +} \ No newline at end of file diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.spec.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.spec.ts new file mode 100644 index 000000000..4c5627a87 --- /dev/null +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FixedDepositsCashTransactionComponent } from './fixed-deposits-cash-transaction.component'; + +describe('FixedDepositsCashTransactionComponent', () => { + let component: FixedDepositsCashTransactionComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ FixedDepositsCashTransactionComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(FixedDepositsCashTransactionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts new file mode 100644 index 000000000..74d0c00d0 --- /dev/null +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts @@ -0,0 +1,123 @@ +import { Component, OnInit } from '@angular/core'; +import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; +import { FixedDepositsService } from '../../fixed-deposits.service'; +import { SettingsService } from 'app/settings/settings.service'; +import { Dates } from 'app/core/utils/dates'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Currency, PaymentType } from 'app/shared/models/general.model'; + +@Component({ + selector: 'mifosx-fixed-deposits-cash-transaction', + templateUrl: './fixed-deposits-cash-transaction.component.html', + styleUrls: ['./fixed-deposits-cash-transaction.component.scss'] +}) +export class FixedDepositsCashTransactionComponent implements OnInit { + + /** Minimum Due Date allowed. */ + minDate = new Date(2000, 0, 1); + /** Maximum Due Date allowed. */ + maxDate = new Date(); + /** Savings account transaction form. */ + accountTransactionForm: UntypedFormGroup; + /** savings account transaction payment options. */ + paymentTypeOptions: PaymentType[] = []; + /** Flag to enable payment details fields. */ + addPaymentDetailsFlag: Boolean = false; + /** transaction type flag to render required UI */ + transactionType: { deposit: boolean, withdrawal: boolean } = { deposit: false, withdrawal: false }; + /** transaction command for submit request */ + transactionCommand: string; + actionName: string; + /** saving account's Id */ + accountId: string; + currency: Currency; + + /** + * Retrieves the Saving Account transaction template data from `resolve`. + * @param {FormBuilder} formBuilder Form Builder. + * @param {FixedDepositsService} fixedDepositsService Fixed Deposit Service. + * @param {ActivatedRoute} route Activated Route. + * @param {Dates} dateUtils Date Utils. + * @param {Router} router Router for navigation. + * @param {SettingsService} settingsService Settings Service + */ + constructor(private formBuilder: UntypedFormBuilder, + private route: ActivatedRoute, + private router: Router, + private dateUtils: Dates, + private fixedDepositsService: FixedDepositsService, + private settingsService: SettingsService) { + this.route.data.subscribe((data: { fixedDepositsAccountActionData: any }) => { + this.currency = data.fixedDepositsAccountActionData.currency; + this.paymentTypeOptions = data.fixedDepositsAccountActionData.paymentTypeOptions; + }); + this.actionName = this.route.snapshot.params['name']; + this.transactionCommand = this.actionName.toLowerCase(); + this.transactionType[this.transactionCommand] = true; + this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId']; + } + + /** + * Creates the Saving account transaction form when component loads. + */ + ngOnInit() { + this.maxDate = this.settingsService.businessDate; + this.createSavingAccountTransactionForm(); + } + + /** + * Method to create the Saving Account Transaction Form. + */ + createSavingAccountTransactionForm() { + this.accountTransactionForm = this.formBuilder.group({ + 'transactionDate': [this.settingsService.businessDate, Validators.required], + 'transactionAmount': [0, Validators.required], + 'paymentTypeId': [''], + 'note': [''] + }); + } + + /** + * Method to add payment detail fields to the UI. + */ + addPaymentDetails() { + this.addPaymentDetailsFlag = !this.addPaymentDetailsFlag; + if (this.addPaymentDetailsFlag) { + this.accountTransactionForm.addControl('accountNumber', new UntypedFormControl('')); + this.accountTransactionForm.addControl('checkNumber', new UntypedFormControl('')); + this.accountTransactionForm.addControl('routingCode', new UntypedFormControl('')); + this.accountTransactionForm.addControl('receiptNumber', new UntypedFormControl('')); + this.accountTransactionForm.addControl('bankNumber', new UntypedFormControl('')); + } else { + this.accountTransactionForm.removeControl('accountNumber'); + this.accountTransactionForm.removeControl('checkNumber'); + this.accountTransactionForm.removeControl('routingCode'); + this.accountTransactionForm.removeControl('receiptNumber'); + this.accountTransactionForm.removeControl('bankNumber'); + } + } + + /** + * Method to submit the transaction details. + */ + submit() { + const savingAccountTransactionFormData = this.accountTransactionForm.value; + const locale = this.settingsService.language.code; + const dateFormat = this.settingsService.dateFormat; + const prevTransactionDate: Date = this.accountTransactionForm.value.transactionDate; + if (savingAccountTransactionFormData.transactionDate instanceof Date) { + savingAccountTransactionFormData.transactionDate = this.dateUtils.formatDate(prevTransactionDate, dateFormat); + } + const data = { + ...savingAccountTransactionFormData, + dateFormat, + locale + }; + delete data.note; + data['transactionAmount'] = data['transactionAmount'] * 1; + this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId, this.transactionCommand, data).subscribe(res => { + this.router.navigate(['../../transactions'], { relativeTo: this.route }); + }); + } + +} diff --git a/src/app/deposits/fixed-deposits/fixed-deposits.module.ts b/src/app/deposits/fixed-deposits/fixed-deposits.module.ts index bc2d7a2ea..e443a442f 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits.module.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits.module.ts @@ -38,6 +38,7 @@ import { FixedDepositAccountInterestRateChartStepComponent } from './fixed-depos import { FixedDepositAccountPreviewStepComponent } from './fixed-deposit-account-stepper/fixed-deposit-account-preview-step/fixed-deposit-account-preview-step.component'; import { EditFixedDepositAccountComponent } from './edit-fixed-deposit-account/edit-fixed-deposit-account.component'; import { GeneralTabComponent } from './fixed-deposit-account-view/general-tab/general-tab.component'; +import { FixedDepositsCashTransactionComponent } from './fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component'; /** * Fixed Deposits Module @@ -75,7 +76,8 @@ import { GeneralTabComponent } from './fixed-deposit-account-view/general-tab/ge FixedDepositAccountInterestRateChartStepComponent, FixedDepositAccountPreviewStepComponent, EditFixedDepositAccountComponent, - GeneralTabComponent + GeneralTabComponent, + FixedDepositsCashTransactionComponent ], imports: [ SharedModule, diff --git a/src/app/deposits/fixed-deposits/fixed-deposits.service.ts b/src/app/deposits/fixed-deposits/fixed-deposits.service.ts index 827c50f9c..d2edd1680 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits.service.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits.service.ts @@ -76,6 +76,14 @@ export class FixedDepositsService { return this.http.get(`/fixeddepositaccounts/${accountId}/template`, { params: httpParams }); } + /** + * @param {string} accountId Fixed Deposits Account Id + * @returns {Observable} + */ + getFixedDepositsAccountTransactionTemplate(accountId: string): Observable { + return this.http.get(`/fixeddepositaccounts/${accountId}/transactions/template`); + } + /** * @param clientId Client Id assosciated with fixed deposits account. * @returns {Observable} Fixed Deposits account template. diff --git a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html index f1ffb5e32..d2a73f68e 100644 --- a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html +++ b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html @@ -47,7 +47,7 @@ {{"labels.inputs.SETTINGS" | translate }} - diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html index e3eb8bebc..b0b3ff1ef 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html @@ -1,6 +1,7 @@
+

{{'labels.menus.' + actionName | translate }} {{'labels.heading.Recurring Deposit Transactions' | translate}}

@@ -19,15 +20,10 @@ - - {{"labels.inputs.Transaction Amount" | translate}} - {{ currency.code }} - - - - {{"labels.inputs.Transaction Amount" | translate}} {{"labels.commons.is" | translate}} {{"labels.commons.required" | translate}} - - + + {{"labels.inputs.Payment Type Id" | translate }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts index 62ca4b170..151c0aa93 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts @@ -39,6 +39,9 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { depositRecurringDepositForm: UntypedFormGroup; action: string; + actionName: string; + transactionCommand: string; + transactionType: { deposit: boolean, withdrawal: boolean } = { deposit: false, withdrawal: false }; /** * Retrieves action details transactions template data from `resolve` @@ -64,8 +67,10 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { this.transactionAmount = this.transactionAmount + this.outstandingChargeAmount; } }); - const name: string = this.route.snapshot.params['name']; - this.action = name.toLowerCase(); + this.actionName = this.route.snapshot.params['name']; + this.action = this.actionName.toLowerCase(); + this.transactionCommand = this.action.toLowerCase(); + this.transactionType[this.transactionCommand] = true; this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId']; } @@ -80,7 +85,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { createdepositRecurringDepositForm() { this.depositRecurringDepositForm = this.formBuilder.group({ 'transactionDate': [new Date(), Validators.required], - 'transactionAmount': [this.transactionAmount, Validators.required], + 'transactionAmount': [0.0, Validators.required], 'paymentTypeId': ['', Validators.required], 'note': '' }); @@ -131,6 +136,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { }; delete data['note']; + data['transactionAmount'] = data['transactionAmount'] * 1; this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId, this.action, data).subscribe(() => { this.router.navigate(['../../'], { relativeTo: this.route }); }); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html index f94f8ced4..e3123e4f9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.html @@ -29,14 +29,14 @@ {{"labels.inputs.Type" | translate }} - {{ charge.chargeCalculationType.value }} + {{ charge.chargeCalculationType.value | translateKey:'catalogs' }} {{"labels.inputs.Amount" | translate }} - {{ charge.amount }} + {{ charge.amount | formatNumber }} @@ -46,7 +46,7 @@ {{"labels.inputs.Collected On" | translate }} - {{ charge.chargeTimeType.value }} + {{ charge.chargeTimeType.value | translateKey:'catalogs' }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html index a87219f89..0ce4952a4 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html @@ -31,17 +31,17 @@ {{"labels.inputs.Period" | translate }} - {{chartSlab.fromPeriod}}-{{chartSlab.toPeriod}} {{chartSlab.periodType.value}} + {{chartSlab.fromPeriod}} - {{chartSlab.toPeriod}} {{chartSlab.periodType.value | translateKey:'catalogs'}} {{"labels.inputs.Amount Range" | translate }} - {{chartSlab.amountRangeFrom}}-{{chartSlab.amountRangeTo}} + {{chartSlab.amountRangeFrom | formatNumber}} - {{chartSlab.amountRangeTo | formatNumber }} {{"labels.inputs.Interest" | translate }} - {{ chartSlab.annualInterestRate }} + {{ chartSlab.annualInterestRate | formatNumber }} % @@ -120,7 +120,7 @@ {{"labels.inputs.Interest" | translate }} - {{ incentive.amount }} + {{ incentive.amount | formatNumber }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html index 4595e43db..cc2f76d6c 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html @@ -46,25 +46,25 @@
{{"labels.inputs.Interest Compounding Period" | translate }}: {{ recurringDepositAccountData.interestCompoundingPeriodType | find:recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }} + fxFlex="60%">{{ recurringDepositAccountData.interestCompoundingPeriodType | find:recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' | translateKey:'catalogs' }}
{{"labels.inputs.Interest Posting Period" | translate }}: {{ recurringDepositAccountData.interestPostingPeriodType | find:recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' }} + fxFlex="60%">{{ recurringDepositAccountData.interestPostingPeriodType | find:recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' | translateKey:'catalogs' }}
{{"labels.inputs.Interest Calculated using" | translate }}: {{ recurringDepositAccountData.interestCalculationType | find:recurringDepositsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' }} + fxFlex="60%">{{ recurringDepositAccountData.interestCalculationType | find:recurringDepositsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' | translateKey:'catalogs' }}
{{"labels.inputs.Days in Year" | translate }}: {{ recurringDepositAccountData.interestCalculationDaysInYearType | find:recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }} + fxFlex="60%">{{ recurringDepositAccountData.interestCalculationDaysInYearType | find:recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' | translateKey:'catalogs' }}

{{"labels.heading.Settings" | translate }}

@@ -74,7 +74,7 @@
{{"labels.inputs.Lock-in Period" | translate }}: {{ recurringDepositAccountData.lockinPeriodFrequency + ' ' + (recurringDepositAccountData.lockinPeriodFrequencyType | find:recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }} + fxFlex="60%">{{ recurringDepositAccountData.lockinPeriodFrequency}} {{(recurringDepositAccountData.lockinPeriodFrequencyType | find:recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') | translateKey:'catalogs'}}
@@ -85,12 +85,12 @@
{{"labels.inputs.Deposit Period" | translate }}: {{ recurringDepositAccountData.depositPeriod + ' ' + (recurringDepositAccountData.depositPeriodFrequencyId | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeData:'id':'value') }} + fxFlex="60%">{{ recurringDepositAccountData.depositPeriod}} {{recurringDepositAccountData.depositPeriodFrequencyId | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions:'id':'value' | translateKey:'catalogs'}}
{{"labels.inputs.Deposit Frequency Same as Group/Center meeting" | translate }}: - {{ recurringDepositsAccountProductTemplate.isCalendarInherited === true ? 'Yes' : 'No' }} + {{ recurringDepositsAccountProductTemplate.isCalendarInherited | yesNo }}
@@ -102,7 +102,7 @@
{{"labels.inputs.Deposit Frequency" | translate }}: {{ recurringDepositAccountData.recurringFrequency + ' ' + (recurringDepositAccountData.recurringFrequencyType | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeData:'id':'value')}} + fxFlex="60%">{{ recurringDepositAccountData.recurringFrequency}} {{(recurringDepositAccountData.recurringFrequencyType | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions:'id':'value') | translateKey:'catalogs'}}
@@ -110,19 +110,19 @@
{{"labels.inputs.Minimum Deposit Term" | translate }}: {{ (recurringDepositsAccountProductTemplate.minDepositTerm ? recurringDepositsAccountProductTemplate.minDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.value: '') }} + fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.minDepositTerm ? recurringDepositsAccountProductTemplate.minDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.value: '') | translateKey:'catalogs'}}
{{"labels.inputs.In Multiples Of" | translate }}: {{ (recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm ? recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value: '') }} + fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm ? recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value: '') | translateKey:'catalogs'}}
{{"labels.inputs.Maximum Deposit Term" | translate }} {{ (recurringDepositsAccountProductTemplate.maxDepositTerm ? recurringDepositsAccountProductTemplate.maxDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.value: '') }} + fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.maxDepositTerm ? recurringDepositsAccountProductTemplate.maxDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.value: '') | translateKey:'catalogs'}}
@@ -163,17 +163,17 @@ {{"labels.inputs.Period" | translate }} - {{chartSlab.fromPeriod}}-{{chartSlab.toPeriod}} {{chartSlab.periodType.value}} + {{chartSlab.fromPeriod}} - {{chartSlab.toPeriod}} {{chartSlab.periodType.value | translateKey:'catalogs'}} {{"labels.inputs.Amount Range" | translate }} - {{chartSlab.amountRangeFrom}}-{{chartSlab.amountRangeTo}} + {{chartSlab.amountRangeFrom | formatNumber}} - {{chartSlab.amountRangeTo | formatNumber}} {{"labels.inputs.Interest" | translate }} - {{ chartSlab.annualInterestRate }} + {{ chartSlab.annualInterestRate | formatNumber }} % @@ -292,14 +292,14 @@ {{"labels.inputs.Type" | translate }} - {{ charge.chargeCalculationType.value }} + {{ charge.chargeCalculationType.value | translateKey:'catalogs' }} {{"labels.inputs.Amount" | translate }} - {{ charge.amount }} + {{ charge.amount | formatNumber }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html index 50b58fcdd..1fa15c626 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html @@ -27,7 +27,7 @@ - {{ lockinPeriodFrequencyType.value }} + {{ lockinPeriodFrequencyType.value | translateKey:'catalogs' }} @@ -53,7 +53,7 @@ {{"labels.inputs.Type" | translate }} - {{ periodFrequencyType.value }} + {{ periodFrequencyType.value | translateKey:'catalogs' }} @@ -85,7 +85,7 @@ {{"labels.inputs.Type" | translate }} - {{ periodFrequencyType.value }} + {{ periodFrequencyType.value | translateKey:'catalogs' }} @@ -94,7 +94,6 @@ -

{{"labels.heading.Minimum Deposit Term" | translate }}

@@ -111,7 +110,7 @@ {{"labels.inputs.Frequency Type" | translate }} - {{ periodFrequencyType.value }} + {{ periodFrequencyType.value | translateKey:'catalogs' }} @@ -130,7 +129,7 @@ {{"labels.inputs.Type" | translate }} - {{ periodFrequencyType.value }} + {{ periodFrequencyType.value | translateKey:'catalogs' }} @@ -146,7 +145,7 @@ {{"labels.inputs.Type" | translate }} - {{ periodFrequencyType.value }} + {{ periodFrequencyType.value | translateKey:'catalogs' }} @@ -169,7 +168,7 @@ - {{ preClosurePenalInterestOnType.value }} + {{ preClosurePenalInterestOnType.value | translateKey:'catalogs' }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts index 7cfa10365..6a0dc0339 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.ts @@ -15,6 +15,7 @@ import { SettingsService } from 'app/settings/settings.service'; }) export class RecurringDepositsAccountSettingsStepComponent implements OnInit, OnChanges { + @Input() isNew = true; @Input() recurringDepositsAccountTemplate: any; @Input() recurringDepositsAccountProductTemplate: any; @@ -44,32 +45,36 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On } ngOnChanges() { - if (this.recurringDepositsAccountProductTemplate) { + const recurringDepositsAccount: any = this.isNew ? this.recurringDepositsAccountProductTemplate : this.recurringDepositsAccountTemplate; + if (recurringDepositsAccount) { this.recurringDepositAccountSettingsForm.patchValue({ - 'isMandatoryDeposit': this.recurringDepositsAccountProductTemplate.isMandatoryDeposit, - 'adjustAdvanceTowardsFuturePayments': this.recurringDepositsAccountProductTemplate.adjustAdvanceTowardsFuturePayments, - 'allowWithdrawal': this.recurringDepositsAccountProductTemplate.allowWithdrawal, - 'lockinPeriodFrequency': this.recurringDepositsAccountProductTemplate.lockinPeriodFrequency, - 'lockinPeriodFrequencyType': this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyType ? this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyType.id : '', - 'minDepositTerm': this.recurringDepositsAccountProductTemplate.minDepositTerm, - 'minDepositTermTypeId': this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.id : '', - 'inMultiplesOfDepositTerm': this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm, - 'inMultiplesOfDepositTermTypeId': this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id : '', - 'maxDepositTerm': this.recurringDepositsAccountProductTemplate.maxDepositTerm, - 'maxDepositTermTypeId': this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.id : '', - 'preClosurePenalApplicable': this.recurringDepositsAccountProductTemplate.preClosurePenalApplicable, - 'preClosurePenalInterest': this.recurringDepositsAccountProductTemplate.preClosurePenalInterest, - 'preClosurePenalInterestOnTypeId': this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnType ? this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnType.id : '', - 'minBalanceForInterestCalculation': this.recurringDepositsAccountProductTemplate.minBalanceForInterestCalculation, - 'depositPeriod': this.recurringDepositsAccountProductTemplate.minDepositTerm, - 'depositPeriodFrequencyId': this.recurringDepositsAccountProductTemplate.minDepositTermType.id + 'isMandatoryDeposit': recurringDepositsAccount.isMandatoryDeposit, + 'adjustAdvanceTowardsFuturePayments': recurringDepositsAccount.adjustAdvanceTowardsFuturePayments, + 'allowWithdrawal': recurringDepositsAccount.allowWithdrawal, + 'lockinPeriodFrequency': recurringDepositsAccount.lockinPeriodFrequency, + 'lockinPeriodFrequencyType': recurringDepositsAccount.lockinPeriodFrequencyType ? recurringDepositsAccount.lockinPeriodFrequencyType.id : '', + 'minDepositTerm': recurringDepositsAccount.minDepositTerm, + 'minDepositTermTypeId': recurringDepositsAccount.minDepositTermType ? recurringDepositsAccount.minDepositTermType.id : '', + 'inMultiplesOfDepositTerm': recurringDepositsAccount.inMultiplesOfDepositTerm, + 'inMultiplesOfDepositTermTypeId': recurringDepositsAccount.inMultiplesOfDepositTermType ? recurringDepositsAccount.inMultiplesOfDepositTermType.id : '', + 'maxDepositTerm': recurringDepositsAccount.maxDepositTerm, + 'maxDepositTermTypeId': recurringDepositsAccount.maxDepositTermType ? recurringDepositsAccount.maxDepositTermType.id : '', + 'preClosurePenalApplicable': recurringDepositsAccount.preClosurePenalApplicable, + 'preClosurePenalInterest': recurringDepositsAccount.preClosurePenalInterest, + 'preClosurePenalInterestOnTypeId': recurringDepositsAccount.preClosurePenalInterestOnType ? recurringDepositsAccount.preClosurePenalInterestOnType.id : '', + 'minBalanceForInterestCalculation': recurringDepositsAccount.minBalanceForInterestCalculation, + 'depositPeriod': recurringDepositsAccount.minDepositTerm, + 'depositPeriodFrequencyId': recurringDepositsAccount.minDepositTermType.id, + 'expectedFirstDepositOnDate': recurringDepositsAccount.expectedFirstDepositOnDate && new Date(recurringDepositsAccount.expectedFirstDepositOnDate), + 'recurringFrequency': recurringDepositsAccount.recurringFrequency, + 'recurringFrequencyType': recurringDepositsAccount.recurringFrequencyType ? recurringDepositsAccount.recurringFrequencyType.id : '' }); - if (this.recurringDepositsAccountProductTemplate.withHoldTax) { + if (recurringDepositsAccount.withHoldTax) { this.recurringDepositAccountSettingsForm.addControl('withHoldTax', new UntypedFormControl(false)); this.recurringDepositAccountSettingsForm.get('withHoldTax').valueChanges.subscribe((value: boolean) => { if (value) { this.recurringDepositAccountSettingsForm.addControl('taxGroupId', new UntypedFormControl({ value: '', disabled: true })); - this.recurringDepositAccountSettingsForm.get('taxGroupId').patchValue(this.recurringDepositsAccountProductTemplate.taxGroup && this.recurringDepositsAccountProductTemplate.taxGroup.name); + this.recurringDepositAccountSettingsForm.get('taxGroupId').patchValue(recurringDepositsAccount.taxGroup && recurringDepositsAccount.taxGroup.name); } else { this.recurringDepositAccountSettingsForm.removeControl('taxGroupId'); } @@ -78,8 +83,8 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On } else { this.recurringDepositAccountSettingsForm.removeControl('withHoldTax'); } - this.taxGroup = this.recurringDepositsAccountProductTemplate.taxGroup; - this.setOptions(); + this.taxGroup = recurringDepositsAccount.taxGroup; + this.setOptions(recurringDepositsAccount); } } @@ -127,10 +132,10 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On /** * Sets all select dropdown options. */ - setOptions() { - this.lockinPeriodFrequencyTypeData = this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions; - this.periodFrequencyTypeData = this.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions; - this.preClosurePenalInterestOnTypeData = this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions; + setOptions(recurringDepositsAccount: any) { + this.lockinPeriodFrequencyTypeData = recurringDepositsAccount.lockinPeriodFrequencyTypeOptions; + this.periodFrequencyTypeData = recurringDepositsAccount.periodFrequencyTypeOptions; + this.preClosurePenalInterestOnTypeData = recurringDepositsAccount.preClosurePenalInterestOnTypeOptions; } /** diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html index 389ad6ede..3d1ba4f6f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.html @@ -7,7 +7,7 @@ - {{ interestCompoundingPeriodType.value }} + {{ interestCompoundingPeriodType.value | translateKey:'catalogs' }} @@ -20,7 +20,7 @@ - {{ interestPostingPeriodType.value }} + {{ interestPostingPeriodType.value | translateKey:'catalogs' }} @@ -33,7 +33,7 @@ - {{ interestCalculationType.value }} + {{ interestCalculationType.value | translateKey:'catalogs' }} @@ -46,7 +46,7 @@ - {{ interestCalculationDaysInYearType.value }} + {{ interestCalculationDaysInYearType.value | translateKey:'catalogs' }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html index 242a9dcd5..96584c9c2 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/general-tab/general-tab.component.html @@ -38,9 +38,9 @@ {{"labels.inputs.Deposit Frequency" | translate }} - {{recurringDepositsAccountData.recurringFrequency}} -  {{recurringDepositsAccountData.recurringFrequencyType.value}} - + {{recurringDepositsAccountData.recurringFrequency}} + {{recurringDepositsAccountData.recurringFrequencyType.value | translateKey:'catalogs'}} + {{"labels.inputs.Balance Required for Interest Calculation" | translate }} @@ -189,13 +189,13 @@ {{"labels.inputs.Rate of Interest" | translate }} - - {{recurringDepositsAccountData.nominalAnnualInterestRate}} + + {{recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber}} % {{"labels.inputs.Maturity Amount" | translate }} - + {{ recurringDepositsAccountData.maturityAmount | currency:currency.code:'symbol-narrow':'1.2-2'}} @@ -217,7 +217,7 @@ {{"labels.inputs.Deposits Frequency" | translate }} - {{ recurringDepositsAccountData.recurringFrequency }} {{ recurringDepositsAccountData.recurringFrequencyType.value }} + {{ recurringDepositsAccountData.recurringFrequency }} {{ recurringDepositsAccountData.recurringFrequencyType.value | translateKey:'catalogs' }} @@ -242,28 +242,28 @@ {{"labels.inputs.Interest Rate" | translate }} - {{recurringDepositsAccountData.nominalAnnualInterestRate}}% + {{recurringDepositsAccountData.nominalAnnualInterestRate | formatNumber}} % {{"labels.inputs.Interest Compounding Period" | translate }} - {{recurringDepositsAccountData.interestCompoundingPeriodType.value}} + {{recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey:'catalogs'}} {{"labels.inputs.Interest Posting Period" | translate }} - {{recurringDepositsAccountData.interestPostingPeriodType.value}} + {{recurringDepositsAccountData.interestPostingPeriodType.value | translateKey:'catalogs'}} {{"labels.inputs.Interest calculated using" | translate }} - {{recurringDepositsAccountData.interestCalculationType.value}} + {{recurringDepositsAccountData.interestCalculationType.value | translateKey:'catalogs'}} {{"labels.inputs.Days in Year" | translate }} - {{recurringDepositsAccountData.interestCalculationDaysInYearType.value}} + {{recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey:'catalogs'}} {{"labels.inputs.Pre-closure penal Interest (less)" | translate }} {{recurringDepositsAccountData.preClosurePenalInterest}} % on - {{recurringDepositsAccountData.preClosurePenalInterestOnType.value}} + {{recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey:'catalogs'}} @@ -275,24 +275,24 @@ {{"labels.inputs.Interest Compounding Period" | translate }} - {{recurringDepositsAccountData.interestCompoundingPeriodType.value}} + {{recurringDepositsAccountData.interestCompoundingPeriodType.value | translateKey:'catalogs'}} {{"labels.inputs.Interest Posting Period" | translate }} - {{recurringDepositsAccountData.interestPostingPeriodType.value}} + {{recurringDepositsAccountData.interestPostingPeriodType.value | translateKey:'catalogs'}} {{"labels.inputs.Interest calculated using" | translate }} - {{recurringDepositsAccountData.interestCalculationType.value}} + {{recurringDepositsAccountData.interestCalculationType.value | translateKey:'catalogs'}} {{"labels.inputs.Days in Year" | translate }} - {{recurringDepositsAccountData.interestCalculationDaysInYearType.value}} + {{recurringDepositsAccountData.interestCalculationDaysInYearType.value | translateKey:'catalogs'}} {{"labels.inputs.Pre-closure penal Interest (less)" | translate }} {{recurringDepositsAccountData.preClosurePenalInterest}} % on - {{recurringDepositsAccountData.preClosurePenalInterestOnType.value}} + {{recurringDepositsAccountData.preClosurePenalInterestOnType.value | translateKey:'catalogs'}} {{"labels.inputs.Witdhold Tax Group" | translate }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.html index 3997655a7..3f2982a0f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/interest-rate-chart-tab/interest-rate-chart-tab.component.html @@ -13,17 +13,17 @@ {{"labels.inputs.Period" | translate }} - {{chartSlab.fromPeriod}}-{{chartSlab.toPeriod}} {{chartSlab.periodType.value}} + {{chartSlab.fromPeriod}} - {{chartSlab.toPeriod}} {{chartSlab.periodType.value | translateKey:'catalogs'}} {{"labels.inputs.Amount Range" | translate }} - {{chartSlab.amountRangeFrom}}-{{chartSlab.amountRangeTo}} + {{chartSlab.amountRangeFrom | formatNumber}} - {{chartSlab.amountRangeTo | formatNumber}} {{"labels.inputs.Interest" | translate }} - {{ chartSlab.annualInterestRate }} + {{ chartSlab.annualInterestRate | formatNumber }} % @@ -102,7 +102,7 @@ {{"labels.inputs.Interest" | translate }} - {{ incentive.amount }} + {{ incentive.amount | formatNumber}} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-buttons.config.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-buttons.config.ts index 751226441..6715cdf0f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-buttons.config.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/recurring-deposits-buttons.config.ts @@ -32,17 +32,22 @@ export class RecurringDepositsButtonsConfiguration { this.buttonsArray = [ { name: 'Deposit', - icon: 'arrow-up', + icon: 'fa fa-arrow-up', taskPermissionName: 'DEPOSIT_RECURRINGDEPOSITACCOUNT' }, + { + name: 'Withdrawal', + icon: 'fa fa-arrow-down', + taskPermissionName: 'WITHDRAWAL_RECURRINGDEPOSITACCOUNT' + }, { name: 'Premature Close', - icon: 'arrow-left', + icon: 'fa fa-arrow-left', taskPermissionName: 'PREMATURECLOSE_RECURRINGDEPOSITACCOUNT' }, { name: 'Calculate Interest', - icon: 'calculator', + icon: 'fa fa-calculator', taskPermissionName: 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT' }, { @@ -56,12 +61,12 @@ export class RecurringDepositsButtonsConfiguration { this.buttonsArray = [ { name: 'Modify Application', - icon: 'edit', + icon: 'fa fa-edit', taskPermissionName: 'UPDATE_RECURRINGDEPOSITACCOUNT' }, { name: 'Approve', - icon: 'check', + icon: 'fa fa-check', taskPermissionName: 'APPROVE_RECURRINGDEPOSITACCOUNT' } ]; @@ -70,12 +75,12 @@ export class RecurringDepositsButtonsConfiguration { this.buttonsArray = [ { name: 'Undo Approval', - icon: 'undo', + icon: 'fa fa-undo', taskPermissionName: 'APPROVALUNDO_RECURRINGDEPOSITACCOUNT' }, { name: 'Activate', - icon: 'check', + icon: 'fa fa-check', taskPermissionName: 'ACTIVATE_RECURRINGDEPOSITACCOUNT' } ]; @@ -84,17 +89,17 @@ export class RecurringDepositsButtonsConfiguration { this.buttonsArray = [ { name: 'Close', - icon: 'arrow-right', + icon: 'fa fa-arrow-right', taskPermissionName: 'CLOSE_RECURRINGDEPOSITACCOUNT' }, { name: 'Calculate Interest', - icon: 'calculator', + icon: 'fa fa-calculator', taskPermissionName: 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT' }, { name: 'Post Interest', - icon: 'money', + icon: 'fa fa-money', taskPermissionName: 'POSTINTEREST_RECURRINGDEPOSITACCOUNT' } ]; diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html index e6b4d8339..91e05a5e6 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.html @@ -17,13 +17,10 @@ - - {{"labels.inputs.Transaction Amount" | translate }} - - - {{"labels.inputs.Transaction Amount" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} - - + + {{"labels.inputs.Payment Type" | translate }} @@ -33,12 +30,15 @@ - -
- {{"labels.inputs.Show Payment Details" | translate }} - + +
+ + +
+ {{'labels.inputs.Show Payment Details' | translate}} +
+
+
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts index 53b1f73f9..61df731f0 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-view/transactions-tab/edit-transaction/edit-transaction.component.ts @@ -7,6 +7,7 @@ import { Dates } from 'app/core/utils/dates'; /** Custom Services */ import { RecurringDepositsService } from 'app/deposits/recurring-deposits/recurring-deposits.service'; import { SettingsService } from 'app/settings/settings.service'; +import { Currency } from 'app/shared/models/general.model'; /** * Edit Transaction component. @@ -38,6 +39,7 @@ export class EditTransactionComponent implements OnInit { recurringDepositAccountId: string; /** Transaction Template */ transactionTemplateData: any; + currency: Currency | null = null; /** * Retrieves the Recurring Deposit Account transaction template data from `resolve`. @@ -56,6 +58,9 @@ export class EditTransactionComponent implements OnInit { private settingsService: SettingsService, ) { this.route.data.subscribe((data: { recurringDepositsAccountTransactionTemplate: any }) => { this.transactionTemplateData = data.recurringDepositsAccountTransactionTemplate; + if (this.transactionTemplateData.currency) { + this.currency = this.transactionTemplateData.currency; + } this.paymentTypeOptions = this.transactionTemplateData.paymentTypeOptions; }); this.recurringDepositAccountId = this.route.parent.parent.snapshot.params['recurringDepositAccountId']; @@ -121,6 +126,7 @@ export class EditTransactionComponent implements OnInit { dateFormat, locale }; + data['transactionAmount'] = data['transactionAmount'] * 1; this.recurringDepositsService.executeRecurringDepositsAccountTransactionsCommand(this.recurringDepositAccountId, 'modify', data, this.transactionTemplateData.id) .subscribe(res => { this.router.navigate(['../'], { relativeTo: this.route });