Recurring Deposit view account homologation (#1910)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
7c53b82965
commit
79595f6a1c
+6
-6
@@ -329,6 +329,11 @@
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Loan Schedule Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Repayment Strategy:</span>
|
||||
<span fxFlex="53%" class="repayment-strategy">{{ loanProduct.transactionProcessingStrategyName }}</span>
|
||||
@@ -346,12 +351,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Loan Schedule Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="loanProduct.loanScheduleProcessingType">
|
||||
<div fxFlexFill *ngIf="isAdvancedPaymentAllocationStrategy()">
|
||||
<span fxFlex="47%">Loan Schedule Processing Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleProcessingType.value }}</span>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" fxLayoutAlign.gt-sm="start center">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="72%">
|
||||
<mat-label>Product Name</mat-label>
|
||||
<input matInput formControlName="name" matTooltip="The product name is a unique identifier for the lending product." required>
|
||||
<mat-error>
|
||||
@@ -10,7 +10,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="24%">
|
||||
<mat-label>Short Name</mat-label>
|
||||
<input matInput formControlName="shortName" maxlength="4" matTooltip="The short name is a unique identifier for the lending product." required>
|
||||
<mat-error>
|
||||
|
||||
+3
-2
@@ -65,7 +65,8 @@
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Repayment strategy</mat-label>
|
||||
<mat-select formControlName="transactionProcessingStrategyCode" matTooltip="The repayment strategy determines the sequence in which each of the components is paid." required>
|
||||
<mat-select formControlName="transactionProcessingStrategyCode" matTooltip="The repayment strategy determines the sequence in which each of the components is paid."
|
||||
required [disabled]="advancedTransactionProcessingStrategyDisabled">
|
||||
<mat-option *ngFor="let transactionProcessingStrategy of transactionProcessingStrategyData" [value]="transactionProcessingStrategy.code">
|
||||
{{ transactionProcessingStrategy.name }}
|
||||
</mat-option>
|
||||
@@ -75,7 +76,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="48%" *ngIf="isAdvancedTransactionProcessingStrategy">
|
||||
<mat-label>Loan Schedule Processing Type</mat-label>
|
||||
<mat-select formControlName="loanScheduleProcessingType" required>
|
||||
<mat-option *ngFor="let loanScheduleProcessingType of loanScheduleProcessingTypeData" [value]="loanScheduleProcessingType.code">
|
||||
|
||||
+23
-3
@@ -40,6 +40,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
delinquencyBucketData: any;
|
||||
loanScheduleTypeData: OptionData[] = [];
|
||||
loanScheduleProcessingTypeData: OptionData[] = [];
|
||||
isAdvancedTransactionProcessingStrategy = false;
|
||||
advancedTransactionProcessingStrategyDisabled = true;
|
||||
|
||||
/** Values to Days for Repayments */
|
||||
defaultConfigValues: GlobalConfiguration[] = [];
|
||||
@@ -78,13 +80,14 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanScheduleTypeData = this.loanProductsTemplate.loanScheduleTypeOptions;
|
||||
this.loanScheduleProcessingTypeData = this.loanProductsTemplate.loanScheduleProcessingTypeOptions;
|
||||
|
||||
const transactionProcessingStrategyCode: string = this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code;
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'amortizationType': this.loanProductsTemplate.amortizationType.id,
|
||||
'interestType': this.loanProductsTemplate.interestType.id,
|
||||
'isEqualAmortization': this.loanProductsTemplate.isEqualAmortization,
|
||||
'interestCalculationPeriodType': this.loanProductsTemplate.interestCalculationPeriodType.id,
|
||||
'allowPartialPeriodInterestCalcualtion': this.loanProductsTemplate.allowPartialPeriodInterestCalcualtion,
|
||||
'transactionProcessingStrategyCode': this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code,
|
||||
'transactionProcessingStrategyCode': transactionProcessingStrategyCode,
|
||||
'graceOnPrincipalPayment': this.loanProductsTemplate.graceOnPrincipalPayment,
|
||||
'graceOnInterestPayment': this.loanProductsTemplate.graceOnInterestPayment,
|
||||
'graceOnInterestCharged': this.loanProductsTemplate.graceOnInterestCharged,
|
||||
@@ -109,9 +112,15 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'enableDownPayment': this.loanProductsTemplate.enableDownPayment,
|
||||
'enableInstallmentLevelDelinquency': this.loanProductsTemplate.enableInstallmentLevelDelinquency,
|
||||
'loanScheduleType': this.loanProductsTemplate.loanScheduleType.code,
|
||||
'loanScheduleProcessingType': this.loanProductsTemplate.loanScheduleProcessingType.code
|
||||
});
|
||||
|
||||
this.isAdvancedTransactionProcessingStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(transactionProcessingStrategyCode);
|
||||
if (this.isAdvancedTransactionProcessingStrategy) {
|
||||
this.loanProductSettingsForm.addControl('loanScheduleProcessingType', new UntypedFormControl(
|
||||
this.loanProductsTemplate.loanScheduleProcessingType.code || LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL,
|
||||
[Validators.required ]));
|
||||
}
|
||||
|
||||
if (this.loanProductsTemplate.dueDaysForRepaymentEvent != null &&
|
||||
this.loanProductsTemplate.overDueDaysForRepaymentEvent != null) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
@@ -234,7 +243,6 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'dueDaysForRepaymentEvent': [''],
|
||||
'overDueDaysForRepaymentEvent': [''],
|
||||
'loanScheduleType': [LoanProducts.LOAN_SCHEDULE_TYPE_CUMULATIVE, Validators.required],
|
||||
'loanScheduleProcessingType': [LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL, Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -395,6 +403,13 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanProductSettingsForm.get('transactionProcessingStrategyCode').valueChanges
|
||||
.subscribe((transactionProcessingStrategyCode: string) => {
|
||||
this.advancePaymentStrategy.emit(transactionProcessingStrategyCode);
|
||||
this.isAdvancedTransactionProcessingStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(transactionProcessingStrategyCode);
|
||||
if (this.isAdvancedTransactionProcessingStrategy) {
|
||||
this.loanProductSettingsForm.addControl('loanScheduleProcessingType', new UntypedFormControl(
|
||||
LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL, [Validators.required]));
|
||||
} else {
|
||||
this.loanProductSettingsForm.removeControl('loanScheduleProcessingType');
|
||||
}
|
||||
});
|
||||
|
||||
this.loanProductSettingsForm.get('allowAttributeConfiguration').valueChanges
|
||||
@@ -452,6 +467,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'transactionProcessingStrategyCode': this.transactionProcessingStrategyData[0].code
|
||||
});
|
||||
}
|
||||
this.advancedTransactionProcessingStrategyDisabled = false;
|
||||
} else {
|
||||
// Only Advanced Payment Allocation Strategy
|
||||
this.transactionProcessingStrategyDataBase.some(
|
||||
@@ -460,6 +476,10 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.transactionProcessingStrategyData.push(cn);
|
||||
}
|
||||
});
|
||||
this.advancedTransactionProcessingStrategyDisabled = true;
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'transactionProcessingStrategyCode': this.transactionProcessingStrategyData[0].code
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user