Browse Source

Add support for filters of assistant to accounts page

pull/7752/head
Thomas Kaul 13 hours ago
parent
commit
0cd41cf91f
  1. 2
      apps/client/src/app/app.component.ts
  2. 8
      apps/client/src/app/pages/accounts/accounts-page.component.ts

2
apps/client/src/app/app.component.ts

@ -147,6 +147,8 @@ export class GfAppComponent implements OnInit {
}
if (
(this.currentRoute === internalRoutes.accounts.path &&
!this.currentSubRoute) ||
(this.currentRoute === internalRoutes.home.path &&
this.currentSubRoute ===
internalRoutes.home.subRoutes?.holdings.path) ||

8
apps/client/src/app/pages/accounts/accounts-page.component.ts

@ -50,7 +50,6 @@ export class GfAccountsPageComponent implements OnInit {
protected user: User;
private hasImpersonationId: boolean;
private isInitialFetch = true;
private readonly deviceType = computed(
() => this.deviceDetectorService.deviceInfo().deviceType
@ -134,7 +133,7 @@ export class GfAccountsPageComponent implements OnInit {
private fetchAccounts() {
this.dataService
.fetchAccounts()
.fetchAccounts({ filters: this.userService.getFilters() })
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(
({
@ -150,17 +149,14 @@ export class GfAccountsPageComponent implements OnInit {
if (
!this.hasImpersonationId &&
this.accounts?.length <= 0 &&
this.hasPermissionToCreateAccount &&
this.isInitialFetch
this.user?.accounts?.length === 0
) {
void this.router.navigate(
internalRoutes.accounts.subRoutes.create.routerLink
);
}
this.isInitialFetch = false;
this.changeDetectorRef.markForCheck();
}
);

Loading…
Cancel
Save