From 20f156f6952f3ef1290e2036293164a258a55b0a Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 20 Jun 2026 12:13:15 +0700 Subject: [PATCH] feat(client): create page params interface --- .../portfolio/allocations/allocations-page.component.ts | 8 +++++--- .../pages/portfolio/allocations/interfaces/interfaces.ts | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 apps/client/src/app/pages/portfolio/allocations/interfaces/interfaces.ts 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; +}