diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index bc5733294..fb35753ff 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -227,6 +227,7 @@ "unlinkTicket": "Unlink from Jira", "noTagsAvailable": "No tags available", "noAssociatedTags": "This tag category has no associated tags.", + "cannotRemoveBusinessServiceAssociatedWithApplication": "Cannot remove a business service associated with application(s)", "updateFailed": "Update failed.", "updateRequestSubmitted": "Update request submitted.", "cancelationFailed": "Cancelation failed.", diff --git a/client/src/app/pages/controls/ControlTableActionButtons.tsx b/client/src/app/pages/controls/ControlTableActionButtons.tsx new file mode 100644 index 000000000..8091dee88 --- /dev/null +++ b/client/src/app/pages/controls/ControlTableActionButtons.tsx @@ -0,0 +1,48 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { controlsWriteScopes, RBAC, RBAC_TYPE } from "@app/rbac"; +import { ActionsColumn, Td } from "@patternfly/react-table"; +import { Button, Tooltip } from "@patternfly/react-core"; +import { PencilAltIcon } from "@patternfly/react-icons"; + +export interface ControlTableActionButtonsProps { + isDeleteEnabled?: boolean; + deleteTooltipMessage?: string; + onEdit: () => void; + onDelete: () => void; +} + +export const ControlTableActionButtons: React.FC< + ControlTableActionButtonsProps +> = ({ + isDeleteEnabled = false, + deleteTooltipMessage = "", + onEdit, + onDelete, +}) => { + const { t } = useTranslation(); + return ( + + + + + + @@ -263,9 +269,11 @@ export const BusinessServices: React.FC = () => { {businessService.owner?.name} - setCreateUpdateModalState(businessService) }