Prepare Kalendartool for MPM and disable invites

This commit is contained in:
Kühn
2026-10-08 15:06:22 +02:00
parent bc49c3074e
commit 556202575e
50 changed files with 905 additions and 836 deletions

View File

@@ -12,6 +12,7 @@
* - Loeschen ausschliesslich durch Admins (Server prueft final)
* - Legende: eigene vs. fremde Reservierungen
*/
import { appFetch } from '@/lib/client-fetch';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { ModalShell } from '@/components/ui/ModalShell';
import { Button, ErrorMessage, Input, Label } from '@/components/ui/ui';
@@ -189,7 +190,7 @@ export function CalendarModal({
setIsLoading(true);
setError(null);
try {
const response = await fetch(
const response = await appFetch(
`/api/calendars/${calendarId}/reservations?from=${encodeURIComponent(window.from)}&to=${encodeURIComponent(window.to)}`,
);
if (!response.ok) {
@@ -231,7 +232,7 @@ export function CalendarModal({
}
try {
const response = await fetch(`/api/calendars/${calendarId}/reservations`, {
const response = await appFetch(`/api/calendars/${calendarId}/reservations`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -261,7 +262,7 @@ export function CalendarModal({
setDeletingId(reservationId);
setError(null);
try {
const response = await fetch(`/api/reservations/${reservationId}`, {
const response = await appFetch(`/api/reservations/${reservationId}`, {
method: 'DELETE',
});
if (!response.ok) {