From ff8ce55c6a1a02d9a4cedf836f5ce0111be61bcc Mon Sep 17 00:00:00 2001 From: Katrin Yordanova Date: Tue, 27 Jun 2023 18:29:09 +0300 Subject: [PATCH] Fix wf notifications --- client/web/workflow/src/views/Workflow/Editor.vue | 12 +++++------- locale/en/corteza-webapp-workflow/notification.yaml | 4 +++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/web/workflow/src/views/Workflow/Editor.vue b/client/web/workflow/src/views/Workflow/Editor.vue index f8e214402..1bff28838 100644 --- a/client/web/workflow/src/views/Workflow/Editor.vue +++ b/client/web/workflow/src/views/Workflow/Editor.vue @@ -174,7 +174,7 @@ export default { window.onbeforeunload = null this.workflow = wf - this.toastSuccess(this.$t('notification:updated-workflow')) + this.toastSuccess(this.$t('notification:update.success')) if (isNew) { // Redirect to edit route if new @@ -194,10 +194,9 @@ export default { // Disable unsaved changes prompt this.workflow = {} this.$router.push({ name: 'workflow.list' }) - - this.toastSuccess(this.$t('notification:deleted-workflow')) + this.toastSuccess(this.$t('notification:delete.success')) }) - .catch(this.toastErrorHandler(this.$t('notification:delete-failed'))) + .catch(this.toastErrorHandler(this.$t('notification:delete.failed'))) } }, @@ -207,10 +206,9 @@ export default { .then(() => { this.workflow.deletedAt = undefined this.workflow.deletedBy = undefined - - this.toastSuccess(this.$t('notification:undelete-workflow')) + this.toastSuccess(this.$t('notification:undelete.success')) }) - .catch(this.toastErrorHandler(this.$t('notification:undelete-failed'))) + .catch(this.toastErrorHandler(this.$t('notification:undelete.failed'))) } }, }, diff --git a/locale/en/corteza-webapp-workflow/notification.yaml b/locale/en/corteza-webapp-workflow/notification.yaml index 5a8777bc8..c145062e9 100644 --- a/locale/en/corteza-webapp-workflow/notification.yaml +++ b/locale/en/corteza-webapp-workflow/notification.yaml @@ -33,8 +33,10 @@ import: 'test-in-progress': Test in progress 'trace-unavailable': Trace not available 'trigger-paths-changed': Trigger paths changed -'updated-workflow': Workflow updated 'workflow-test-completed': Workflow test completed +update: + success: Workflow updated + failed: Failed to update workflow delete: success: Workflow deleted failed: Failed to delete workflow