WEB-269: Loan product deferred income stepper (#2593)
merging as it was reviewed from Adam.
This commit is contained in:
+2
-1
@@ -99,7 +99,7 @@
|
||||
</mifosx-loan-product-charges-step>
|
||||
</mat-step>
|
||||
|
||||
<mat-step *ngIf="isAdvancedPaymentStrategy" [stepControl]="loanDeferredIncomeRecognitionForm" completed>
|
||||
<mat-step *ngIf="isAdvancedPaymentStrategy">
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }}</ng-template>
|
||||
|
||||
<mifosx-loan-product-capitalized-income-step
|
||||
@@ -113,6 +113,7 @@
|
||||
(setViewChildForm)="setViewChildForm($event)"
|
||||
>
|
||||
</mifosx-loan-product-capitalized-income-step>
|
||||
<mifosx-stepper-buttons></mifosx-stepper-buttons>
|
||||
</mat-step>
|
||||
|
||||
<mat-step [stepControl]="loanProductAccountingForm">
|
||||
|
||||
@@ -84,7 +84,6 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
advancedCreditAllocations: AdvancedPaymentAllocation[] = [];
|
||||
|
||||
deferredIncomeRecognition: DeferredIncomeRecognition | null = null;
|
||||
loanDeferredIncomeRecognitionForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -197,8 +196,7 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
}
|
||||
|
||||
setViewChildForm(viewChildForm: UntypedFormGroup): void {
|
||||
this.loanDeferredIncomeRecognitionForm = viewChildForm;
|
||||
const formValues: any = this.loanDeferredIncomeRecognitionForm.getRawValue();
|
||||
const formValues: any = viewChildForm.getRawValue();
|
||||
const capitalizedIncome: CapitalizedIncome = formValues.enableIncomeCapitalization
|
||||
? {
|
||||
enableIncomeCapitalization: true,
|
||||
@@ -230,6 +228,10 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
return this.loanProductAccountingStep.loanProductAccountingForm;
|
||||
}
|
||||
|
||||
get loanDeferredIncomeRecognitionForm() {
|
||||
return this.loanProductDeferredIncomeRecognitionStep.loanDeferredIncomeRecognitionForm;
|
||||
}
|
||||
|
||||
get loanProductFormValid() {
|
||||
if (this.isAdvancedPaymentStrategy) {
|
||||
return (
|
||||
|
||||
@@ -113,6 +113,8 @@
|
||||
(setViewChildForm)="setViewChildForm($event)"
|
||||
>
|
||||
</mifosx-loan-product-capitalized-income-step>
|
||||
|
||||
<mifosx-stepper-buttons></mifosx-stepper-buttons>
|
||||
</mat-step>
|
||||
|
||||
<mat-step [stepControl]="loanProductAccountingForm" completed>
|
||||
|
||||
-11
@@ -75,15 +75,4 @@
|
||||
{{ 'labels.inputs.Merchant Buy down fee' | translate }}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<div class="layout-row responsive-column align-center gap-2px margin-t">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Previous' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
{{ 'labels.buttons.Next' | translate }}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
+4
-16
@@ -1,20 +1,9 @@
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
Validators,
|
||||
ReactiveFormsModule
|
||||
} from '@angular/forms';
|
||||
import {
|
||||
DeferredIncomeRecognition,
|
||||
CapitalizedIncome,
|
||||
BuyDownFee
|
||||
} from '../loan-product-payment-strategy-step/payment-allocation-model';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { DeferredIncomeRecognition } from '../loan-product-payment-strategy-step/payment-allocation-model';
|
||||
import { StringEnumOptionData } from 'app/shared/models/option-data.model';
|
||||
import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-loan-product-capitalized-income-step',
|
||||
@@ -22,8 +11,7 @@ import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
styleUrls: ['./loan-product-deferred-income-recognition-step.component.scss'],
|
||||
imports: [
|
||||
...STANDALONE_SHARED_IMPORTS,
|
||||
MatCheckbox,
|
||||
FaIconComponent
|
||||
MatCheckbox
|
||||
]
|
||||
})
|
||||
export class LoanProductDeferredIncomeRecognitionStepComponent implements OnInit {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<div class="flex-fill layout-row layout-align-center margin-t gap-2percent layout-xs-column">
|
||||
<button matButton="elevated" matStepperPrevious [disabled]="disablePrevious">
|
||||
<button mat-raised-button matStepperPrevious [disabled]="disablePrevious">
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Previous' | translate }}
|
||||
</button>
|
||||
<button matButton="elevated" matStepperNext [disabled]="disableNext">
|
||||
<button mat-raised-button matStepperNext [disabled]="disableNext">
|
||||
{{ 'labels.buttons.Next' | translate }}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
@Component({
|
||||
@@ -8,6 +9,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
styleUrls: ['./stepper-buttons.component.scss'],
|
||||
imports: [
|
||||
...STANDALONE_SHARED_IMPORTS,
|
||||
FaIconComponent,
|
||||
MatStepperPrevious,
|
||||
MatStepperNext
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user