From 33a8ab4ecff7e563e0f9b808118c143b8644a368 Mon Sep 17 00:00:00 2001
From: Miguel Cabrerizo <30386061+doncicuto@users.noreply.github.com>
Date: Tue, 13 Jun 2023 17:31:18 +0200
Subject: [PATCH] feat(console): warning if backdrop click or escape key is
pressed when new action form is dirty (#5989)
* fix: add action control esc and backdrop click
* fix: set values for new action and update action
* feat: add translations for supported languages
* feat: add some comments
* fix: add suggested changes by @peintnermax
---
.../action-table/action-table.component.ts | 2 +
.../add-action-dialog.component.html | 38 ++++----
.../add-action-dialog.component.ts | 87 ++++++++++++++-----
console/src/assets/i18n/de.json | 9 +-
console/src/assets/i18n/en.json | 9 +-
console/src/assets/i18n/es.json | 9 +-
console/src/assets/i18n/fr.json | 9 +-
console/src/assets/i18n/it.json | 8 +-
console/src/assets/i18n/ja.json | 9 +-
console/src/assets/i18n/pl.json | 9 +-
console/src/assets/i18n/zh.json | 11 ++-
11 files changed, 151 insertions(+), 49 deletions(-)
diff --git a/console/src/app/pages/actions/action-table/action-table.component.ts b/console/src/app/pages/actions/action-table/action-table.component.ts
index 0b3f7a5948..f767c098b3 100644
--- a/console/src/app/pages/actions/action-table/action-table.component.ts
+++ b/console/src/app/pages/actions/action-table/action-table.component.ts
@@ -98,6 +98,7 @@ export class ActionTableComponent implements OnInit {
const dialogRef = this.dialog.open(AddActionDialogComponent, {
data: {},
width: '500px',
+ disableClose: true,
});
dialogRef.afterClosed().subscribe((req: CreateActionRequest) => {
@@ -120,6 +121,7 @@ export class ActionTableComponent implements OnInit {
action: action,
},
width: '500px',
+ disableClose: true,
});
dialogRef.afterClosed().subscribe((req: UpdateActionRequest) => {
diff --git a/console/src/app/pages/actions/add-action-dialog/add-action-dialog.component.html b/console/src/app/pages/actions/add-action-dialog/add-action-dialog.component.html
index 3cd1357994..4fbce57fce 100644
--- a/console/src/app/pages/actions/add-action-dialog/add-action-dialog.component.html
+++ b/console/src/app/pages/actions/add-action-dialog/add-action-dialog.component.html
@@ -2,27 +2,29 @@
{{ 'FLOWS.DIALOG.UPDATE.TITLE' | translate }}
-
- {{ 'FLOWS.NAME' | translate }}
-
-
+