Aufgabenkarten in der Gäste-pwa als swipe-barer Stapel umgesetzt. Sofortiges Freigeben von Foto-Uploads als Event-Einstellung implementiert.

This commit is contained in:
Codex Agent
2025-12-16 15:30:52 +01:00
parent f2473c6f6d
commit 9e4e9a0d87
19 changed files with 22590 additions and 21687 deletions

View File

@@ -8,6 +8,7 @@ import { useTranslation } from '../i18n/useTranslation';
import { useToast } from '../components/ToastHost';
import ShareSheet from '../components/ShareSheet';
import { useEventBranding } from '../context/EventBrandingContext';
import { getDeviceId } from '../lib/device';
type Photo = {
id: number;
@@ -162,12 +163,20 @@ export default function PhotoLightbox({ photos, currentIndex, onClose, onIndexCh
headers: {
Accept: 'application/json',
'X-Locale': locale,
'X-Device-Id': getDeviceId(),
},
}
);
if (res.ok) {
const tasks = (await res.json()) as Task[];
const foundTask = tasks.find((t) => t.id === taskId);
const payload = (await res.json()) as unknown;
const tasks = Array.isArray(payload)
? payload
: Array.isArray((payload as any)?.data)
? (payload as any).data
: Array.isArray((payload as any)?.tasks)
? (payload as any).tasks
: [];
const foundTask = (tasks as Task[]).find((t) => t.id === taskId);
if (foundTask) {
setTask({
id: foundTask.id,