From 9766644fb89b6c6a224ee59a9b12230f837d3c73 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Tue, 12 Dec 2023 20:45:20 -0600 Subject: [PATCH] Fixed Recurring Deposit views --- ...-recurring-deposits-account.component.html | 14 +---- ...te-recurring-deposits-account.component.ts | 8 --- ...t-recurring-deposit-account.component.html | 14 +---- ...dit-recurring-deposit-account.component.ts | 8 --- ...posits-account-charges-step.component.html | 3 +- ...deposits-account-charges-step.component.ts | 25 +++++---- ...osits-account-currency-step.component.html | 29 ---------- ...osits-account-currency-step.component.scss | 0 ...ts-account-currency-step.component.spec.ts | 25 --------- ...eposits-account-currency-step.component.ts | 54 ------------------- ...posits-account-details-step.component.html | 9 +++- ...deposits-account-details-step.component.ts | 7 ++- ...posits-account-preview-step.component.html | 4 +- ...osits-account-settings-step.component.html | 10 ++-- ...eposits-account-settings-step.component.ts | 2 + ...g-deposits-account-terms-step.component.ts | 10 +++- .../general-tab/general-tab.component.html | 31 ++++++++++- .../recurring-deposits.module.ts | 2 - ...posit-product-currency-step.component.html | 2 +- ...deposit-product-currency-step.component.ts | 2 +- ...ct-interest-rate-chart-step.component.html | 2 +- 21 files changed, 82 insertions(+), 179 deletions(-) delete mode 100644 src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html delete mode 100644 src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.scss delete mode 100644 src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.spec.ts delete mode 100644 src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.ts diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html index 2e154eb5a..fbdb835d4 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html @@ -32,17 +32,6 @@ - - - {{"labels.inputs.CURRENCY" | translate }} - - - - - - {{"labels.inputs.TERMS" | translate }} @@ -83,8 +72,7 @@ + [recurringDepositAccountFormValid]="recurringDepositAccountFormValid"> diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts index 80ba2731d..4598f4866 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts @@ -9,7 +9,6 @@ import { SettingsService } from 'app/settings/settings.service'; /** Step Components */ import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component'; import { RecurringDepositsAccountTermsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component'; -import { RecurringDepositsAccountCurrencyStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component'; import { RecurringDepositsAccountSettingsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component'; import { RecurringDepositsAccountChargesStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component'; import { Dates } from 'app/core/utils/dates'; @@ -26,7 +25,6 @@ export class CreateRecurringDepositsAccountComponent implements OnInit { /** Imports all the step component */ @ViewChild(RecurringDepositsAccountDetailsStepComponent, { static: true }) recurringDepositsAccountDetailsStep: RecurringDepositsAccountDetailsStepComponent; - @ViewChild(RecurringDepositsAccountCurrencyStepComponent, { static: true }) recurringDepositAccountCurrencyStep: RecurringDepositsAccountCurrencyStepComponent; @ViewChild(RecurringDepositsAccountTermsStepComponent, { static: true }) recurringDepositAccountTermsStep: RecurringDepositsAccountTermsStepComponent; @ViewChild(RecurringDepositsAccountSettingsStepComponent, { static: true }) recurringDepositAccountSettingsStep: RecurringDepositsAccountSettingsStepComponent; @ViewChild(RecurringDepositsAccountChargesStepComponent, { static: true }) recurringDepositAccountChargesStep: RecurringDepositsAccountChargesStepComponent; @@ -63,11 +61,6 @@ export class CreateRecurringDepositsAccountComponent implements OnInit { return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm; } - /** Get Recurring Deposit Account Currency Form Data */ - get recurringDepositAccountCurrencyForm() { - return this.recurringDepositAccountCurrencyStep.recurringDepositAccountCurrencyForm; - } - /** Get Recurring Deposit Account Terms Form Data */ get recurringDepositAccountTermsForm() { return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm; @@ -91,7 +84,6 @@ export class CreateRecurringDepositsAccountComponent implements OnInit { get recurringDepositAccountData() { return { ...this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails, - ...this.recurringDepositAccountCurrencyStep.recurringDepositAccountCurrency, ...this.recurringDepositAccountTermsStep.recurringDepositAccountTerms, ...this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings, ...this.recurringDepositAccountChargesStep.recurringDepositAccountCharges, 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 ee93efe0a..f1ffb5e32 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 @@ -32,17 +32,6 @@ - - - {{"labels.inputs.CURRENCY" | translate }} - - - - - - {{"labels.inputs.TERMS" | translate }} @@ -83,8 +72,7 @@ + [recurringDepositAccountFormValid]="recurringDepositAccountFormValidAndNotPristine"> diff --git a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts index 2a22cb951..81c057db1 100644 --- a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts +++ b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.ts @@ -9,7 +9,6 @@ import { SettingsService } from 'app/settings/settings.service'; /** Step Components */ import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component'; import { RecurringDepositsAccountTermsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component'; -import { RecurringDepositsAccountCurrencyStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component'; import { RecurringDepositsAccountSettingsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component'; import { RecurringDepositsAccountChargesStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component'; import { Dates } from 'app/core/utils/dates'; @@ -26,7 +25,6 @@ export class EditRecurringDepositAccountComponent implements OnInit { /** Imports all the step component */ @ViewChild(RecurringDepositsAccountDetailsStepComponent, { static: true }) recurringDepositsAccountDetailsStep: RecurringDepositsAccountDetailsStepComponent; - @ViewChild(RecurringDepositsAccountCurrencyStepComponent, { static: true }) recurringDepositAccountCurrencyStep: RecurringDepositsAccountCurrencyStepComponent; @ViewChild(RecurringDepositsAccountTermsStepComponent, { static: true }) recurringDepositAccountTermsStep: RecurringDepositsAccountTermsStepComponent; @ViewChild(RecurringDepositsAccountSettingsStepComponent, { static: true }) recurringDepositAccountSettingsStep: RecurringDepositsAccountSettingsStepComponent; @ViewChild(RecurringDepositsAccountChargesStepComponent, { static: true }) recurringDepositAccountChargesStep: RecurringDepositsAccountChargesStepComponent; @@ -63,11 +61,6 @@ export class EditRecurringDepositAccountComponent implements OnInit { return this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetailsForm; } - /** Get Recurring Deposit Account Currency Form Data */ - get recurringDepositAccountCurrencyForm() { - return this.recurringDepositAccountCurrencyStep.recurringDepositAccountCurrencyForm; - } - /** Get Recurring Deposit Account Terms Form Data */ get recurringDepositAccountTermsForm() { return this.recurringDepositAccountTermsStep.recurringDepositAccountTermsForm; @@ -97,7 +90,6 @@ export class EditRecurringDepositAccountComponent implements OnInit { get recurringDepositAccountData() { return { ...this.recurringDepositsAccountDetailsStep.recurringDepositAccountDetails, - ...this.recurringDepositAccountCurrencyStep.recurringDepositAccountCurrency, ...this.recurringDepositAccountTermsStep.recurringDepositAccountTerms, ...this.recurringDepositAccountSettingsStep.recurringDepositAccountSettings, ...this.recurringDepositAccountChargesStep.recurringDepositAccountCharges, 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 03178f3ca..f94f8ced4 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 @@ -3,8 +3,7 @@ {{"labels.inputs.Charge" | translate }} - + {{ charge.name }} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts index 57bfe4622..fbf26a75b 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts @@ -13,6 +13,7 @@ import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield- import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base'; import { SettingsService } from 'app/settings/settings.service'; import { Dates } from 'app/core/utils/dates'; +import { Charge, Currency } from 'app/shared/models/general.model'; /** * Recurring Deposit Account Charges Step @@ -39,6 +40,8 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC pristine = true; /** For Edit Recurring Deposits Account Form */ isChargesPatched = false; + /** Currency Code */ + currency: Currency | null = null; constructor(public dialog: MatDialog, private dateUtils: Dates, @@ -46,19 +49,23 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC } ngOnInit() { - this.currencyCode.valueChanges.subscribe(() => { - if (!this.isChargesPatched && this.recurringDepositsAccountTemplate.charges) { - this.chargesDataSource = this.recurringDepositsAccountTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || []; - this.isChargesPatched = true; - } else { - this.chargesDataSource = []; - } - }); + this.chargesDataSource = []; + if (this.recurringDepositsAccountTemplate.id && this.recurringDepositsAccountTemplate.charges) { + this.chargesDataSource = this.recurringDepositsAccountTemplate.charges.map((charge: any) => ({...charge, id: charge.chargeId})) || []; + } } ngOnChanges() { + if (this.currency == null) { + if (this.recurringDepositsAccountTemplate.currency) { + this.currency = this.recurringDepositsAccountTemplate.currency; + } else if (this.recurringDepositsAccountProductTemplate && this.recurringDepositsAccountProductTemplate.currency) { + this.currency = this.recurringDepositsAccountProductTemplate.currency; + } + } if (this.recurringDepositsAccountProductTemplate) { - this.chargeData = this.recurringDepositsAccountProductTemplate.chargeOptions; + this.chargeData = this.recurringDepositsAccountProductTemplate.chargeOptions + .filter((c: Charge) => c.currency.code === this.currency.code); } } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html deleted file mode 100644 index 8cea6bb9b..000000000 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.html +++ /dev/null @@ -1,29 +0,0 @@ -
- -
- - - {{"labels.inputs.Currency" | translate }} - - - - - - {{"labels.inputs.Decimal Places" | translate }} - - - -
- -
- - -
- -
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.scss b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.spec.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.spec.ts deleted file mode 100644 index d681ae386..000000000 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { RecurringDepositsAccountCurrencyStepComponent } from './recurring-deposits-account-currency-step.component'; - -describe('RecurringDepositsAccountCurrencyStepComponent', () => { - let component: RecurringDepositsAccountCurrencyStepComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ RecurringDepositsAccountCurrencyStepComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(RecurringDepositsAccountCurrencyStepComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.ts deleted file mode 100644 index 7ace55dae..000000000 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** Angular Imports */ -import { Component, OnInit, Input, OnChanges } from '@angular/core'; -import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms'; - -/** - * Recurring Deposit Account Currency Step - */ -@Component({ - selector: 'mifosx-recurring-deposits-account-currency-step', - templateUrl: './recurring-deposits-account-currency-step.component.html', - styleUrls: ['./recurring-deposits-account-currency-step.component.scss'] -}) -export class RecurringDepositsAccountCurrencyStepComponent implements OnInit, OnChanges { - - - @Input() recurringDepositsAccountTemplate: any; - @Input() recurringDepositsAccountProductTemplate: any; - - /** Recurring Deposit Account Currency Form */ - recurringDepositAccountCurrencyForm: UntypedFormGroup; - /** Currency Data */ - currencyData: any; - - constructor(private formBuilder: UntypedFormBuilder) { - this.createRecurringDepositAccountCurrencyForm(); - } - - ngOnInit() { - } - - ngOnChanges() { - if (this.recurringDepositsAccountProductTemplate) { - this.recurringDepositAccountCurrencyForm.patchValue({ - 'currencyCode': this.recurringDepositsAccountProductTemplate.currency.code, - 'decimalPlaces': this.recurringDepositsAccountProductTemplate.currency.decimalPlaces - }); - } - } - - createRecurringDepositAccountCurrencyForm() { - this.recurringDepositAccountCurrencyForm = this.formBuilder.group({ - 'currencyCode': [{ value: '', disabled: true }], - 'decimalPlaces': [{ value: '', disabled: true }] - }); - } - - /** - * Returns Recurring Deposits Account Currency Form - */ - get recurringDepositAccountCurrency() { - return this.recurringDepositAccountCurrencyForm.value; - } - -} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html index 7536104ae..853bb12b7 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html @@ -14,7 +14,7 @@
- + {{"labels.inputs.Submitted On" | translate }} @@ -25,7 +25,7 @@ - + {{"labels.inputs.Field Officer" | translate }} @@ -34,6 +34,11 @@ + + {{"labels.inputs.External id" | translate}} + + +
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts index b5a4b9108..d6b2fea2e 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts @@ -32,6 +32,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { /** Recurring Deposits Account Details Form */ recurringDepositAccountDetailsForm: UntypedFormGroup; + isProductSelected = false; + /** Recurring Deposits Account Template with product data */ @Output() recurringDepositsAccountProductTemplate = new EventEmitter(); @@ -56,6 +58,7 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { this.recurringDepositAccountDetailsForm.patchValue({ 'productId': this.recurringDepositsAccountTemplate.depositProductId, 'submittedOnDate': this.recurringDepositsAccountTemplate.timeline.submittedOnDate && new Date(this.recurringDepositsAccountTemplate.timeline.submittedOnDate), + 'externalId': this.recurringDepositsAccountTemplate.externalId }); } } @@ -68,7 +71,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { this.recurringDepositAccountDetailsForm = this.formBuilder.group({ 'productId': ['', Validators.required], 'submittedOnDate': ['', Validators.required], - 'fieldOfficerId': [''] + 'fieldOfficerId': [''], + 'externalId': [''] }); } @@ -81,6 +85,7 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { this.recurringDepositsService.getRecurringDepositsAccountTemplate(clientId, productId).subscribe((response: any) => { this.recurringDepositsAccountProductTemplate.emit(response); this.fieldOfficerData = response.fieldOfficerOptions; + this.isProductSelected = true; if (!this.isFieldOfficerPatched && this.recurringDepositsAccountTemplate.fieldOfficerId) { this.recurringDepositAccountDetailsForm.get('fieldOfficerId').patchValue(this.recurringDepositsAccountTemplate.fieldOfficerId); this.isFieldOfficerPatched = true; 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 c2655d627..a71a2aec6 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 @@ -77,9 +77,9 @@ fxFlex="60%">{{ recurringDepositAccountData.lockinPeriodFrequency + ' ' + (recurringDepositAccountData.lockinPeriodFrequencyType | find:recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}
-
+
{{"labels.inputs.Recurring Deposit Amount" | translate }}: - {{ recurringDepositAccountData?.mandatoryRecommendedDepositAmount}} + {{ recurringDepositAccountData.mandatoryRecommendedDepositAmount | 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 a03d2f701..50b58fcdd 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 @@ -38,7 +38,7 @@ {{"labels.inputs.Recurring Deposit Amount" | translate }} - {{"labels.inputs.Recurring Deposit Amount" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} + {{"labels.inputs.Recurring Deposit Amount" | translate }} {{ "labels.commons.is" | translate }} {{ "labels.commons.required" | translate }} @@ -77,7 +77,7 @@ {{"labels.inputs.Deposit Frequency" | translate }} - {{"labels.inputs.Deposit Frequency" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} + {{"labels.inputs.Deposit Frequency" | translate }} {{ "labels.commons.is" | translate }} {{ "labels.commons.required" | translate }} @@ -89,7 +89,7 @@ - {{"labels.inputs.Deposit Frequency Type" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} + {{"labels.inputs.Deposit Frequency Type" | translate }} {{ "labels.commons.is" | translate }} {{ "labels.commons.required" | translate }} @@ -103,7 +103,7 @@ {{"labels.inputs.Frequency" | translate }} - {{"labels.inputs.Minimum Deposit Term Frequency" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} + {{"labels.inputs.Minimum Deposit Term Frequency" | translate }} {{ "labels.commons.is" | translate }} {{ "labels.commons.required" | translate }} @@ -115,7 +115,7 @@ - {{"labels.inputs.Minimum Deposit Term Frequency Type" | translate }} {{ "labels.commons.is" |translate}} {{ "labels.commons.required" |translate}} + {{"labels.inputs.Minimum Deposit Term Frequency Type" | translate }} {{ "labels.commons.is" | translate }} {{ "labels.commons.required" | translate }} 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 8ca6e541a..7cfa10365 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 @@ -61,6 +61,8 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On '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 }); if (this.recurringDepositsAccountProductTemplate.withHoldTax) { this.recurringDepositAccountSettingsForm.addControl('withHoldTax', new UntypedFormControl(false)); diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts index 413454f77..7f385ff5c 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component.ts @@ -48,7 +48,7 @@ export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnCha ngOnInit() { this.maxDate = this.settingsService.businessDate; - if (this.recurringDepositsAccountTemplate.interestCompoundingPeriodType) { + if (this.recurringDepositsAccountTemplate.id) { this.recurringDepositAccountTermsForm.patchValue({ 'interestCompoundingPeriodType': this.recurringDepositsAccountTemplate.interestCompoundingPeriodType.id, 'interestPostingPeriodType': this.recurringDepositsAccountTemplate.interestPostingPeriodType.id, @@ -78,6 +78,14 @@ export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnCha this.interestPostingPeriodTypeData = this.recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions; this.interestCalculationTypeData = this.recurringDepositsAccountProductTemplate.interestCalculationTypeOptions; this.interestCalculationDaysInYearTypeData = this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions; + if (!this.recurringDepositsAccountTemplate.id) { + this.recurringDepositAccountTermsForm.patchValue({ + 'interestCompoundingPeriodType': this.recurringDepositsAccountProductTemplate.interestCompoundingPeriodType.id, + 'interestPostingPeriodType': this.recurringDepositsAccountProductTemplate.interestPostingPeriodType.id, + 'interestCalculationType': this.recurringDepositsAccountProductTemplate.interestCalculationType.id, + 'interestCalculationDaysInYearType': this.recurringDepositsAccountProductTemplate.interestCalculationDaysInYearType.id, + }); + } } /** 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 5749e2b76..f83563f52 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 @@ -3,9 +3,18 @@
-

{{"labels.heading.Account Details" | translate }}

+

{{"labels.inputs.Account Details" | translate }}

+ + + +
{{"labels.inputs.External Id" | translate }} + + + + {{"labels.inputs.Not Available" | translate}} +
{{"labels.inputs.Field Officer" | translate }} {{recurringDepositsAccountData.fieldOfficerName}}{{"labels.heading.Performance History" | translate }} + + + +
{{"labels.inputs.External Id" | translate }} + + + + {{"labels.inputs.Not Available" | translate}} +
{{"labels.inputs.Principal Amount" | translate }} @@ -98,6 +116,15 @@ *ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval"> + + + + - + diff --git a/src/app/deposits/recurring-deposits/recurring-deposits.module.ts b/src/app/deposits/recurring-deposits/recurring-deposits.module.ts index 3fa1bf42f..768b60a3b 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits.module.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits.module.ts @@ -17,7 +17,6 @@ import { DatatableTabsComponent } from './recurring-deposits-account-view/datata import { CreateRecurringDepositsAccountComponent } from './create-recurring-deposits-account/create-recurring-deposits-account.component'; import { RecurringDepositsAccountDetailsStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component'; import { RecurringDepositsAccountTermsStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-terms-step/recurring-deposits-account-terms-step.component'; -import { RecurringDepositsAccountCurrencyStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-currency-step/recurring-deposits-account-currency-step.component'; import { RecurringDepositsAccountSettingsStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component'; import { RecurringDepositsAccountInterestRateChartStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component'; import { RecurringDepositsAccountChargesStepComponent } from './recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component'; @@ -62,7 +61,6 @@ import { GeneralTabComponent } from './recurring-deposits-account-view/general-t CreateRecurringDepositsAccountComponent, RecurringDepositsAccountDetailsStepComponent, RecurringDepositsAccountTermsStepComponent, - RecurringDepositsAccountCurrencyStepComponent, RecurringDepositsAccountSettingsStepComponent, RecurringDepositsAccountInterestRateChartStepComponent, RecurringDepositsAccountChargesStepComponent, diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html index 8f06dd12b..9077235d5 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.html @@ -24,7 +24,7 @@ Currency in multiples of - + Currency in multiples of is required diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts index 353a3649f..327cb99d9 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-currency-step/recurring-deposit-product-currency-step.component.ts @@ -39,7 +39,7 @@ export class RecurringDepositProductCurrencyStepComponent implements OnInit { this.recurringDepositProductCurrencyForm = this.formBuilder.group({ 'currencyCode': ['', Validators.required], 'digitsAfterDecimal': ['', Validators.required], - 'inMultiplesOf': ['', Validators.required] + 'inMultiplesOf': [''] }); } diff --git a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html index 3013c7ff4..d674f6f84 100644 --- a/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html +++ b/src/app/products/recurring-deposit-products/recurring-deposit-product-stepper/recurring-deposit-product-interest-rate-chart-step/recurring-deposit-product-interest-rate-chart-step.component.html @@ -47,7 +47,7 @@ Description - +
{{"labels.inputs.External Id" | translate }} + + + + {{"labels.inputs.Not Available" | translate}} +
{{"labels.inputs.Date of Deposit" | translate }} @@ -128,7 +155,7 @@
{{"labels.inputs.Actual Available Balance" | translate }}{{ recurringDepositsAccountData.currency.displaySymbol }} {{ recurringDepositsAccountData.summary.accountBalance }}{{ recurringDepositsAccountData.summary.accountBalance | currency:currency.code:'symbol-narrow':'1.2-2'}}
{{"labels.inputs.Recurring Deposit Amount" | translate }}