Feature/reuse notification service for alert dialogs (#3670)

* Reuse notification service for alert dialogs
This commit is contained in:
Daniel Idem
2024-08-15 10:36:55 +01:00
committed by GitHub
parent 8945f5c784
commit 56ddbaf972
14 changed files with 91 additions and 25 deletions

View File

@@ -1,5 +1,6 @@
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface';
import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service';
import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module';
import { DEFAULT_PAGE_SIZE } from '@ghostfolio/common/config';
import { getDateFormatString, getLocale } from '@ghostfolio/common/helper';
@@ -120,7 +121,10 @@ export class GfActivitiesTableComponent
private unsubscribeSubject = new Subject<void>();
public constructor(private router: Router) {}
public constructor(
private notificationService: NotificationService,
private router: Router
) {}
public ngOnInit() {
if (this.showCheckbox) {
@@ -260,7 +264,9 @@ export class GfActivitiesTableComponent
}
public onOpenComment(aComment: string) {
alert(aComment);
this.notificationService.alert({
title: aComment
});
}
public onOpenPositionDialog({ dataSource, symbol }: AssetProfileIdentifier) {