From 0375b938a20d5d4b6e6f7cd5167fd36eec327b58 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:14:46 +0200 Subject: [PATCH] Add confirmation dialog (#2501) --- .../admin-market-data.component.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index 0ffa77bf0..bcf7679d0 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -178,10 +178,20 @@ export class AdminMarketDataComponent } public onDeleteProfileData({ dataSource, symbol }: UniqueAsset) { - this.adminService - .deleteProfileData({ dataSource, symbol }) - .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + const confirmation = confirm( + $localize`Do you really want to delete this asset profile?` + ); + + if (confirmation) { + this.adminService + .deleteProfileData({ dataSource, symbol }) + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe(() => { + setTimeout(() => { + window.location.reload(); + }, 300); + }); + } } public onGather7Days() {