|
|
@ -42,7 +42,6 @@ import { |
|
|
|
} from '@angular/material/sort'; |
|
|
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table'; |
|
|
|
import { MatTooltipModule } from '@angular/material/tooltip'; |
|
|
|
import { Router, RouterModule } from '@angular/router'; |
|
|
|
import { isUUID } from 'class-validator'; |
|
|
|
import { endOfToday, isAfter } from 'date-fns'; |
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
|
|
@ -64,8 +63,7 @@ import { Subject, Subscription, takeUntil } from 'rxjs'; |
|
|
|
MatSortModule, |
|
|
|
MatTableModule, |
|
|
|
MatTooltipModule, |
|
|
|
NgxSkeletonLoaderModule, |
|
|
|
RouterModule |
|
|
|
NgxSkeletonLoaderModule |
|
|
|
], |
|
|
|
schemas: [CUSTOM_ELEMENTS_SCHEMA], |
|
|
|
selector: 'gf-activities-table', |
|
|
@ -95,6 +93,7 @@ export class GfActivitiesTableComponent |
|
|
|
@Input() totalItems = Number.MAX_SAFE_INTEGER; |
|
|
|
|
|
|
|
@Output() activitiesDeleted = new EventEmitter<void>(); |
|
|
|
@Output() activityClicked = new EventEmitter<AssetProfileIdentifier>(); |
|
|
|
@Output() activityDeleted = new EventEmitter<string>(); |
|
|
|
@Output() activityToClone = new EventEmitter<OrderWithAccount>(); |
|
|
|
@Output() activityToUpdate = new EventEmitter<OrderWithAccount>(); |
|
|
@ -122,10 +121,7 @@ export class GfActivitiesTableComponent |
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
public constructor( |
|
|
|
private notificationService: NotificationService, |
|
|
|
private router: Router |
|
|
|
) {} |
|
|
|
public constructor(private notificationService: NotificationService) {} |
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
|
if (this.showCheckbox) { |
|
|
@ -203,7 +199,7 @@ export class GfActivitiesTableComponent |
|
|
|
activity.isDraft === false && |
|
|
|
['BUY', 'DIVIDEND', 'SELL'].includes(activity.type) |
|
|
|
) { |
|
|
|
this.onOpenPositionDialog({ |
|
|
|
this.activityClicked.emit({ |
|
|
|
dataSource: activity.SymbolProfile.dataSource, |
|
|
|
symbol: activity.SymbolProfile.symbol |
|
|
|
}); |
|
|
@ -268,12 +264,6 @@ export class GfActivitiesTableComponent |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public onOpenPositionDialog({ dataSource, symbol }: AssetProfileIdentifier) { |
|
|
|
this.router.navigate([], { |
|
|
|
queryParams: { dataSource, symbol, holdingDetailDialog: true } |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
public onUpdateActivity(aActivity: OrderWithAccount) { |
|
|
|
this.activityToUpdate.emit(aActivity); |
|
|
|
} |
|
|
|