Moving to strict.
Create form has now moved to constructor and route data subscribe is type safe.
This commit is contained in:
@@ -27,7 +27,12 @@ export class JournalDialogComponent implements OnInit {
|
||||
private math: MathService,
|
||||
private accountSer: AccountService,
|
||||
) {
|
||||
this.createForm();
|
||||
this.form = this.fb.group({
|
||||
debit: '1',
|
||||
account: '',
|
||||
amount: '',
|
||||
});
|
||||
this.accBal = null;
|
||||
this.setupAccountAutocomplete();
|
||||
}
|
||||
|
||||
@@ -40,15 +45,6 @@ export class JournalDialogComponent implements OnInit {
|
||||
this.account = this.data.journal.account;
|
||||
}
|
||||
|
||||
createForm() {
|
||||
this.form = this.fb.group({
|
||||
debit: '1',
|
||||
account: '',
|
||||
amount: '',
|
||||
});
|
||||
this.accBal = null;
|
||||
}
|
||||
|
||||
setupAccountAutocomplete(): void {
|
||||
const control = this.form.get('account');
|
||||
this.accounts = control.valueChanges.pipe(
|
||||
|
||||
Reference in New Issue
Block a user