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

@@ -11,6 +11,7 @@
* Wird aus der Sidebar ueber das Profil-Badge geoeffnet; nach dem
* Speichern aktualisiert router.refresh() die Sidebar sofort.
*/
import { appFetch } from '@/lib/client-fetch';
import { useCallback, useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import { Button, ErrorMessage, Input, Label, Badge } from '@/components/ui/ui';
@@ -35,7 +36,7 @@ export function ProfileModal({ onClose }: { onClose: () => void }) {
setIsLoading(true);
setError(null);
try {
const response = await fetch('/api/me/profile', { cache: 'no-store' });
const response = await appFetch('/api/me/profile', { cache: 'no-store' });
if (!response.ok) {
throw new Error('Profil konnte nicht geladen werden.');
}
@@ -66,7 +67,7 @@ export function ProfileModal({ onClose }: { onClose: () => void }) {
const username = String(formData.get('username') ?? '').trim();
try {
const response = await fetch('/api/me/profile', {
const response = await appFetch('/api/me/profile', {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username: username || null }),