From 1be5fbc5286bf31098269a5e95a63df2f40a7c01 Mon Sep 17 00:00:00 2001 From: Yarin Dekel Date: Sun, 9 Dec 2018 11:14:44 +0200 Subject: WF- add notification when archived wf Issue-ID: SDC-1995 Change-Id: I83b3ae7df2da5f2201359e21bd9f2568fb0d5749 Signed-off-by: Yarin Dekel --- .../src/features/workflow/overview/overviewSagas.js | 13 +++++++++++-- .../src/main/frontend/src/i18n/languages.json | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js index 89684d44..9193c5b0 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js +++ b/workflow-designer-ui/src/main/frontend/src/features/workflow/overview/overviewSagas.js @@ -29,6 +29,7 @@ import { setWorkflowAction } from 'features/workflow/workflowConstants'; import { notificationActions } from 'shared/notifications/notificationsActions'; import { fetchWorkflow } from 'features/catalog/catalogActions'; import { WORKFLOW_STATUS } from 'features/workflow/workflowConstants'; +import { I18n } from 'react-redux-i18n'; export function* getOverview({ payload }) { try { @@ -46,8 +47,8 @@ export function* updateWorkflow(action) { yield call(overviewApi.updateWorkflow, action.payload); yield put( notificationActions.showSuccess({ - title: 'Update Workflow', - message: 'Successfully updated' + title: I18n.t('workflow.overview.updateTitle'), + message: I18n.t('workflow.overview.updateNotification') }) ); } catch (e) { @@ -85,6 +86,14 @@ export function* restoreWorkflow(action) { export function* archiveWorkflow(action) { const { history } = action.payload; yield archiveRestoreWorkflow(action); + yield put( + notificationActions.showSuccess({ + title: I18n.t('workflow.overview.archiveTitle'), + message: I18n.t('workflow.overview.archiveNotification', { + name: action.payload.name + }) + }) + ); history.push('/'); } diff --git a/workflow-designer-ui/src/main/frontend/src/i18n/languages.json b/workflow-designer-ui/src/main/frontend/src/i18n/languages.json index c52a3839..b4c38266 100644 --- a/workflow-designer-ui/src/main/frontend/src/i18n/languages.json +++ b/workflow-designer-ui/src/main/frontend/src/i18n/languages.json @@ -51,6 +51,10 @@ "backBtnLabel": "WORKFLOW CATALOG", "archived": "Archived", "archive": "ARCHIVE", + "archiveTitle": "Archive", + "updateTitle": "Update Workflow", + "updateNotification": "Successfully updated", + "archiveNotification": "\"%{name}\" successfully archived", "confirmArchive": "Are you sure you want to archive \"%{name}\"?" }, "inputOutput": { -- cgit 1.2.3-korg