calendar and vehicle booking rework
This commit is contained in:
@@ -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 }}>
|
||||
|
||||
Reference in New Issue
Block a user