Skip to content

chore: upgrade to tailwind 4 #19247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update CreateEditRolePageView.tsx
  • Loading branch information
aslilac committed Aug 13, 2025
commit 723228f2c2d74e660bc71456e0662d59e86daab6
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({

const newPermissions = checked
? [
...checkedActions,
{
negate: false,
resource_type: resource_type as RBACResource,
action: action as RBACAction,
},
]
...checkedActions,
{
negate: false,
resource_type: resource_type as RBACResource,
action: action as RBACAction,
},
]
: checkedActions?.filter(
(p) => p.resource_type !== resource_type || p.action !== action,
);
(p) => p.resource_type !== resource_type || p.action !== action,
);

setCheckActions(newPermissions);
await form.setFieldValue("organization_permissions", newPermissions);
Expand All @@ -241,13 +241,13 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({
const newPermissions =
checked || indeterminate
? [
...newCheckedActions,
...Object.keys(resourceActionsForResource).map((resourceKey) => ({
negate: false,
resource_type: resource as RBACResource,
action: resourceKey as RBACAction,
})),
]
...newCheckedActions,
...Object.keys(resourceActionsForResource).map((resourceKey) => ({
negate: false,
resource_type: resource as RBACResource,
action: resourceKey as RBACAction,
})),
]
: [...newCheckedActions];

setCheckActions(newPermissions);
Expand Down Expand Up @@ -349,12 +349,12 @@ const PermissionCheckboxGroup: FC<PermissionCheckboxGroupProps> = ({
e,
form,
checkedActions.length > 0 &&
checkedActions.length < Object.keys(value).length,
checkedActions.length < Object.keys(value).length,
)
}
/>
{resourceKey}
<ul css={styles.checkBoxes}>
<ul css={[styles.checkBoxes, styles.innerCheckBoxes]}>
{Object.entries(value).map(([actionKey, value]) => (
<li key={actionKey} css={styles.actionItem}>
<span css={styles.actionText}>
Expand Down Expand Up @@ -417,6 +417,9 @@ const styles = {
margin: 0,
listStyleType: "none",
},
innerCheckBoxes: {
paddingLeft: 16,
},
actionText: (theme) => ({
color: theme.palette.text.primary,
}),
Expand Down