Skip to content

Commit

Permalink
fix: misc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Hu <[email protected]>
  • Loading branch information
MasWho committed Feb 19, 2025
1 parent 9f5e30b commit ebe8130
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/pages/permissions/PermissionIdpGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const PermissionIdpGroups: FC = () => {
title={
canEditGroup(idpGroup)
? "Edit details"
: "You do not have permission to edit this IDP group"
: "You do not have permission to modify this IDP group"
}
disabled={!canEditGroup(idpGroup)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/permissions/actions/BulkDeleteIdentitiesBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const BulkDeleteIdentitiesBtn: FC<Props & ButtonProps> = ({
))}
</ul>
You do not have permission to delete the following{" "}
{pluralize("identity", deletableIdentities.length)}:
{pluralize("identity", restrictedIdentities.length)}:
<ul>
{restrictedIdentities.map((identity) => (
<li key={identity.name}>{identity.name}</li>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/permissions/actions/EditIdentityGroupsBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ const EditIdentityGroupsBtn: FC<Props & ButtonProps> = ({
);

const getRestrictedWarning = () => {
const test = restrictedIdentities
const restrictedList = restrictedIdentities
.map((identity) => `\n- ${identity.name}`)
.join("");
return `You do not have permission to modify ${restrictedIdentities.length > 1 ? "some of the selected" : "the selected"} ${pluralize("identity", restrictedIdentities.length)}:${test}`;
return `You do not have permission to modify ${restrictedIdentities.length > 1 ? "some of the selected" : "the selected"} ${pluralize("identity", restrictedIdentities.length)}:${restrictedList}`;
};

return (
Expand Down
18 changes: 9 additions & 9 deletions src/pages/permissions/panels/EditGroupIdentitiesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,6 @@ const EditGroupIdentitiesPanel: FC<Props> = ({ groups }) => {
defaultSort: "name",
});

const confirmButtonText = modifiedIdentities.size
? `Apply ${modifiedIdentities.size} identity ${pluralize("change", modifiedIdentities.size)}`
: "Modify identities";

const panelTitle =
groups.length > 1
? `Change identities for ${groups.length} groups`
: `Change identities for ${groups[0]?.name}`;

const content = (
<ScrollableTable
dependencies={[identities, modifiedIdentities.size, notify.notification]}
Expand All @@ -287,6 +278,15 @@ const EditGroupIdentitiesPanel: FC<Props> = ({ groups }) => {
</ScrollableTable>
);

const confirmButtonText = modifiedIdentities.size
? `Apply ${modifiedIdentities.size} identity ${pluralize("change", modifiedIdentities.size)}`
: "Modify identities";

const panelTitle =
groups.length > 1
? `Change identities for ${groups.length} groups`
: `Change identities for ${groups[0]?.name}`;

return (
<>
<SidePanel isOverlay loading={isLoading} hasError={!identities}>
Expand Down

0 comments on commit ebe8130

Please sign in to comment.