<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" />
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
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={getSettingsPath(SettingsPath.Roles)} />;
|
|
}
|
|
|
|
if (!isDefined(objectMetadataId)) {
|
|
return (
|
|
<Navigate to={getSettingsPath(SettingsPath.RoleDetail, { roleId })} />
|
|
);
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<SettingsRolesQueryEffect />
|
|
<SettingsRolePermissionsObjectLevelObjectForm
|
|
roleId={roleId}
|
|
objectMetadataId={objectMetadataId}
|
|
/>
|
|
</>
|
|
);
|
|
};
|