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
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -22,7 +22,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
/** Maximum transaction date allowed. */
|
||||
maxDate = new Date();
|
||||
/** Frequent postings form. */
|
||||
frequentPostingsForm: FormGroup;
|
||||
frequentPostingsForm: UntypedFormGroup;
|
||||
/** Office data. */
|
||||
officeData: any;
|
||||
/** Accounting rule data. */
|
||||
@@ -48,7 +48,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
@@ -122,7 +122,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* Creates the affected gl entry form.
|
||||
* @returns {FormGroup} Affected gl entry form.
|
||||
*/
|
||||
createAffectedGLEntryForm(): FormGroup {
|
||||
createAffectedGLEntryForm(): UntypedFormGroup {
|
||||
return this.formBuilder.group({
|
||||
'glAccountId': ['', Validators.required],
|
||||
'amount': ['', Validators.required]
|
||||
@@ -133,23 +133,23 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* Gets the affected gl entry (debits) form array.
|
||||
* @returns {FormArray} Debits form array.
|
||||
*/
|
||||
get debits(): FormArray {
|
||||
return this.frequentPostingsForm.get('debits') as FormArray;
|
||||
get debits(): UntypedFormArray {
|
||||
return this.frequentPostingsForm.get('debits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the affected gl entry (credits) form array.
|
||||
* @returns {FormArray} Credits form array.
|
||||
*/
|
||||
get credits(): FormArray {
|
||||
return this.frequentPostingsForm.get('credits') as FormArray;
|
||||
get credits(): UntypedFormArray {
|
||||
return this.frequentPostingsForm.get('credits') as UntypedFormArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the affected gl entry form to given affected gl entry form array.
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
*/
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: FormArray) {
|
||||
addAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray) {
|
||||
affectedGLEntryFormArray.push(this.createAffectedGLEntryForm());
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export class FrequentPostingsComponent implements OnInit {
|
||||
* @param {FormArray} affectedGLEntryFormArray Given affected gl entry form array (debit/credit).
|
||||
* @param {number} index Array index from where affected gl entry form needs to be removed.
|
||||
*/
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: FormArray, index: number) {
|
||||
removeAffectedGLEntry(affectedGLEntryFormArray: UntypedFormArray, index: number) {
|
||||
affectedGLEntryFormArray.removeAt(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user