feat(events): add calendar email support

Help registrants add events to their calendars and keep waitlisted places distinct from confirmed attendance.
This commit is contained in:
2026-09-27 15:57:43 +02:00
parent 8e502b4a01
commit 5310272715
6 changed files with 388 additions and 18 deletions
+5
View File
@@ -110,6 +110,7 @@ async function promoteEvent(
if (slots <= 0) break;
const email = (registration as { email?: unknown }).email;
const fullName = (registration as { fullName?: unknown }).fullName;
if (typeof email !== 'string' || email.length === 0) {
strapi.log.warn(
`${LOG_PREFIX} registration ${registration.documentId} has no email; left waitlisted.`,
@@ -122,6 +123,10 @@ async function promoteEvent(
to: email,
state: 'confirmed',
eventReference: { documentId: eventDocumentId },
reservation: {
id: registration.documentId as string,
name: typeof fullName === 'string' ? fullName : undefined,
},
});
if (!ok) {