From 5fb613a8f761e1f6f4c343e0a185e01a78045169 Mon Sep 17 00:00:00 2001 From: Weiko Date: Mon, 10 Mar 2025 18:56:23 +0100 Subject: [PATCH] Fix permissions front followup (#10758) --- .../settings/roles/components/Roles.tsx | 31 +++--- .../roles/components/RolesTableHeader.tsx | 13 +-- .../roles/components/RolesTableRow.tsx | 97 +++++++++---------- .../components/RoleAssignment.tsx | 22 +++-- .../components/RoleAssignmentTableHeader.tsx | 9 +- .../RolePermissionsSettingsTableRow.tsx | 2 - .../pages/settings/roles/SettingsRoleEdit.tsx | 30 +++--- .../pages/settings/roles/SettingsRoles.tsx | 9 +- packages/twenty-front/vite.config.ts | 2 - 9 files changed, 109 insertions(+), 106 deletions(-) diff --git a/packages/twenty-front/src/modules/settings/roles/components/Roles.tsx b/packages/twenty-front/src/modules/settings/roles/components/Roles.tsx index cbe5f2ce8..b8e591257 100644 --- a/packages/twenty-front/src/modules/settings/roles/components/Roles.tsx +++ b/packages/twenty-front/src/modules/settings/roles/components/Roles.tsx @@ -7,16 +7,17 @@ import { RolesTableRow } from '@/settings/roles/components/RolesTableRow'; import { Button, H2Title, IconPlus, Section } from 'twenty-ui'; import { Role } from '~/generated-metadata/graphql'; -const StyledTable = styled(Table)` - margin-top: ${({ theme }) => theme.spacing(0.5)}; -`; - -const StyledBottomSection = styled(Section)` +const StyledCreateRoleSection = styled(Section)` border-top: 1px solid ${({ theme }) => theme.border.color.light}; - margin-top: ${({ theme }) => theme.spacing(2)}; - padding-top: ${({ theme }) => theme.spacing(4)}; display: flex; justify-content: flex-end; + padding-top: ${({ theme }) => theme.spacing(2)}; + padding-bottom: ${({ theme }) => theme.spacing(2)}; +`; + +const StyledTableRows = styled.div` + padding-bottom: ${({ theme }) => theme.spacing(2)}; + padding-top: ${({ theme }) => theme.spacing(2)}; `; export const Roles = ({ roles }: { roles: Role[] }) => { @@ -26,13 +27,15 @@ export const Roles = ({ roles }: { roles: Role[] }) => { title={t`All roles`} description={t`Assign roles to specify each member's access permissions`} /> - + - {roles.map((role) => ( - - ))} - - + + {roles.map((role) => ( + + ))} + +
+