removed the old event admin components and pages

This commit is contained in:
Codex Agent
2025-12-12 13:38:06 +01:00
parent bbf8d4a0f4
commit 1719d96fed
85 changed files with 994 additions and 19981 deletions

View File

@@ -19,38 +19,7 @@ import { isAuthError } from '../auth/tokens';
import { getApiErrorMessage } from '../lib/apiError';
import toast from 'react-hot-toast';
import { ADMIN_BASE_PATH } from '../constants';
export function resolveLayoutForFormat(format: 'a4-poster' | 'a5-foldable', layouts: EventQrInviteLayout[]): string | null {
const formatKey = format === 'a4-poster' ? 'poster-a4' : 'foldable-a5';
const byHint = layouts.find((layout) => (layout as any)?.format_hint === formatKey);
if (byHint?.id) {
return byHint.id;
}
const match = layouts.find((layout) => {
const paper = (layout.paper || '').toLowerCase();
const orientation = (layout.orientation || '').toLowerCase();
const panel = (layout.panel_mode || '').toLowerCase();
if (format === 'a4-poster') {
return paper === 'a4' && orientation === 'portrait' && panel !== 'double-mirror';
}
return paper === 'a4' && orientation === 'landscape' && panel === 'double-mirror';
});
if (match?.id) {
return match.id;
}
if (format === 'a5-foldable') {
const fallback = layouts.find((layout) => (layout.id || '').includes('foldable'));
return fallback?.id ?? layouts[0]?.id ?? null;
}
return layouts[0]?.id ?? null;
}
import { resolveLayoutForFormat } from './qr/utils';
export default function MobileQrPrintPage() {
const { slug: slugParam } = useParams<{ slug?: string }>();