Remove the field recalculationCompountFrequenceyDate from loan product request
This commit is contained in:
@@ -148,14 +148,6 @@ export class CreateLoansAccountComponent implements OnInit {
|
||||
loansAccountData.recalculationRestFrequencyDate = this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate, dateFormat);
|
||||
}
|
||||
|
||||
if (this.loansAccountProductTemplate.isInterestRecalculationEnabled) {
|
||||
if (loansAccountData.recalculationCompoundingFrequencyDate !== null) {
|
||||
loansAccountData.recalculationCompoundingFrequencyDate = this.dateUtils.formatDate(this.loansAccount.recalculationCompoundingFrequencyDate, dateFormat);
|
||||
}
|
||||
} else {
|
||||
delete loansAccountData.recalculationCompoundingFrequencyDate;
|
||||
}
|
||||
|
||||
if (loansAccountData.interestCalculationPeriodType === 0) {
|
||||
loansAccountData.allowPartialPeriodInterestCalcualtion = false;
|
||||
}
|
||||
|
||||
@@ -135,14 +135,6 @@ export class EditLoansAccountComponent implements OnInit {
|
||||
loansAccountData.recalculationRestFrequencyDate = this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate, dateFormat);
|
||||
}
|
||||
|
||||
if (this.loansAccountProductTemplate.isInterestRecalculationEnabled) {
|
||||
if (loansAccountData.recalculationCompoundingFrequencyDate !== null) {
|
||||
loansAccountData.recalculationCompoundingFrequencyDate = this.dateUtils.formatDate(this.loansAccount.recalculationCompoundingFrequencyDate, dateFormat);
|
||||
}
|
||||
} else {
|
||||
delete loansAccountData.recalculationCompoundingFrequencyDate;
|
||||
}
|
||||
|
||||
if (loansAccountData.interestCalculationPeriodType === 0) {
|
||||
loansAccountData.allowPartialPeriodInterestCalcualtion = false;
|
||||
}
|
||||
|
||||
-12
@@ -253,18 +253,6 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%" (click)="recalculationCompoundingFrequencyDatePicker.open()"
|
||||
*ngIf="loansAccountProductTemplate.isInterestRecalculationEnabled && loansAccountProductTemplate.interestRecalculationData.interestRecalculationCompoundingType.id != 0 && loansAccountProductTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id != 1">
|
||||
<mat-label>Frequency Date for recalculation</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="recalculationCompoundingFrequencyDatePicker"
|
||||
formControlName="recalculationCompoundingFrequencyDate">
|
||||
<mat-datepicker-toggle matSuffix [for]="recalculationCompoundingFrequencyDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #recalculationCompoundingFrequencyDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="loansAccountTermsForm.controls.recalculationCompoundingFrequencyDate.hasError('required')">
|
||||
Frequency Data for recalculation is <strong>required</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</ng-container>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
-6
@@ -93,12 +93,6 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
|
||||
'repaymentsStartingFromDate': this.loansAccountTemplate.expectedFirstRepaymentOnDate && new Date(this.loansAccountTemplate.expectedFirstRepaymentOnDate)
|
||||
});
|
||||
}
|
||||
|
||||
if (this.loansAccountTemplate.isInterestRecalculationEnabled) {
|
||||
this.loansAccountTermsForm.patchValue({
|
||||
'recalculationCompoundingFrequencyDate': ''
|
||||
});
|
||||
}
|
||||
}
|
||||
this.createloansAccountTermsForm();
|
||||
this.setCustomValidators();
|
||||
|
||||
@@ -273,7 +273,7 @@ export class LoansService {
|
||||
.set('staffInSelectedOfficeOnly', 'true');
|
||||
httpParams = productId ? httpParams.set('productId', productId) : httpParams;
|
||||
httpParams = isGroup ? httpParams.set('groupId', entityId)
|
||||
.set('templateType', 'group') :
|
||||
.set('templateType', 'group') :
|
||||
httpParams.set('clientId', entityId)
|
||||
.set('templateType', 'individual');
|
||||
return this.http.get('/loans/template', { params: httpParams });
|
||||
|
||||
+3
-1
@@ -28,7 +28,9 @@ export class LoanProductChargesStepComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.chargeData = this.loanProductsTemplate.chargeOptions;
|
||||
this.overdueChargeData = this.loanProductsTemplate.penaltyOptions.filter((penalty: any) => penalty.chargeTimeType.code === 'chargeTimeType.overdueInstallment');
|
||||
this.overdueChargeData = this.loanProductsTemplate.penaltyOptions ?
|
||||
this.loanProductsTemplate.penaltyOptions.filter((penalty: any) => penalty.chargeTimeType.code === 'chargeTimeType.overdueInstallment') :
|
||||
[];
|
||||
|
||||
this.chargesDataSource = this.loanProductsTemplate.charges || [];
|
||||
this.pristine = true;
|
||||
|
||||
-4
@@ -387,10 +387,6 @@
|
||||
<div fxFlexFill *ngIf="loanProduct.recalculationCompoundingFrequencyType !== 1" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Frequency Interval for compounding:</span>
|
||||
<span fxFlex="60%">{{ loanProduct.recalculationCompoundingFrequencyInterval }}</span>
|
||||
<div fxFlexFill *ngIf="loanProduct.recalculationCompoundingFrequencyDate">
|
||||
<span fxFlex="40%">Compounding Frequency Date:</span>
|
||||
<span fxFlex="60%">{{ loanProduct.recalculationCompoundingFrequencyDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
@@ -400,10 +400,6 @@
|
||||
<div fxFlexFill *ngIf="loanProduct.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<span fxFlex="40%">Frequency Interval for compounding:</span>
|
||||
<span fxFlex="60%">{{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyInterval }}</span>
|
||||
<div fxFlexFill *ngIf="loanProduct.recalculationCompoundingFrequencyDate">
|
||||
<span fxFlex="40%">Compounding Frequency Date:</span>
|
||||
<span fxFlex="60%">{{ loanProduct.interestRecalculationData.recalculationCompoundingFrequencyDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlexFill fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
Reference in New Issue
Block a user