From b7616e6c0b16a4ff09d044d223790474e8adb6de Mon Sep 17 00:00:00 2001 From: DvoraShechter1 Date: Thu, 19 Sep 2024 18:01:50 +0300 Subject: [PATCH 1/4] add ActionsColumn to Job Functions table Signed-off-by: DvoraShechter1 --- .../src/app/pages/controls/job-functions/job-functions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/app/pages/controls/job-functions/job-functions.tsx b/client/src/app/pages/controls/job-functions/job-functions.tsx index d6b76d6e2f..862f62da8f 100644 --- a/client/src/app/pages/controls/job-functions/job-functions.tsx +++ b/client/src/app/pages/controls/job-functions/job-functions.tsx @@ -16,7 +16,6 @@ import { import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table"; import { AppPlaceholder } from "@app/components/AppPlaceholder"; -import { AppTableActionButtons } from "@app/components/AppTableActionButtons"; import { ConditionalRender } from "@app/components/ConditionalRender"; import { ConfirmDialog } from "@app/components/ConfirmDialog"; import { getAxiosErrorMessage } from "@app/utils/utils"; @@ -37,6 +36,7 @@ import { import { useLocalTableControls } from "@app/hooks/table-controls"; import { CubesIcon } from "@patternfly/react-icons"; import { RBAC, RBAC_TYPE, controlsWriteScopes } from "@app/rbac"; +import { ControlTableActionButtons } from "../ControlTableActionButtons"; export const JobFunctions: React.FC = () => { const { t } = useTranslation(); @@ -215,9 +215,9 @@ export const JobFunctions: React.FC = () => { {jobFunction.name} - setCreateUpdateModalState(jobFunction)} onDelete={() => deleteRow(jobFunction)} /> From 278774559ea07cd2e283d8132e0ba4abc47dea41 Mon Sep 17 00:00:00 2001 From: DvoraShechter1 Date: Mon, 23 Sep 2024 17:16:12 +0300 Subject: [PATCH 2/4] Update translations.json to include deleteTooltipMessage Signed-off-by: DvoraShechter1 --- client/public/locales/en/translation.json | 1 + client/public/locales/es/translation.json | 1 + 2 files changed, 2 insertions(+) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index 6942e06e7d..539aa7cf17 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -108,6 +108,7 @@ "message": { "applicationsBulkDelete": "The selected application(s) will be deleted.", "delete": "This action cannot be undone.", + "deleteTooltipMessage": "Cannot remove a Job function associated with stakeholder(s)", "discardAssessment": "The assessment(s) for <1>{{applicationName}} will be discarded. Do you wish to continue?", "discardReview": "The review for <1>{{applicationName}} will be discarded. Do you wish to continue?", "leavePage": "Are you sure you want to leave this page? Be sure to save your changes, or they will be lost.", diff --git a/client/public/locales/es/translation.json b/client/public/locales/es/translation.json index 2304a0cccb..b0efc5ab41 100644 --- a/client/public/locales/es/translation.json +++ b/client/public/locales/es/translation.json @@ -77,6 +77,7 @@ "message": { "applicationsBulkDelete": "Se eliminarán las aplicacione(s) seleccionadas.", "delete": "Esta acción no puede ser revertida.", + "deleteTooltipMessage": "No se puede eliminar una función de trabajo asociada con partes interesadas", "discardAssessment": "La evaluación para <1>{{applicationName}} será descartada, también los resultados de la revisión. ¿Deseas continuar?", "leavePage": "¿Estás seguro de querer salir de esta página? Asegúrate de guardar tus cambios o estos se perderán.", "pageError": "¡Ups! Algo salió mal.", From a901283a349c108c909ab8c2eef1cc3031e0e93c Mon Sep 17 00:00:00 2001 From: DvoraShechter1 Date: Mon, 23 Sep 2024 17:20:52 +0300 Subject: [PATCH 3/4] Update deleteTooltipMessage for internationalization Signed-off-by: DvoraShechter1 --- client/src/app/pages/controls/job-functions/job-functions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/pages/controls/job-functions/job-functions.tsx b/client/src/app/pages/controls/job-functions/job-functions.tsx index 862f62da8f..5de6341ae1 100644 --- a/client/src/app/pages/controls/job-functions/job-functions.tsx +++ b/client/src/app/pages/controls/job-functions/job-functions.tsx @@ -217,7 +217,7 @@ export const JobFunctions: React.FC = () => { setCreateUpdateModalState(jobFunction)} onDelete={() => deleteRow(jobFunction)} /> From 4b271605b0e6085093358386e5eb5d00980fe623 Mon Sep 17 00:00:00 2001 From: DvoraShechter1 Date: Thu, 26 Sep 2024 11:37:15 +0300 Subject: [PATCH 4/4] Rename message key and fix translation usage for job function deletion Signed-off-by: DvoraShechter1 --- client/public/locales/en/translation.json | 2 +- client/public/locales/es/translation.json | 1 - client/src/app/pages/controls/job-functions/job-functions.tsx | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index 539aa7cf17..90f7dff216 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -108,7 +108,6 @@ "message": { "applicationsBulkDelete": "The selected application(s) will be deleted.", "delete": "This action cannot be undone.", - "deleteTooltipMessage": "Cannot remove a Job function associated with stakeholder(s)", "discardAssessment": "The assessment(s) for <1>{{applicationName}} will be discarded. Do you wish to continue?", "discardReview": "The review for <1>{{applicationName}} will be discarded. Do you wish to continue?", "leavePage": "Are you sure you want to leave this page? Be sure to save your changes, or they will be lost.", @@ -181,6 +180,7 @@ "blockedDeleteApplication": "Cannot delete {{what}} because it is associated with an application.", "blockedDeleteTarget": "Cannot delete {{what}} because it is associated with a target.", "defaultBlockedDelete": "Cannot delete {{what}} because it is associated with another object.", + "cannotDeleteJobFunctionWithStakeholders": "Cannot remove a Job function associated with stakeholder(s)", "cannotDeleteApplicationsAssignedToMigrationWave": "Cannot delete applications that are assigned to a migration wave.", "cannotDeleteNonEmptyTagCategory": "Cannot delete a tag category that contains tags.", "continueConfirmation": "Yes, continue", diff --git a/client/public/locales/es/translation.json b/client/public/locales/es/translation.json index b0efc5ab41..2304a0cccb 100644 --- a/client/public/locales/es/translation.json +++ b/client/public/locales/es/translation.json @@ -77,7 +77,6 @@ "message": { "applicationsBulkDelete": "Se eliminarán las aplicacione(s) seleccionadas.", "delete": "Esta acción no puede ser revertida.", - "deleteTooltipMessage": "No se puede eliminar una función de trabajo asociada con partes interesadas", "discardAssessment": "La evaluación para <1>{{applicationName}} será descartada, también los resultados de la revisión. ¿Deseas continuar?", "leavePage": "¿Estás seguro de querer salir de esta página? Asegúrate de guardar tus cambios o estos se perderán.", "pageError": "¡Ups! Algo salió mal.", diff --git a/client/src/app/pages/controls/job-functions/job-functions.tsx b/client/src/app/pages/controls/job-functions/job-functions.tsx index 5de6341ae1..2032493413 100644 --- a/client/src/app/pages/controls/job-functions/job-functions.tsx +++ b/client/src/app/pages/controls/job-functions/job-functions.tsx @@ -217,7 +217,9 @@ export const JobFunctions: React.FC = () => { setCreateUpdateModalState(jobFunction)} onDelete={() => deleteRow(jobFunction)} />