Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close (sub)project warning message #1880

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/src/languages/english.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/languages/french.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/languages/georgian.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: "დარწმუნებული ხართ, გინდა რომ დახურო ეს სამუშაო გრაფიკი?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/languages/german.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/languages/portuguese.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/pages/Confirmation/ConfirmationDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
.confirmation-dialog-content {
padding-bottom: 0;
}

.subtitle {
font-weight: bold;
display: flex;
}
23 changes: 21 additions & 2 deletions frontend/src/pages/Confirmation/confirmationDialogCreator.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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: <Typography>{dialogText}</Typography>,
closeContent: (
<>
<Typography className="subtitle">
<WarningIcon />
{dialogWarning}
</Typography>
<Typography>{dialogText}</Typography>
</>
),
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: <Typography>{dialogText}</Typography>,
closeContent: (
<>
<Typography className="subtitle">
<WarningIcon />
{dialogWarning}
</Typography>
<Typography>{dialogText}</Typography>
</>
),
closeConfirmButtonText: closeTitle
};
};
Expand Down
Loading