Upgrade/angular 14 (#1853)
* Fix Loan product Payment Allocation * Upgrade to Angular 14 --------- Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
2dab3b70ca
commit
80936a3ea9
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -23,7 +23,7 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Activate Recurring Deposits Account form. */
|
||||
activateRecurringDepositsAccountForm: FormGroup;
|
||||
activateRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -35,7 +35,7 @@ export class ActivateRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SavingsService} savingsService Savings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
@@ -24,7 +24,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum Due Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Add Recurring Deposits Charge form. */
|
||||
recurringDepositsChargeForm: FormGroup;
|
||||
recurringDepositsChargeForm: UntypedFormGroup;
|
||||
/** savings charge options. */
|
||||
savingsChargeOptions: any;
|
||||
/** savings Id of the savings account. */
|
||||
@@ -41,7 +41,7 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {SavingsService} savingsService Savings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
@@ -75,17 +75,17 @@ export class AddChargeRecurringDepositsAccountComponent implements OnInit {
|
||||
this.chargeDetails.chargeTimeTypeAnnualOrMonth = true;
|
||||
}
|
||||
if (!this.chargeDetails.dueDateNotRequired && !this.chargeDetails.chargeTimeTypeAnnualOrMonth) {
|
||||
this.recurringDepositsChargeForm.addControl('dueDate', new FormControl('', Validators.required));
|
||||
this.recurringDepositsChargeForm.addControl('dueDate', new UntypedFormControl('', Validators.required));
|
||||
} else {
|
||||
this.recurringDepositsChargeForm.removeControl('dueDate');
|
||||
}
|
||||
if (!this.chargeDetails.dueDateNotRequired && this.chargeDetails.chargeTimeTypeAnnualOrMonth) {
|
||||
this.recurringDepositsChargeForm.addControl('feeOnMonthDay', new FormControl('', Validators.required));
|
||||
this.recurringDepositsChargeForm.addControl('feeOnMonthDay', new UntypedFormControl('', Validators.required));
|
||||
} else {
|
||||
this.recurringDepositsChargeForm.removeControl('feeOnMonthDay');
|
||||
}
|
||||
if (chargeTimeType.value === 'Monthly Fee') {
|
||||
this.recurringDepositsChargeForm.addControl('feeInterval', new FormControl(data.feeInterval, Validators.required));
|
||||
this.recurringDepositsChargeForm.addControl('feeInterval', new UntypedFormControl(data.feeInterval, Validators.required));
|
||||
} else {
|
||||
this.recurringDepositsChargeForm.removeControl('feeInterval');
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -23,7 +23,7 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Approve Recurring Deposits Account form. */
|
||||
approveRecurringDepositsAccountForm: FormGroup;
|
||||
approveRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -35,7 +35,7 @@ export class ApproveRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -35,7 +35,7 @@ export class CloseRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Close Recurring Deposit Account form. */
|
||||
closeRecurringDepositForm: FormGroup;
|
||||
closeRecurringDepositForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* Retrieves action details template data from `resolve`
|
||||
@@ -46,7 +46,7 @@ export class CloseRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -33,7 +33,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Deposits Recurring Deposit Account form. */
|
||||
depositRecurringDepositForm: FormGroup;
|
||||
depositRecurringDepositForm: UntypedFormGroup;
|
||||
|
||||
/**
|
||||
* Retrieves action details transactions template data from `resolve`
|
||||
@@ -44,7 +44,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: FormBuilder,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -24,7 +24,7 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit {
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** premature close Recurring Deposits Account form. */
|
||||
prematureCloseRecurringDepositsAccountForm: FormGroup;
|
||||
prematureCloseRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -36,7 +36,7 @@ export class PrematureCloseRecurringDepositAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -24,7 +24,7 @@ export class RejectRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Reject Recurring Deposits Account form. */
|
||||
rejectRecurringDepositsAccountForm: FormGroup;
|
||||
rejectRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -36,7 +36,7 @@ export class RejectRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -17,7 +17,7 @@ import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||
export class UndoApprovalRecurringDepositsAccountComponent implements OnInit {
|
||||
|
||||
/** Undo Approval Recurring Deposits Account form. */
|
||||
undoApprovalRecurringDepositsAccountForm: FormGroup;
|
||||
undoApprovalRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -27,7 +27,7 @@ export class UndoApprovalRecurringDepositsAccountComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
@@ -22,7 +22,7 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Withdraw Recurring Deposits Account form. */
|
||||
withdrawRecurringDepositsAccountForm: FormGroup;
|
||||
withdrawRecurringDepositsAccountForm: UntypedFormGroup;
|
||||
/** Recurring Deposits Account Id */
|
||||
accountId: any;
|
||||
|
||||
@@ -34,7 +34,7 @@ export class WithdrawByClientRecurringDepositsAccountComponent implements OnInit
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
/** Dialog Components */
|
||||
@@ -26,7 +26,7 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
|
||||
|
||||
@Input() recurringDepositsAccountTemplate: any;
|
||||
@Input() recurringDepositsAccountProductTemplate: any;
|
||||
@Input() currencyCode: FormControl;
|
||||
@Input() currencyCode: UntypedFormControl;
|
||||
@Input() recurringDepositAccountFormValid: boolean;
|
||||
|
||||
/** Charges Data */
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
/**
|
||||
* Recurring Deposit Account Currency Step
|
||||
@@ -17,11 +17,11 @@ export class RecurringDepositsAccountCurrencyStepComponent implements OnInit, On
|
||||
@Input() recurringDepositsAccountProductTemplate: any;
|
||||
|
||||
/** Recurring Deposit Account Currency Form */
|
||||
recurringDepositAccountCurrencyForm: FormGroup;
|
||||
recurringDepositAccountCurrencyForm: UntypedFormGroup;
|
||||
/** Currency Data */
|
||||
currencyData: any;
|
||||
|
||||
constructor(private formBuilder: FormBuilder) {
|
||||
constructor(private formBuilder: UntypedFormBuilder) {
|
||||
this.createRecurringDepositAccountCurrencyForm();
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -30,7 +30,7 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
|
||||
/** For edit recurring deposits form */
|
||||
isFieldOfficerPatched = false;
|
||||
/** Recurring Deposits Account Details Form */
|
||||
recurringDepositAccountDetailsForm: FormGroup;
|
||||
recurringDepositAccountDetailsForm: UntypedFormGroup;
|
||||
|
||||
/** Recurring Deposits Account Template with product data */
|
||||
@Output() recurringDepositsAccountProductTemplate = new EventEmitter();
|
||||
@@ -41,7 +41,7 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
|
||||
* @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private recurringDepositsService: RecurringDepositsService,
|
||||
private settingsService: SettingsService) {
|
||||
this.createRecurringDepositsAccountDetailsForm();
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -19,7 +19,7 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
@Input() recurringDepositsAccountProductTemplate: any;
|
||||
|
||||
/** Recurring Deposits Account Settings Form */
|
||||
recurringDepositAccountSettingsForm: FormGroup;
|
||||
recurringDepositAccountSettingsForm: UntypedFormGroup;
|
||||
/** Minimum date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum date allowed. */
|
||||
@@ -37,7 +37,7 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private settingsService: SettingsService) {
|
||||
this.createRecurringDepositAccountSettingsForm();
|
||||
this.buildDependencies();
|
||||
@@ -63,10 +63,10 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
'minBalanceForInterestCalculation': this.recurringDepositsAccountProductTemplate.minBalanceForInterestCalculation,
|
||||
});
|
||||
if (this.recurringDepositsAccountProductTemplate.withHoldTax) {
|
||||
this.recurringDepositAccountSettingsForm.addControl('withHoldTax', new FormControl(false));
|
||||
this.recurringDepositAccountSettingsForm.addControl('withHoldTax', new UntypedFormControl(false));
|
||||
this.recurringDepositAccountSettingsForm.get('withHoldTax').valueChanges.subscribe((value: boolean) => {
|
||||
if (value) {
|
||||
this.recurringDepositAccountSettingsForm.addControl('taxGroupId', new FormControl({ value: '', disabled: true }));
|
||||
this.recurringDepositAccountSettingsForm.addControl('taxGroupId', new UntypedFormControl({ value: '', disabled: true }));
|
||||
this.recurringDepositAccountSettingsForm.get('taxGroupId').patchValue(this.recurringDepositsAccountProductTemplate.taxGroup && this.recurringDepositsAccountProductTemplate.taxGroup.name);
|
||||
} else {
|
||||
this.recurringDepositAccountSettingsForm.removeControl('taxGroupId');
|
||||
@@ -141,9 +141,9 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
this.recurringDepositAccountSettingsForm.removeControl('recurringFrequency');
|
||||
this.recurringDepositAccountSettingsForm.removeControl('recurringFrequencyType');
|
||||
} else {
|
||||
this.recurringDepositAccountSettingsForm.addControl('expectedFirstDepositOnDate', new FormControl());
|
||||
this.recurringDepositAccountSettingsForm.addControl('recurringFrequency', new FormControl(''));
|
||||
this.recurringDepositAccountSettingsForm.addControl('recurringFrequencyType', new FormControl(''));
|
||||
this.recurringDepositAccountSettingsForm.addControl('expectedFirstDepositOnDate', new UntypedFormControl());
|
||||
this.recurringDepositAccountSettingsForm.addControl('recurringFrequency', new UntypedFormControl(''));
|
||||
this.recurringDepositAccountSettingsForm.addControl('recurringFrequencyType', new UntypedFormControl(''));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnCha
|
||||
/** Maximum date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Recurring Deposits Account Terms Form */
|
||||
recurringDepositAccountTermsForm: FormGroup;
|
||||
recurringDepositAccountTermsForm: UntypedFormGroup;
|
||||
/** Interest Compounding Period Type Data */
|
||||
interestCompoundingPeriodTypeData: any;
|
||||
/** Interest Posting Period Type Data */
|
||||
@@ -35,7 +35,7 @@ export class RecurringDepositsAccountTermsStepComponent implements OnInit, OnCha
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private settingsService: SettingsService) {
|
||||
this.createRecurringDepositsAccountTermsForm();
|
||||
}
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
@@ -23,7 +23,7 @@ export class EditTransactionComponent implements OnInit {
|
||||
/** Maximum Due Date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Recurring Deposits transaction form. */
|
||||
editTransactionForm: FormGroup;
|
||||
editTransactionForm: UntypedFormGroup;
|
||||
/** Recurring Deposits transaction payment options. */
|
||||
paymentTypeOptions: {
|
||||
id: number,
|
||||
@@ -48,7 +48,7 @@ export class EditTransactionComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
@@ -91,11 +91,11 @@ export class EditTransactionComponent implements OnInit {
|
||||
addPaymentDetails() {
|
||||
this.addPaymentDetailsFlag = !this.addPaymentDetailsFlag;
|
||||
if (this.addPaymentDetailsFlag) {
|
||||
this.editTransactionForm.addControl('accountNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('checkNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('routingCode', new FormControl(''));
|
||||
this.editTransactionForm.addControl('receiptNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('bankNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('accountNumber', new UntypedFormControl(''));
|
||||
this.editTransactionForm.addControl('checkNumber', new UntypedFormControl(''));
|
||||
this.editTransactionForm.addControl('routingCode', new UntypedFormControl(''));
|
||||
this.editTransactionForm.addControl('receiptNumber', new UntypedFormControl(''));
|
||||
this.editTransactionForm.addControl('bankNumber', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.editTransactionForm.removeControl('accountNumber');
|
||||
this.editTransactionForm.removeControl('checkNumber');
|
||||
|
||||
Reference in New Issue
Block a user