Improve speaker invites and redesign roster add flow.
Deploy Ladill Events / deploy (push) Successful in 41s
Deploy Ladill Events / deploy (push) Successful in 41s
Surface specific send failures, allow resend, use ladl.link portal URLs, and replace stacked speaker forms with a single add-to-list pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -226,4 +226,73 @@ class EventSpeakerInviteTest extends TestCase
|
||||
])
|
||||
->assertSessionHasErrors('speakers.0.email');
|
||||
}
|
||||
|
||||
public function test_manual_speaker_invite_reports_when_email_not_configured(): void
|
||||
{
|
||||
config(['smtp.platform_api_key' => '']);
|
||||
|
||||
$owner = User::factory()->create(['public_id' => 'usr_sp_no_smtp']);
|
||||
|
||||
$event = QrCode::create([
|
||||
'user_id' => $owner->id,
|
||||
'short_code' => 'evt-sp-no-smtp',
|
||||
'type' => QrCode::TYPE_EVENT,
|
||||
'label' => 'No SMTP event',
|
||||
'payload' => [
|
||||
'content' => [
|
||||
'name' => 'No SMTP event',
|
||||
'speakers' => [[
|
||||
'name' => 'Alex Host',
|
||||
'email' => 'alex@example.com',
|
||||
'role' => 'Panelist',
|
||||
'bio' => '',
|
||||
]],
|
||||
],
|
||||
'style' => [],
|
||||
],
|
||||
'is_active' => true,
|
||||
]);
|
||||
|
||||
$this->actingAs($owner)
|
||||
->from(route('speakers.show', $event))
|
||||
->post(route('speakers.invite', $event), ['email' => 'alex@example.com'])
|
||||
->assertRedirect(route('speakers.show', $event))
|
||||
->assertSessionHas('error');
|
||||
}
|
||||
|
||||
public function test_manual_speaker_invite_can_be_resent_after_programme_invite(): void
|
||||
{
|
||||
$owner = User::factory()->create(['public_id' => 'usr_sp_resend']);
|
||||
|
||||
$event = QrCode::create([
|
||||
'user_id' => $owner->id,
|
||||
'short_code' => 'evt-sp-resend',
|
||||
'type' => QrCode::TYPE_EVENT,
|
||||
'label' => 'Resend event',
|
||||
'payload' => [
|
||||
'content' => [
|
||||
'name' => 'Resend event',
|
||||
'speakers' => [[
|
||||
'name' => 'Pat Speaker',
|
||||
'email' => 'pat@example.com',
|
||||
'role' => 'Host',
|
||||
'bio' => '',
|
||||
'invite_token' => 'existing-token',
|
||||
'invited_at' => now()->toIso8601String(),
|
||||
'invite_source' => EventSpeakerInviteService::SOURCE_PROGRAMME,
|
||||
]],
|
||||
],
|
||||
'style' => [],
|
||||
],
|
||||
'is_active' => true,
|
||||
]);
|
||||
|
||||
$this->actingAs($owner)
|
||||
->from(route('speakers.show', $event))
|
||||
->post(route('speakers.invite', $event), ['email' => 'pat@example.com'])
|
||||
->assertRedirect(route('speakers.show', $event))
|
||||
->assertSessionHas('success');
|
||||
|
||||
Http::assertSent(fn ($request) => $request['to'] === 'pat@example.com');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user