diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 28f5a6f9d..353145fd8 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -42,6 +42,8 @@ import { import { isNumber } from 'lodash'; import { DeviceDetectorService } from 'ngx-device-detector'; +import { AllocationsPageParams } from './interfaces/interfaces'; + @Component({ imports: [ GfPortfolioProportionChartComponent, @@ -131,9 +133,9 @@ export class GfAllocationsPageComponent implements OnInit { ) { this.route.queryParams .pipe(takeUntilDestroyed(this.destroyRef)) - .subscribe((params) => { - if (params['accountId'] && params['accountDetailDialog']) { - this.openAccountDetailDialog(params['accountId']); + .subscribe((params: AllocationsPageParams) => { + if (params.accountId && params.accountDetailDialog) { + this.openAccountDetailDialog(params.accountId); } }); } diff --git a/apps/client/src/app/pages/portfolio/allocations/interfaces/interfaces.ts b/apps/client/src/app/pages/portfolio/allocations/interfaces/interfaces.ts new file mode 100644 index 000000000..dc90f5f95 --- /dev/null +++ b/apps/client/src/app/pages/portfolio/allocations/interfaces/interfaces.ts @@ -0,0 +1,6 @@ +import { Params } from '@angular/router'; + +export interface AllocationsPageParams extends Params { + accountDetailDialog?: string; + accountId?: string; +}