Chore: Upgrade to Angular v14

This commit is contained in:
2022-07-11 20:12:38 +05:30
parent a4c3ae1035
commit b1c003a935
54 changed files with 355 additions and 325 deletions

View File

@ -1,5 +1,5 @@
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
@ -27,7 +27,7 @@ export class LedgerComponent implements OnInit, AfterViewInit {
@ViewChild(MatSort, { static: true }) sort?: MatSort;
info: Ledger = new Ledger();
dataSource: LedgerDataSource = new LedgerDataSource(this.info.body);
form: FormGroup;
form: UntypedFormGroup;
selectedRowId = '';
debit = 0;
credit = 0;
@ -40,7 +40,7 @@ export class LedgerComponent implements OnInit, AfterViewInit {
constructor(
private route: ActivatedRoute,
private router: Router,
private fb: FormBuilder,
private fb: UntypedFormBuilder,
private toCsv: ToCsvService,
private ser: LedgerService,
private accountSer: AccountService,
@ -51,7 +51,7 @@ export class LedgerComponent implements OnInit, AfterViewInit {
account: '',
});
this.accounts = (this.form.get('account') as FormControl).valueChanges.pipe(
this.accounts = (this.form.get('account') as UntypedFormControl).valueChanges.pipe(
startWith(null),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),