From 6f311708a97164bc7b87825ccb6b74c771ee5c1b Mon Sep 17 00:00:00 2001 From: Michael Huang Date: Mon, 23 Apr 2018 13:26:58 -0400 Subject: [PATCH] Fixing Issue #578: Adding deletion dialog (#889) Adding an additional dialog message to the 2.0 development branch that will require the user to press yes twice before the entity and all associated flows and code are deleted --- .../main/ui/app/entity-modeler/entity-modeler.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quick-start/src/main/ui/app/entity-modeler/entity-modeler.component.ts b/quick-start/src/main/ui/app/entity-modeler/entity-modeler.component.ts index b06c0ef553..8b0bdf1f64 100644 --- a/quick-start/src/main/ui/app/entity-modeler/entity-modeler.component.ts +++ b/quick-start/src/main/ui/app/entity-modeler/entity-modeler.component.ts @@ -299,7 +299,10 @@ export class EntityModelerComponent implements AfterViewChecked { deleteEntity(entity: Entity) { let result = this.dialogService.confirm(`Really delete ${entity.name}?`, 'No', 'Yes'); result.subscribe(() => { - this.entitiesService.deleteEntity(entity); + let confirmResult = this.dialogService.confirm(`Are you sure really want to delete the ${entity.name} entity as it will delete the entity and all associated flows and code?`, 'No', 'Yes'); + confirmResult.subscribe(() => { + this.entitiesService.deleteEntity(entity); + }, () => {}); }, () => {}); }