Strict done!!

This commit is contained in:
2020-11-23 16:42:54 +05:30
parent af343cb7f9
commit afe746ecdc
142 changed files with 1258 additions and 907 deletions
@@ -18,9 +18,9 @@ import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dial
export class AccountDetailComponent implements OnInit, AfterViewInit {
@ViewChild('nameElement', { static: true }) nameElement?: ElementRef;
form: FormGroup;
accountTypes: AccountType[];
costCentres: CostCentre[];
item: Account;
accountTypes: AccountType[] = [];
costCentres: CostCentre[] = [];
item: Account = new Account();
constructor(
private route: ActivatedRoute,
@@ -68,7 +68,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {
setTimeout(() => {
this.nameElement.nativeElement.focus();
if (this.nameElement) this.nameElement.nativeElement.focus();
}, 0);
}
@@ -85,7 +85,7 @@ export class AccountDetailComponent implements OnInit, AfterViewInit {
}
delete() {
this.ser.delete(this.item.id).subscribe(
this.ser.delete(this.item.id as string).subscribe(
() => {
this.toaster.show('Success', '');
this.router.navigateByUrl('/accounts');