Etapa 5 completa.
Some checks failed
/ Deploy to Cloudflare Pages (push) Has been cancelled

This commit is contained in:
2026-07-07 10:32:02 -03:00
parent bc9f70419c
commit ef9ec472d5
9 changed files with 511 additions and 15 deletions

View File

@@ -60,6 +60,13 @@ export function WorkspacePage() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentProcess?.id, loadLatestForProcess])
// client_viewer no puede editar — redirigir al reporte
useEffect(() => {
if (user?.platformRole === 'client_viewer') {
void navigate({ to: '/report/$processId', params: { processId } })
}
}, [user, processId, navigate])
// Validación XOR: todos los gateways exclusivos deben sumar 1.0
const xorValidation = useMemo(() => {
const invalidIds = gateways
@@ -153,7 +160,7 @@ export function WorkspacePage() {
// isLoading manda siempre, incluso si currentProcess todavía tiene el proceso
// anterior en el store (navegación directa entre dos workspaces distintos).
if (isLoading) {
if (isLoading || user?.platformRole === 'client_viewer') {
return <WorkspaceSkeleton />
}