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, ViewChild } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, UntypedFormControl, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** CKEditor5 Imports */
|
||||
@@ -28,7 +28,7 @@ export class CreateTemplateComponent implements OnInit {
|
||||
@ViewChild('ckEditor', { static: true }) ckEditor: any;
|
||||
|
||||
/** Template form. */
|
||||
templateForm: FormGroup;
|
||||
templateForm: UntypedFormGroup;
|
||||
/** Create Template Data. */
|
||||
createTemplateData: any;
|
||||
/** Template Mappers */
|
||||
@@ -50,7 +50,7 @@ export class CreateTemplateComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {TemplateService} templateService Templates Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private templateService: TemplatesService) {
|
||||
@@ -84,14 +84,14 @@ export class CreateTemplateComponent implements OnInit {
|
||||
if (value === 0) { // client
|
||||
this.mappers.splice(0, 1, {
|
||||
mappersorder: 0,
|
||||
mapperskey: new FormControl('client'),
|
||||
mappersvalue: new FormControl('clients/{{clientId}}?tenantIdentifier=' + tenantIdentifier)
|
||||
mapperskey: new UntypedFormControl('client'),
|
||||
mappersvalue: new UntypedFormControl('clients/{{clientId}}?tenantIdentifier=' + tenantIdentifier)
|
||||
});
|
||||
} else { // loan
|
||||
this.mappers.splice(0, 1, {
|
||||
mappersorder: 0,
|
||||
mapperskey: new FormControl('loan'),
|
||||
mappersvalue: new FormControl('loans/{{loanId}}?associations=all&tenantIdentifier=' + tenantIdentifier )
|
||||
mapperskey: new UntypedFormControl('loan'),
|
||||
mappersvalue: new UntypedFormControl('loans/{{loanId}}?associations=all&tenantIdentifier=' + tenantIdentifier )
|
||||
});
|
||||
}
|
||||
this.setEditorContent('');
|
||||
@@ -105,8 +105,8 @@ export class CreateTemplateComponent implements OnInit {
|
||||
addMapper() {
|
||||
this.mappers.push({
|
||||
mappersorder: this.mappers.length,
|
||||
mapperskey: new FormControl(''),
|
||||
mappersvalue: new FormControl('')
|
||||
mapperskey: new UntypedFormControl(''),
|
||||
mappersvalue: new UntypedFormControl('')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** CKEditor5 Imports */
|
||||
@@ -28,7 +28,7 @@ export class EditTemplateComponent implements OnInit {
|
||||
@ViewChild('ckEditor', { static: true }) ckEditor: any;
|
||||
|
||||
/** Template form. */
|
||||
templateForm: FormGroup;
|
||||
templateForm: UntypedFormGroup;
|
||||
/** Edit Template Data. */
|
||||
editTemplateData: any;
|
||||
/** Template Mappers */
|
||||
@@ -50,7 +50,7 @@ export class EditTemplateComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {TemplateService} templateService Templates Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private templateService: TemplatesService) {
|
||||
@@ -59,8 +59,8 @@ export class EditTemplateComponent implements OnInit {
|
||||
this.mappers = this.editTemplateData.template.mappers
|
||||
.map((mapper: any) => ({
|
||||
mappersorder: mapper.mapperorder,
|
||||
mapperskey: new FormControl(mapper.mapperkey),
|
||||
mappersvalue: new FormControl(mapper.mappervalue)
|
||||
mapperskey: new UntypedFormControl(mapper.mapperkey),
|
||||
mappersvalue: new UntypedFormControl(mapper.mappervalue)
|
||||
}));
|
||||
});
|
||||
}
|
||||
@@ -90,14 +90,14 @@ export class EditTemplateComponent implements OnInit {
|
||||
if (value === 0) { // client
|
||||
this.mappers.splice(0, 1, {
|
||||
mappersorder: 0,
|
||||
mapperskey: new FormControl('client'),
|
||||
mappersvalue: new FormControl('clients/{{clientId}}?tenantIdentifier=' + tenantIdentifier)
|
||||
mapperskey: new UntypedFormControl('client'),
|
||||
mappersvalue: new UntypedFormControl('clients/{{clientId}}?tenantIdentifier=' + tenantIdentifier)
|
||||
});
|
||||
} else { // loan
|
||||
this.mappers.splice(0, 1, {
|
||||
mappersorder: 0,
|
||||
mapperskey: new FormControl('loan'),
|
||||
mappersvalue: new FormControl('loans/{{loanId}}?associations=all&tenantIdentifier=' + tenantIdentifier )
|
||||
mapperskey: new UntypedFormControl('loan'),
|
||||
mappersvalue: new UntypedFormControl('loans/{{loanId}}?associations=all&tenantIdentifier=' + tenantIdentifier )
|
||||
});
|
||||
}
|
||||
this.setEditorContent('');
|
||||
@@ -110,8 +110,8 @@ export class EditTemplateComponent implements OnInit {
|
||||
addMapper() {
|
||||
this.mappers.push({
|
||||
mappersorder: this.mappers.length,
|
||||
mapperskey: new FormControl(''),
|
||||
mappersvalue: new FormControl('')
|
||||
mapperskey: new UntypedFormControl(''),
|
||||
mappersvalue: new UntypedFormControl('')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user