Instanceof operator was not working so changed the way of checking it
This commit is contained in:
@@ -20,7 +20,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
|
||||
form: FormGroup<{
|
||||
code: FormControl<number | string>;
|
||||
name: FormControl<string | null>;
|
||||
type: FormControl<any>;
|
||||
type: FormControl<number>;
|
||||
isActive: FormControl<boolean>;
|
||||
isReconcilable: FormControl<boolean>;
|
||||
costCentre: FormControl<string | null>;
|
||||
@@ -40,7 +40,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
|
||||
this.form = new FormGroup({
|
||||
code: new FormControl<string | number>({ value: 0, disabled: true }, { nonNullable: true }),
|
||||
name: new FormControl<string | null>(null),
|
||||
type: new FormControl<any>(''),
|
||||
type: new FormControl<number>(0, { nonNullable: true }),
|
||||
isActive: new FormControl<boolean>(true, { nonNullable: true }),
|
||||
isReconcilable: new FormControl<boolean>(false, { nonNullable: true }),
|
||||
costCentre: new FormControl<string | null>(null),
|
||||
@@ -121,7 +121,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
|
||||
getItem(): Account {
|
||||
const formModel = this.form.value;
|
||||
this.item.name = formModel.name!;
|
||||
this.item.type = formModel.type;
|
||||
this.item.type = formModel.type!;
|
||||
this.item.isActive = formModel.isActive!;
|
||||
this.item.isReconcilable = formModel.isReconcilable!;
|
||||
this.item.costCentre.id = formModel.costCentre!;
|
||||
|
||||
Reference in New Issue
Block a user