calendar and vehicle booking rework

This commit is contained in:
Matthias Hochmeister
2026-03-25 16:18:40 +01:00
parent 7dab359448
commit 21bbe57d6f
5 changed files with 86 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ import { useNavigate } from 'react-router-dom';
import { format, parseISO } from 'date-fns';
import DashboardLayout from '../components/dashboard/DashboardLayout';
import ChatAwareFab from '../components/shared/ChatAwareFab';
import ServiceModePage from '../components/shared/ServiceModePage';
import { useAuth } from '../contexts/AuthContext';
import { usePermissionContext } from '../contexts/PermissionContext';
import { useNotification } from '../contexts/NotificationContext';
@@ -93,7 +94,7 @@ function getCategoryLabel(buchungsArt: BuchungsArt, kategorien: BuchungsKategori
function FahrzeugBuchungen() {
const { user } = useAuth();
const { hasPermission } = usePermissionContext();
const { hasPermission, isFeatureEnabled } = usePermissionContext();
const notification = useNotification();
const navigate = useNavigate();
const queryClient = useQueryClient();
@@ -230,6 +231,10 @@ function FahrzeugBuchungen() {
});
// ── Render ─────────────────────────────────────────────────────────────────
if (!isFeatureEnabled('fahrzeugbuchungen')) {
return <ServiceModePage message="Fahrzeugbuchungen befinden sich aktuell im Wartungsmodus." />;
}
return (
<DashboardLayout>
<Container maxWidth="xl" sx={{ py: 3 }}>