Browse Source

feat(client): create page params interface

pull/7076/head
KenTandrian 4 weeks ago
parent
commit
20f156f695
  1. 8
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
  2. 6
      apps/client/src/app/pages/portfolio/allocations/interfaces/interfaces.ts

8
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);
}
});
}

6
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;
}
Loading…
Cancel
Save