updated table structure for photobooth/sparkbooth settings. now there's a separate table for it. update all references and tests. also fixed the notification panel and the lightbox in the guest app.

This commit is contained in:
Codex Agent
2025-12-18 08:49:56 +01:00
parent ece38fc009
commit 1c4acda332
30 changed files with 734 additions and 538 deletions

View File

@@ -1,7 +1,14 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import type { LocaleCode } from '../i18n/messages';
type Photo = { id: number; file_path?: string; thumbnail_path?: string; created_at?: string; session_id?: string | null };
type Photo = {
id: number;
file_path?: string;
thumbnail_path?: string;
created_at?: string;
session_id?: string | null;
uploader_name?: string | null;
};
type RawPhoto = Record<string, unknown>;
export function usePollGalleryDelta(token: string, locale: LocaleCode) {
@@ -60,6 +67,12 @@ export function usePollGalleryDelta(token: string, locale: LocaleCode) {
const newPhotos: Photo[] = rawPhotos.map((photo: RawPhoto) => ({
...(photo as Photo),
session_id: typeof photo.session_id === 'string' ? photo.session_id : (photo.guest_name as string | null) ?? null,
uploader_name:
typeof photo.uploader_name === 'string'
? (photo.uploader_name as string)
: typeof photo.guest_name === 'string'
? (photo.guest_name as string)
: null,
}));
if (newPhotos.length > 0) {