d15a13e485
- Delete all ops page components (ReviewQueue, AIMonitoring, Governance, SourceMonitoring, ActivityTimeline, SignalPipeline) - Remove OPERATIONS workspace from AppShell config, nav order, path detection - Remove all /ops/* routes from App.tsx - Remove WorkspaceType.OPERATIONS from allowedWorkspaces in authService, sessionStore, permissions - Keep MarketIntelligence page (already moved to /supply/market-intelligence) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
1.6 KiB
TypeScript
76 lines
1.6 KiB
TypeScript
import { Box, Button, Typography } from '@mui/material'
|
|
import type { SxProps, Theme } from '@mui/material'
|
|
import { ShieldOff } from 'lucide-react'
|
|
import { useNavigate } from 'react-router'
|
|
|
|
interface AccessDeniedProps {
|
|
title?: string
|
|
message?: string
|
|
onBack?: () => void
|
|
sx?: SxProps<Theme>
|
|
}
|
|
|
|
export function AccessDenied({
|
|
title = 'Kein Zugriff',
|
|
message = 'Sie haben keine Berechtigung, diesen Bereich zu öffnen.',
|
|
onBack,
|
|
sx,
|
|
}: AccessDeniedProps) {
|
|
const navigate = useNavigate()
|
|
|
|
function handleBack() {
|
|
if (onBack) {
|
|
onBack()
|
|
} else {
|
|
navigate(-1)
|
|
}
|
|
}
|
|
|
|
return (
|
|
<Box
|
|
sx={{
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
minHeight: 400,
|
|
gap: 2,
|
|
p: 4,
|
|
...sx,
|
|
}}
|
|
>
|
|
<Box
|
|
sx={{
|
|
width: 56,
|
|
height: 56,
|
|
borderRadius: '50%',
|
|
bgcolor: 'rgba(239,68,68,0.08)',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
}}
|
|
>
|
|
<ShieldOff size={28} color="#ef4444" />
|
|
</Box>
|
|
|
|
<Box sx={{ textAlign: 'center', maxWidth: 400 }}>
|
|
<Typography variant="h6" sx={{ fontWeight: 600, mb: 0.5 }}>
|
|
{title}
|
|
</Typography>
|
|
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
|
|
{message}
|
|
</Typography>
|
|
</Box>
|
|
|
|
<Button
|
|
variant="outlined"
|
|
size="small"
|
|
onClick={handleBack}
|
|
sx={{ mt: 1, textTransform: 'none' }}
|
|
>
|
|
Zurück
|
|
</Button>
|
|
</Box>
|
|
)
|
|
}
|