Chore: Upgrade to Angular v14
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
@@ -18,14 +18,14 @@ import { MathService } from '../shared/math.service';
|
||||
})
|
||||
export class JournalDialogComponent implements OnInit {
|
||||
accounts: Observable<Account[]>;
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
account: Account = new Account();
|
||||
accBal: AccountBalance | null = null;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<JournalDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: { journal: Journal; date: string },
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private math: MathService,
|
||||
private accountSer: AccountService,
|
||||
) {
|
||||
@@ -36,7 +36,7 @@ export class JournalDialogComponent implements OnInit {
|
||||
});
|
||||
this.accBal = null;
|
||||
// Setup Account Autocomplete
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user