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
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormBuilder, UntypedFormControl, Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
/** Custom Services */
@@ -26,7 +26,7 @@ export class FundMappingComponent implements OnInit {
/** Maximum Date allowed. */
maxDate = new Date();
/** Fund mapping form. */
fundMappingForm: FormGroup;
fundMappingForm: UntypedFormGroup;
/** Advance Search Template */
advanceSearchTemplate: any;
/** Toggles b/w form and table */
@@ -50,7 +50,7 @@ export class FundMappingComponent implements OnInit {
* @param {Router} router Router for navigation.
* @param {Dates} dateUtils Date Utils to format date.
*/
constructor(private formBuilder: FormBuilder,
constructor(private formBuilder: UntypedFormBuilder,
private organizationService: OrganizationService,
private settingsService: SettingsService,
private route: ActivatedRoute,
@@ -88,14 +88,14 @@ export class FundMappingComponent implements OnInit {
buildDependencies() {
this.fundMappingForm.get('includeOutStandingAmountPercentage').valueChanges.subscribe((value: boolean) => {
if (value) {
this.fundMappingForm.addControl('outStandingAmountPercentageCondition', new FormControl('', Validators.required));
this.fundMappingForm.addControl('outStandingAmountPercentageCondition', new UntypedFormControl('', Validators.required));
this.fundMappingForm.get('outStandingAmountPercentageCondition').valueChanges.subscribe((_value: string) => {
if (_value === 'between') {
this.fundMappingForm.addControl('minOutStandingAmountPercentage', new FormControl('', Validators.required));
this.fundMappingForm.addControl('maxOutStandingAmountPercentage', new FormControl('', Validators.required));
this.fundMappingForm.addControl('minOutStandingAmountPercentage', new UntypedFormControl('', Validators.required));
this.fundMappingForm.addControl('maxOutStandingAmountPercentage', new UntypedFormControl('', Validators.required));
this.fundMappingForm.removeControl('outStandingAmountPercentage');
} else {
this.fundMappingForm.addControl('outStandingAmountPercentage', new FormControl('', Validators.required));
this.fundMappingForm.addControl('outStandingAmountPercentage', new UntypedFormControl('', Validators.required));
this.fundMappingForm.removeControl('minOutStandingAmountPercentage');
this.fundMappingForm.removeControl('maxOutStandingAmountPercentage');
}
@@ -111,14 +111,14 @@ export class FundMappingComponent implements OnInit {
this.fundMappingForm.get('includeOutStandingAmountPercentage').patchValue(true);
this.fundMappingForm.get('includeOutstandingAmount').valueChanges.subscribe((value: boolean) => {
if (value) {
this.fundMappingForm.addControl('outstandingAmountCondition', new FormControl('', Validators.required));
this.fundMappingForm.addControl('outstandingAmountCondition', new UntypedFormControl('', Validators.required));
this.fundMappingForm.get('outstandingAmountCondition').valueChanges.subscribe((_value: string) => {
if (_value === 'between') {
this.fundMappingForm.addControl('minOutstandingAmount', new FormControl('', Validators.required));
this.fundMappingForm.addControl('maxOutstandingAmount', new FormControl('', Validators.required));
this.fundMappingForm.addControl('minOutstandingAmount', new UntypedFormControl('', Validators.required));
this.fundMappingForm.addControl('maxOutstandingAmount', new UntypedFormControl('', Validators.required));
this.fundMappingForm.removeControl('outstandingAmount');
} else {
this.fundMappingForm.addControl('outstandingAmount', new FormControl('', Validators.required));
this.fundMappingForm.addControl('outstandingAmount', new UntypedFormControl('', Validators.required));
this.fundMappingForm.removeControl('minOutstandingAmount');
this.fundMappingForm.removeControl('maxOutstandingAmount');
}