role settings various fixes + update role object level permission design (#12664)

<img width="944" alt="Screenshot 2025-06-17 at 12 10 07"
src="https://github.com/user-attachments/assets/abfda0c2-3266-465c-b98e-7bf78660a057"
/>
<img width="943" alt="Screenshot 2025-06-17 at 12 10 00"
src="https://github.com/user-attachments/assets/8fd28479-1f55-4f3a-815c-1195154d3305"
/>
<img width="667" alt="Screenshot 2025-06-17 at 12 09 49"
src="https://github.com/user-attachments/assets/8d444523-4e43-4b59-95bb-45dc5fac5520"
/>
<img width="632" alt="Screenshot 2025-06-17 at 12 09 42"
src="https://github.com/user-attachments/assets/8a1e45bb-7fde-42a6-9f2d-79cbec8121cd"
/>
<img width="643" alt="Screenshot 2025-06-17 at 12 09 36"
src="https://github.com/user-attachments/assets/43f80a92-16e2-4a0e-8a07-2f3e7278ff4a"
/>
This commit is contained in:
Weiko
2025-06-17 16:00:31 +02:00
committed by GitHub
parent f10abec505
commit 8f07f681d2
12 changed files with 350 additions and 162 deletions

View File

@ -1,18 +1,21 @@
import { Navigate, useParams } from 'react-router-dom';
import { SettingsRolesQueryEffect } from '@/settings/roles/components/SettingsRolesQueryEffect';
import { SettingsRolePermissionsObjectLevelObjectForm } from '@/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm';
import { SettingsPath } from '@/types/SettingsPath';
import { Navigate, useParams } from 'react-router-dom';
import { isDefined } from 'twenty-shared/utils';
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
export const SettingsRoleObjectLevel = () => {
const { roleId, objectMetadataId } = useParams();
if (!isDefined(roleId)) {
return <Navigate to="/settings/roles" />;
return <Navigate to={getSettingsPath(SettingsPath.Roles)} />;
}
if (!isDefined(objectMetadataId)) {
return <Navigate to={`/settings/roles/${roleId}`} />;
return (
<Navigate to={getSettingsPath(SettingsPath.RoleDetail, { roleId })} />
);
}
return (