permission changes
This commit is contained in:
@@ -17,6 +17,9 @@ import PersonalWarningsBanner from '../components/dashboard/PersonalWarningsBann
|
||||
|
||||
function Dashboard() {
|
||||
const { user } = useAuth();
|
||||
const canViewAtemschutz = user?.groups?.some(g =>
|
||||
['dashboard_admin', 'dashboard_kommando', 'dashboard_atemschutz', 'dashboard_moderator'].includes(g)
|
||||
) ?? false;
|
||||
const [dataLoading, setDataLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -83,6 +86,7 @@ function Dashboard() {
|
||||
</Box>
|
||||
|
||||
{/* Atemschutz Status Card */}
|
||||
{canViewAtemschutz && (
|
||||
<Box>
|
||||
<Fade in={!dataLoading} timeout={600} style={{ transitionDelay: '400ms' }}>
|
||||
<Box>
|
||||
@@ -90,6 +94,7 @@ function Dashboard() {
|
||||
</Box>
|
||||
</Fade>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{/* Upcoming Events Widget */}
|
||||
<Box>
|
||||
|
||||
Reference in New Issue
Block a user