Add speaker invitations with portal page and programme host picker.
Deploy Ladill Events / deploy (push) Successful in 47s

Speakers require email, get a personal holding page with programme and stage links, auto-invites when programme hosts are saved, and manual send for events without a schedule; also fix wallet copy on event create and anchor attendee comms.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-03 15:48:32 +00:00
co-authored by Cursor
parent 42d997a599
commit fec24da7bd
20 changed files with 1015 additions and 36 deletions
+48 -3
View File
@@ -50,14 +50,59 @@ class EventProgrammeService
public function hostsFromItems(array $items): array
{
return collect($items)
->pluck('host')
->filter(fn ($host) => is_string($host) && trim($host) !== '')
->map(fn ($host) => trim($host))
->flatMap(function ($item) {
if (! is_array($item)) {
return [];
}
$email = strtolower(trim((string) ($item['host_speaker_email'] ?? '')));
if ($email !== '' && filter_var($email, FILTER_VALIDATE_EMAIL)) {
return [$email];
}
$host = trim((string) ($item['host'] ?? ''));
if ($host !== '' && filter_var($host, FILTER_VALIDATE_EMAIL)) {
return [$host];
}
if ($host !== '') {
return [$host];
}
return [];
})
->unique()
->values()
->all();
}
/** @return list<array{email: string, name: string}> */
public function speakerOptionsForProgramme(QrCode $programme): array
{
$options = [];
foreach ($this->eventsLinkedToProgramme($programme) as $event) {
foreach ((array) ($event->content()['speakers'] ?? []) as $speaker) {
if (! is_array($speaker)) {
continue;
}
$email = trim((string) ($speaker['email'] ?? ''));
$name = trim((string) ($speaker['name'] ?? ''));
if ($email === '' || ! filter_var($email, FILTER_VALIDATE_EMAIL) || $name === '') {
continue;
}
$options[strtolower($email)] = [
'email' => $email,
'name' => $name,
];
}
}
return array_values($options);
}
/** @return Collection<int, QrCode> */
public function eventsLinkedToProgramme(QrCode $programme): Collection
{