From 4d66e90eb9fc7043f351c785059a8185a8d033e0 Mon Sep 17 00:00:00 2001 From: Peter Baus Date: Mon, 17 Jun 2024 13:49:52 +0200 Subject: [PATCH] ui:Close (sub)project warning message --- frontend/src/languages/english.js | 2 ++ frontend/src/languages/french.js | 2 ++ frontend/src/languages/georgian.js | 2 ++ frontend/src/languages/german.js | 2 ++ frontend/src/languages/portuguese.js | 2 ++ .../Confirmation/ConfirmationDialog.scss | 5 ++++ .../Confirmation/confirmationDialogCreator.js | 23 +++++++++++++++++-- 7 files changed, 36 insertions(+), 2 deletions(-) diff --git a/frontend/src/languages/english.js b/frontend/src/languages/english.js index 1d98a16d1..2a9b621ba 100644 --- a/frontend/src/languages/english.js +++ b/frontend/src/languages/english.js @@ -394,8 +394,10 @@ const en = { post_actions_dialog_text: "After creation following actions are executed", project_close: "Close project", project_close_text: "Are you sure, you want to close this project?", + project_close_warning: "If you close the project, you will no longer be able to make changes or add information to it.", subproject_close: "Close subproject", subproject_close_text: "Are you sure, you want to close this subproject?", + subproject_close_warning: "If you close the subproject, you will no longer be able to make changes or add information to it.", user_group: "User/Group", workflowitem_close: "Close workflowitem", workflowitem_close_text: "Do you want to accept and close this workflowitem?", diff --git a/frontend/src/languages/french.js b/frontend/src/languages/french.js index 78ca115e2..2bcc7b07d 100644 --- a/frontend/src/languages/french.js +++ b/frontend/src/languages/french.js @@ -398,8 +398,10 @@ const fr = { post_actions_dialog_text: "Après la création, les actions suivantes sont exécutées", project_close: "Fermer projet", project_close_text: "Vous êtes sûr de vouloir fermer ce projet?", + project_close_warning: "Si vous fermez le projet, vous ne pourrez plus y apporter de modifications ni y ajouter d'informations.", subproject_close: "Fermer la composante", subproject_close_text: "Vous êtes sûr de vouloir fermer cette composante ?", + subproject_close_warning: "Si vous fermez le sous-projet, vous ne pourrez plus y apporter de modifications ni y ajouter d'informations.", user_group: "Utilisateur/Groupe", workflowitem_close: "Fermer l’étape de workflow ", workflowitem_close_text: "Êtes-vous sûr de vouloir fermer cette étape de workflow?", diff --git a/frontend/src/languages/georgian.js b/frontend/src/languages/georgian.js index 04be3882b..26a6775fc 100644 --- a/frontend/src/languages/georgian.js +++ b/frontend/src/languages/georgian.js @@ -397,8 +397,10 @@ const ka = { post_actions_dialog_text: "შექმნის შემდეგ შესრულებულია შემდეგი მოქმედებები", project_close: "პროექტის დახურვა", project_close_text: "დარწმუნებული ხართ, გსურთ ამ პროექტის დახურვა?", + project_close_warning: "თუ პროექტს დახურავთ, ვეღარ შეძლებთ მასში ცვლილებების შეტანას ან ინფორმაციის დამატებას.", subproject_close: "ქვეპროექტის დახურვა", subproject_close_text: "დარწმუნებული ხართ, გსურთ ამ ქვეპროექტის დახურვა?", + subproject_close_warning: "თუ დახურავთ ქვეპროექტს, ვეღარ შეძლებთ მასში ცვლილებების შეტანას ან ინფორმაციის დამატებას.", user_group: "მომხმარებელი/ჯგუფი", workflowitem_close: "სამუშაო ნაკადის დახურვა", workflowitem_close_text: "დარწმუნებული ხართ, გინდა რომ დახურო ეს სამუშაო გრაფიკი?", diff --git a/frontend/src/languages/german.js b/frontend/src/languages/german.js index ecdb31ce6..6efda8294 100644 --- a/frontend/src/languages/german.js +++ b/frontend/src/languages/german.js @@ -398,8 +398,10 @@ const de = { post_actions_dialog_text: "Nach Erstellung des Workflowitems werden folgende Aktionen ausgeführt", project_close: "Projekt schließen", project_close_text: "Sind Sie sicher, dass Sie dieses Projekt schließen wollen?", + project_close_warning: "Wenn Sie das Projekt schließen, können Sie keine Änderungen mehr vornehmen oder Informationen hinzufügen.", subproject_close: "Subprojekt schließen", subproject_close_text: "Sind Sie sicher, dass Sie dieses Subprojekt schließen wollen?", + subproject_close_warning: "Wenn Sie das Subprojekt schließen, können Sie keine Änderungen mehr vornehmen oder Informationen hinzufügen.", user_group: "Benutzer/Gruppe", workflowitem_close: "Workflowitem schließen", workflowitem_close_text: "Sind Sie sicher, dass Sie dieses Workflow-Item schließen wollen?", diff --git a/frontend/src/languages/portuguese.js b/frontend/src/languages/portuguese.js index d09229e2c..94ed0f9ce 100644 --- a/frontend/src/languages/portuguese.js +++ b/frontend/src/languages/portuguese.js @@ -399,8 +399,10 @@ const pt = { post_actions_dialog_text: "Tem certeza de que deseja criar o workflowitem", project_close: "Fechar projecto", project_close_text: "Tem a certeza de que quer encerrar este projecto?", + project_close_warning: "Se você fechar o projeto, não poderá mais fazer alterações ou adicionar informações a ele.", subproject_close: "Fechar subprojecto", subproject_close_text: "Tem a certeza de que quer encerrar este subprojecto?", + subproject_close_warning: "Se você fechar o subprojeto, não poderá mais fazer alterações ou adicionar informações a ele.", user_group: "Usuários/Grupo", workflowitem_close: "Fechar item de workflow", workflowitem_close_text: "Tem a certeza de que quer encerrar este item do fluxo de trabalho?", diff --git a/frontend/src/pages/Confirmation/ConfirmationDialog.scss b/frontend/src/pages/Confirmation/ConfirmationDialog.scss index 89707fb51..e7b61c13b 100644 --- a/frontend/src/pages/Confirmation/ConfirmationDialog.scss +++ b/frontend/src/pages/Confirmation/ConfirmationDialog.scss @@ -20,3 +20,8 @@ .confirmation-dialog-content { padding-bottom: 0; } + +.subtitle { + font-weight: bold; + display: flex; +} diff --git a/frontend/src/pages/Confirmation/confirmationDialogCreator.js b/frontend/src/pages/Confirmation/confirmationDialogCreator.js index fcc74f047..f47411d86 100644 --- a/frontend/src/pages/Confirmation/confirmationDialogCreator.js +++ b/frontend/src/pages/Confirmation/confirmationDialogCreator.js @@ -1,6 +1,7 @@ import React from "react"; import _isEmpty from "lodash/isEmpty"; +import WarningIcon from "@mui/icons-material/Warning"; import { Typography } from "@mui/material"; import Dialog from "@mui/material/Dialog"; import DialogContent from "@mui/material/DialogContent"; @@ -482,22 +483,40 @@ const _createAdditionalActionsText = (intent, payload) => { const _createCloseProjectText = () => { const dialogText = strings.confirmation.project_close_text; + const dialogWarning = strings.confirmation.project_close_warning; const closeTitle = strings.confirmation.project_close; return { closeTitle, - closeContent: {dialogText}, + closeContent: ( + <> + + + {dialogWarning} + + {dialogText} + + ), closeConfirmButtonText: closeTitle }; }; const _createCloseSubProjectText = () => { const dialogText = strings.confirmation.subproject_close_text; + const dialogWarning = strings.confirmation.subproject_close_warning; const closeTitle = strings.confirmation.subproject_close; return { closeTitle, - closeContent: {dialogText}, + closeContent: ( + <> + + + {dialogWarning} + + {dialogText} + + ), closeConfirmButtonText: closeTitle }; };