Skip to content

Commit

Permalink
Merge branch 'main' into wsl_tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sjd78 authored Sep 10, 2024
2 parents 53e2160 + 76c60f2 commit 0440e3c
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions client/src/app/pages/controls/stakeholders/stakeholders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
import CubesIcon from "@patternfly/react-icons/dist/esm/icons/cubes-icon";

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";
Expand All @@ -51,6 +50,8 @@ import {
TableRowContentWithControls,
} from "@app/components/TableControls";
import { StakeholderForm } from "./components/stakeholder-form";
import { controlsWriteScopes, RBAC, RBAC_TYPE } from "@app/rbac";
import { ControlTableActionButtons } from "../ControlTableActionButtons";

export const Stakeholders: React.FC = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -210,17 +211,22 @@ export const Stakeholders: React.FC = () => {
<ToolbarContent>
<FilterToolbar {...filterToolbarProps} />
<ToolbarGroup variant="button-group">
<ToolbarItem>
<Button
type="button"
id="create-stakeholder"
aria-label="Create new stakeholder"
variant={ButtonVariant.primary}
onClick={() => setCreateUpdateModalState("create")}
>
{t("actions.createNew")}
</Button>
</ToolbarItem>
<RBAC
allowedPermissions={controlsWriteScopes}
rbacType={RBAC_TYPE.Scope}
>
<ToolbarItem>
<Button
type="button"
id="create-stakeholder"
aria-label="Create new stakeholder"
variant={ButtonVariant.primary}
onClick={() => setCreateUpdateModalState("create")}
>
{t("actions.createNew")}
</Button>
</ToolbarItem>
</RBAC>
</ToolbarGroup>
<ToolbarItem {...paginationToolbarItemProps}>
<SimplePagination
Expand Down Expand Up @@ -299,7 +305,7 @@ export const Stakeholders: React.FC = () => {
>
{stakeholder.stakeholderGroups?.length}
</Td>
<AppTableActionButtons
<ControlTableActionButtons
onEdit={() =>
setCreateUpdateModalState(stakeholder)
}
Expand Down

0 comments on commit 0440e3c

Please sign in to comment.