Browse Source

refactor holding click event handling in GfHoldingsTableComponent

pull/3851/head
prakhar sharma 11 months ago
parent
commit
e287ac53db
  1. 8
      apps/client/src/app/components/home-holdings/home-holdings.component.ts
  2. 1
      apps/client/src/app/components/home-holdings/home-holdings.html

8
apps/client/src/app/components/home-holdings/home-holdings.component.ts

@ -119,6 +119,14 @@ export class HomeHoldingsComponent implements OnDestroy, OnInit {
} }
} }
public onHoldingClicked({ dataSource, symbol }: AssetProfileIdentifier) {
if (dataSource && symbol) {
this.router.navigate([], {
queryParams: { dataSource: dataSource, symbol: symbol, holdingDetailDialog: true }
});
}
}
public ngOnDestroy() { public ngOnDestroy() {
this.unsubscribeSubject.next(); this.unsubscribeSubject.next();
this.unsubscribeSubject.complete(); this.unsubscribeSubject.complete();

1
apps/client/src/app/components/home-holdings/home-holdings.html

@ -50,6 +50,7 @@
[hasPermissionToCreateActivity]="hasPermissionToCreateOrder" [hasPermissionToCreateActivity]="hasPermissionToCreateOrder"
[holdings]="holdings" [holdings]="holdings"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"
(holdingClicked)="onHoldingClicked($event)"
/> />
@if (hasPermissionToCreateOrder && holdings?.length > 0) { @if (hasPermissionToCreateOrder && holdings?.length > 0) {
<div class="text-center"> <div class="text-center">

Loading…
Cancel
Save