Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Add confirmation dialog (#2501)

Thomas Kaul0375b938a20d
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 0ffa77bf06..bcf7679d0d 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() {