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,7 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
/** Custom Services */
|
||||
import { ReportsService } from '../reports.service';
|
||||
@@ -41,9 +41,9 @@ export class RunReportComponent implements OnInit {
|
||||
dataObject: any;
|
||||
|
||||
/** Initializes new form group eportForm */
|
||||
reportForm = new FormGroup({});
|
||||
reportForm = new UntypedFormGroup({});
|
||||
/** Static Form control for decimal places in output */
|
||||
decimalChoice = new FormControl();
|
||||
decimalChoice = new UntypedFormControl();
|
||||
|
||||
/** Toggles Report form */
|
||||
isCollapsed = false;
|
||||
@@ -114,7 +114,7 @@ export class RunReportComponent implements OnInit {
|
||||
this.paramData.forEach(
|
||||
(param: ReportParameter) => {
|
||||
if (!param.parentParameterName) { // Non Child Parameter
|
||||
this.reportForm.addControl(param.name, new FormControl('', Validators.required));
|
||||
this.reportForm.addControl(param.name, new UntypedFormControl('', Validators.required));
|
||||
if (param.displayType === 'select') {
|
||||
this.fetchSelectOptions(param, param.name);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ export class RunReportComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
if (this.isPentahoReport()) {
|
||||
this.reportForm.addControl('outputType', new FormControl('', Validators.required));
|
||||
this.reportForm.addControl('outputType', new UntypedFormControl('', Validators.required));
|
||||
this.outputTypeOptions = [
|
||||
{ 'name': 'PDF format', 'value': 'PDF' },
|
||||
{ 'name': 'Normal format', 'value': 'HTML' },
|
||||
@@ -137,7 +137,7 @@ export class RunReportComponent implements OnInit {
|
||||
this.mapPentahoParams();
|
||||
}
|
||||
if (this.exportToS3Allowed) {
|
||||
this.reportForm.addControl('exportOutputToS3', new FormControl(false));
|
||||
this.reportForm.addControl('exportOutputToS3', new UntypedFormControl(false));
|
||||
}
|
||||
this.decimalChoice.patchValue('0');
|
||||
this.setChildControls();
|
||||
@@ -178,9 +178,9 @@ export class RunReportComponent implements OnInit {
|
||||
this.reportForm.get(param.name).valueChanges.subscribe((option: any) => {
|
||||
param.childParameters.forEach((child: ReportParameter) => {
|
||||
if (child.displayType === 'none') {
|
||||
this.reportForm.addControl(child.name, new FormControl(child.defaultVal));
|
||||
this.reportForm.addControl(child.name, new UntypedFormControl(child.defaultVal));
|
||||
} else {
|
||||
this.reportForm.addControl(child.name, new FormControl('', Validators.required));
|
||||
this.reportForm.addControl(child.name, new UntypedFormControl('', Validators.required));
|
||||
}
|
||||
if (child.displayType === 'select') {
|
||||
const inputstring = `${child.name}?${param.inputName}=${option.id}`;
|
||||
|
||||
Reference in New Issue
Block a user