|
|
@ -73,7 +73,6 @@ export class GfAccountsTableComponent implements OnChanges, OnDestroy { |
|
|
@ViewChild(MatSort) sort: MatSort; |
|
|
@ViewChild(MatSort) sort: MatSort; |
|
|
|
|
|
|
|
|
public dataSource = new MatTableDataSource<Account>(); |
|
|
public dataSource = new MatTableDataSource<Account>(); |
|
|
public isLoading = true; |
|
|
|
|
|
public routeQueryParams: Subscription; |
|
|
public routeQueryParams: Subscription; |
|
|
|
|
|
|
|
|
public readonly accounts = input.required<Account[] | undefined>(); |
|
|
public readonly accounts = input.required<Account[] | undefined>(); |
|
|
@ -118,6 +117,8 @@ export class GfAccountsTableComponent implements OnChanges, OnDestroy { |
|
|
return columns; |
|
|
return columns; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
protected readonly isLoading = computed(() => !this.accounts()); |
|
|
|
|
|
|
|
|
private readonly notificationService = inject(NotificationService); |
|
|
private readonly notificationService = inject(NotificationService); |
|
|
private readonly router = inject(Router); |
|
|
private readonly router = inject(Router); |
|
|
private readonly unsubscribeSubject = new Subject<void>(); |
|
|
private readonly unsubscribeSubject = new Subject<void>(); |
|
|
@ -135,16 +136,10 @@ export class GfAccountsTableComponent implements OnChanges, OnDestroy { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnChanges() { |
|
|
public ngOnChanges() { |
|
|
this.isLoading = true; |
|
|
|
|
|
|
|
|
|
|
|
this.dataSource = new MatTableDataSource(this.accounts()); |
|
|
this.dataSource = new MatTableDataSource(this.accounts()); |
|
|
this.dataSource.sortingDataAccessor = getLowercase; |
|
|
this.dataSource.sortingDataAccessor = getLowercase; |
|
|
|
|
|
|
|
|
this.dataSource.sort = this.sort; |
|
|
this.dataSource.sort = this.sort; |
|
|
|
|
|
|
|
|
if (this.accounts()) { |
|
|
|
|
|
this.isLoading = false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onDeleteAccount(aId: string) { |
|
|
public onDeleteAccount(aId: string) { |
|
|
|