From 7ffaf98624514ec60d5c97bced3f0a3c3a27e2da Mon Sep 17 00:00:00 2001 From: DvoraShechter1 <168653685+DvoraShechter1@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:15:09 +0200 Subject: [PATCH] :sparkles: Add ActionsColumn to Job Functions table (#2101) Update the Actions column in the Job Functions table to use PatternFly 5 controls, replacing the PatternFly 4 controls. Relates to #1318 --------- Signed-off-by: DvoraShechter1 --- client/public/locales/en/translation.json | 1 + .../app/pages/controls/job-functions/job-functions.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index c47a362674..a26eb9ebb9 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -185,6 +185,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/src/app/pages/controls/job-functions/job-functions.tsx b/client/src/app/pages/controls/job-functions/job-functions.tsx index d6b76d6e2f..2032493413 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,11 @@ export const JobFunctions: React.FC = () => { {jobFunction.name} - setCreateUpdateModalState(jobFunction)} onDelete={() => deleteRow(jobFunction)} />