fix: Register /api/altcha-challenge/ route and return real display_name for own guest session signups

This commit is contained in:
Richard
2026-07-31 12:01:36 +02:00
parent 26eaa637a7
commit c8aed130b8
8 changed files with 46 additions and 19 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<title>Schichtplaner — Veranstaltungsschichtpläne</title>
<script type="module" crossorigin src="/assets/index-BzMPGQ3H.js"></script>
<script type="module" crossorigin src="/assets/index-5XQR3AzF.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-fTGRNVay.css">
</head>
<body class="bg-paper text-main font-sans antialiased min-h-screen">
+1 -1
View File
@@ -164,7 +164,7 @@ export default function GuestSignupModal({ shift, onClose, onSubmit }) {
<div className="border border-slate-700 rounded-lg p-3 bg-slate-950/80 flex flex-col items-center justify-center min-h-[90px] gap-2">
<altcha-widget
ref={captchaRef}
challengeurl="/api/events/altcha-challenge/"
challengeurl="/api/altcha-challenge/"
auto="onload"
hidefooter="true"
style={{ width: '100%' }}
+1 -1
View File
@@ -211,7 +211,7 @@ export default function ShiftMatrixTable({
{/* Attendees List */}
<div className="mt-2 space-y-1 font-sans">
{shift.signups.map((su) => {
const isOwnGuest = isGuest && su.is_guest && guestDisplayName && su.display_name?.trim().toLowerCase() === guestDisplayName.trim().toLowerCase();
const isOwnGuest = isGuest && su.is_guest && (su.is_self || (guestDisplayName && su.display_name?.trim().toLowerCase() === guestDisplayName.trim().toLowerCase()));
return (
<div key={su.id} className={`text-[11px] text-muted flex items-center justify-between gap-2 p-1.5 rounded-sm border ${isOwnGuest ? 'bg-amber-500/10 border-amber-500/30' : 'bg-subtle border-grid'}`}>
<div className="flex items-center gap-1.5 truncate">