Browse Source

fix(client): update on close holding

pull/5832/head
KenTandrian 6 days ago
parent
commit
2d39451476
  1. 17
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

17
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

@ -562,7 +562,7 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
const today = new Date(); const today = new Date();
const activity: CreateOrderDto = { const activity: CreateOrderDto = {
accountId: null, accountId: this.accounts.length === 1 ? this.accounts[0].id : null,
comment: null, comment: null,
currency: this.SymbolProfile.currency, currency: this.SymbolProfile.currency,
dataSource: this.SymbolProfile.dataSource, dataSource: this.SymbolProfile.dataSource,
@ -575,13 +575,16 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
unitPrice: this.marketPrice unitPrice: this.marketPrice
}; };
this.dataService.postOrder(activity).subscribe(() => { this.dataService
this.router.navigate( .postOrder(activity)
internalRoutes.portfolio.subRoutes.activities.routerLink .pipe(takeUntil(this.unsubscribeSubject))
); .subscribe(() => {
this.router.navigate(
internalRoutes.portfolio.subRoutes.activities.routerLink
);
this.dialogRef.close(); this.dialogRef.close();
}); });
} }
public onExport() { public onExport() {

Loading…
Cancel
Save