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:
José Alberto Hernández
2023-08-29 19:51:32 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 2dab3b70ca
commit 80936a3ea9
336 changed files with 6657 additions and 5698 deletions
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormArray } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Services */
@@ -28,7 +28,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
/** Maximum opening balances date allowed. */
maxDate = new Date();
/** Opening balances form. */
openingBalancesForm: FormGroup;
openingBalancesForm: UntypedFormGroup;
/** Opening balances data. */
openingBalancesData: any;
/** Office data. */
@@ -55,7 +55,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
* @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service.
* @param {PopoverService} popoverService PopoverService.
*/
constructor(private formBuilder: FormBuilder,
constructor(private formBuilder: UntypedFormBuilder,
private accountingService: AccountingService,
private settingsService: SettingsService,
private dateUtils: Dates,
@@ -97,7 +97,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
* @param glAccount GL Account for which form is returned.
* @returns {FormGroup} GL Account entry form.
*/
createGLAccountEntryForm(glAccount: any): FormGroup {
createGLAccountEntryForm(glAccount: any): UntypedFormGroup {
return this.formBuilder.group({
'glAccountId': [glAccount.glAccountId],
'debit': [null],
@@ -109,8 +109,8 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
* Gets the gl account entries form array.
* @returns {FormArray} GL Account entries form array.
*/
get glAccountEntries(): FormArray {
return this.openingBalancesForm.get('glAccountEntries') as FormArray;
get glAccountEntries(): UntypedFormArray {
return this.openingBalancesForm.get('glAccountEntries') as UntypedFormArray;
}
/**
@@ -119,7 +119,7 @@ export class MigrateOpeningBalancesComponent implements OnInit, AfterViewInit {
retrieveOpeningBalances() {
this.accountingService.retrieveOpeningBalances(this.openingBalancesForm.value.officeId)
.subscribe((openingBalancesData: any) => {
const entry = this.openingBalancesForm.get('glAccountEntries') as FormArray;
const entry = this.openingBalancesForm.get('glAccountEntries') as UntypedFormArray;
openingBalancesData.glAccounts = openingBalancesData.assetAccountOpeningBalances
.concat(openingBalancesData.liabityAccountOpeningBalances,