@@ -0,0 +1,9 @@
|
||||
import { usePage } from '@inertiajs/react';
|
||||
import type { WorkContextState } from '@/types/work-context';
|
||||
|
||||
export function useConflictPreparationIdentity() {
|
||||
const { auth, workContext, organizationAccess } = usePage().props;
|
||||
const context = workContext as WorkContextState | null | undefined;
|
||||
const access = organizationAccess as { permissions?: string[] } | null;
|
||||
return `conflicts:${auth.user?.tenant_id}:${auth.user?.id}:${context?.active ?? 'legacy'}:${[...(access?.permissions ?? [])].sort().join(',')}`;
|
||||
}
|
||||
Reference in New Issue
Block a user