diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.html b/src/app/products/loan-products/create-loan-product/create-loan-product.component.html index 57339c4da..085cb9809 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.html +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.html @@ -99,7 +99,7 @@ - + {{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }} + diff --git a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts index cef55f750..aa8e5da19 100644 --- a/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts +++ b/src/app/products/loan-products/create-loan-product/create-loan-product.component.ts @@ -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 ( diff --git a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html index 69ed6d017..1315fd364 100644 --- a/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html +++ b/src/app/products/loan-products/edit-loan-product/edit-loan-product.component.html @@ -113,6 +113,8 @@ (setViewChildForm)="setViewChildForm($event)" > + + diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html index 2e6252a8e..5d01f7852 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.html @@ -75,15 +75,4 @@ {{ 'labels.inputs.Merchant Buy down fee' | translate }} - -
- - -
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts index 77c20a8d8..33fd4aa8e 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-capitalized-income-step/loan-product-deferred-income-recognition-step.component.ts @@ -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 { diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html index d986e819a..c46f74a63 100644 --- a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html +++ b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html @@ -1,8 +1,10 @@
- -
diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts index 3a32074e9..47f40dc3f 100644 --- a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts +++ b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts @@ -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 ]