diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html index 239c749bd..504d06752 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.html @@ -34,6 +34,35 @@ + +
+
+ + Renewal +
+
+
+ ℹ️ + + Leave blank for an FD on this product to keep renewing instantly, the same night it matures, as before. Set a + number of days and a matured "auto renew" FD instead waits on the FD Dashboard for that many days for staff to + renew it manually -- backdated to the original maturity date within that window, or from the day it is + actually renewed (with gap-period interest at the linked Savings account's rate) once the window has passed. + +
+
+ + Renewal Grace Period + + Days + @if (fixedDepositProductTermsForm.get('renewalGracePeriodDays').hasError('min')) { + Renewal Grace Period must be zero or greater + } + +
+
+
+
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts index 11061126a..5824a1591 100644 --- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts +++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-terms-step/fixed-deposit-product-terms-step.component.ts @@ -74,7 +74,6 @@ export class FixedDepositProductTermsStepComponent implements OnInit, OnChanges this.periodFrequencyData = this.fixedDepositProductsTemplate.periodFrequencyTypeOptions || []; const isEditing = !!this.fixedDepositProductsTemplate.id; - const defaultPeriodTypeId = this.periodFrequencyData[0]?.id ?? null; const defaultAveragePeriod = this.averagePeriodData[0]?.value || 'Monthly'; const savedEnumTypeId = this.fixedDepositProductsTemplate.interestCalculationType?.id || this.interestCalculationTypeData?.[0]?.id || 1; @@ -85,12 +84,17 @@ export class FixedDepositProductTermsStepComponent implements OnInit, OnChanges : (this.interestCalculationTypeOptionData?.[0]?.id ?? null); this.fixedDepositProductTermsForm.patchValue({ - minDepositTerm: this.fixedDepositProductsTemplate.minDepositTerm ?? 1, - minDepositTermTypeId: this.fixedDepositProductsTemplate.minDepositTermType?.id ?? defaultPeriodTypeId, + // Hidden, unedited-by-anyone fields -- left blank (like their max-/in-multiples-of- siblings + // already correctly are) rather than forced to a real default, or every single product edit + // submitted a "real" value against a product that had none, and a checker's "Proposed changes" + // review showed these two as "changed" on every unrelated edit, never anything a maker touched. + minDepositTerm: this.fixedDepositProductsTemplate.minDepositTerm ?? '', + minDepositTermTypeId: this.fixedDepositProductsTemplate.minDepositTermType?.id ?? '', maxDepositTerm: this.fixedDepositProductsTemplate.maxDepositTerm ?? '', maxDepositTermTypeId: this.fixedDepositProductsTemplate.maxDepositTermType?.id ?? '', inMultiplesOfDepositTerm: this.fixedDepositProductsTemplate.inMultiplesOfDepositTerm ?? '', inMultiplesOfDepositTermTypeId: this.fixedDepositProductsTemplate.inMultiplesOfDepositTermType?.id ?? '', + renewalGracePeriodDays: this.fixedDepositProductsTemplate.renewalGracePeriodDays ?? '', minDepositAmount: this.fixedDepositProductsTemplate.minDepositAmount, maxDepositAmount: this.fixedDepositProductsTemplate.maxDepositAmount, nominalAnnualInterestRate: this.fixedDepositProductsTemplate.nominalAnnualInterestRate ?? 0, @@ -171,6 +175,13 @@ export class FixedDepositProductTermsStepComponent implements OnInit, OnChanges maxDepositTermTypeId: [''], inMultiplesOfDepositTerm: [''], inMultiplesOfDepositTermTypeId: [''], + // Days after maturity a depositor can still walk in and have their FD renewed backdated to the + // original maturity date, at the currently active rate -- blank/0 keeps today's instant, + // same-night auto-renewal (see FD Dashboard for the manual renewal this enables). + renewalGracePeriodDays: [ + '', + Validators.min(0) + ], minDepositAmount: [ '', Validators.min(0)