Deploy Ladill Events / deploy (push) Successful in 28s
Proxy registration transaction paths on Events, add a join button on the confirmation page, introduce speaker roster management, and replace the QR design wizard with merchant-style create/show flows. Co-authored-by: Cursor <cursoragent@cursor.com>
90 lines
6.1 KiB
PHP
90 lines
6.1 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Speakers — {{ $qrCode->label }}</x-slot>
|
|
|
|
<div class="mx-auto max-w-3xl space-y-6">
|
|
@foreach(['success', 'error'] as $flash)
|
|
@if(session($flash))
|
|
<div class="rounded-xl border px-4 py-3 text-sm {{ $flash === 'success' ? 'border-emerald-200 bg-emerald-50 text-emerald-700' : 'border-red-200 bg-red-50 text-red-700' }}">
|
|
{{ session($flash) }}
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
|
|
<div>
|
|
<a href="{{ route('speakers.index') }}" class="inline-flex items-center gap-1 text-sm text-slate-500 hover:text-slate-700">
|
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5"/></svg>
|
|
Speakers
|
|
</a>
|
|
<h1 class="mt-1.5 text-2xl font-bold text-slate-900">Speaker management</h1>
|
|
<p class="mt-0.5 text-sm text-slate-500">{{ $qrCode->content()['name'] ?? $qrCode->label }}</p>
|
|
</div>
|
|
|
|
@if($programme)
|
|
<div class="rounded-2xl border border-indigo-100 bg-indigo-50/60 px-4 py-3 text-sm text-indigo-950">
|
|
Linked programme: <a href="{{ route('events.show', $programme) }}" class="font-semibold hover:underline">{{ $programme->label }}</a>.
|
|
Hosts assigned on programme sessions appear below and sync to virtual sessions.
|
|
</div>
|
|
@else
|
|
<div class="rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-600">
|
|
Attach a programme on the <a href="{{ route('events.show', $qrCode) }}" class="font-semibold text-indigo-600 hover:underline">event settings</a> page to pull session hosts into this roster.
|
|
</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{ route('speakers.update', $qrCode) }}" class="space-y-5 rounded-2xl border border-slate-200 bg-white p-6"
|
|
x-data="{
|
|
speakers: {{ Illuminate\Support\Js::from(array_values(old('speakers', $roster ?: [['name' => '', 'email' => '', 'role' => '', 'bio' => '']]))) }},
|
|
addSpeaker() { this.speakers.push({ name: '', email: '', role: '', bio: '' }); },
|
|
removeSpeaker(i) { this.speakers.splice(i, 1); if (this.speakers.length === 0) this.addSpeaker(); },
|
|
}">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div>
|
|
<h2 class="text-sm font-semibold text-slate-900">Event speaker roster</h2>
|
|
<p class="mt-0.5 text-xs text-slate-500">Add keynote speakers, panelists, and hosts. Use email when you want to invite them to virtual sessions.</p>
|
|
</div>
|
|
<button type="button" @click="addSpeaker()" class="text-xs font-semibold text-indigo-600 hover:text-indigo-800">+ Add speaker</button>
|
|
</div>
|
|
|
|
<div class="space-y-3">
|
|
<template x-for="(speaker, index) in speakers" :key="index">
|
|
<div class="rounded-xl border border-slate-200 p-4 space-y-3">
|
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
<input type="text" :name="'speakers[' + index + '][name]'" x-model="speaker.name" placeholder="Name *"
|
|
class="rounded-xl border border-slate-200 px-3 py-2 text-sm focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/30">
|
|
<input type="email" :name="'speakers[' + index + '][email]'" x-model="speaker.email" placeholder="Email (optional)"
|
|
class="rounded-xl border border-slate-200 px-3 py-2 text-sm focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/30">
|
|
</div>
|
|
<input type="text" :name="'speakers[' + index + '][role]'" x-model="speaker.role" placeholder="Role / session (optional)"
|
|
class="w-full rounded-xl border border-slate-200 px-3 py-2 text-sm focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/30">
|
|
<textarea :name="'speakers[' + index + '][bio]'" x-model="speaker.bio" rows="2" placeholder="Short bio (optional)"
|
|
class="w-full rounded-xl border border-slate-200 px-3 py-2 text-sm focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/30"></textarea>
|
|
<button type="button" @click="removeSpeaker(index)" class="text-xs font-medium text-red-600 hover:text-red-700">Remove</button>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-primary w-full">Save speakers</button>
|
|
</form>
|
|
|
|
@if(count($programmeAssignments))
|
|
<div class="rounded-2xl border border-slate-200 bg-white p-6">
|
|
<h2 class="text-sm font-semibold text-slate-900">From programme schedule</h2>
|
|
<p class="mt-0.5 text-xs text-slate-500">These hosts are assigned on programme sessions. Edit them on the linked programme.</p>
|
|
<div class="mt-4 divide-y divide-slate-100">
|
|
@foreach($programmeAssignments as $assignment)
|
|
<div class="flex flex-wrap items-start justify-between gap-2 py-3 text-sm">
|
|
<div>
|
|
<p class="font-semibold text-slate-900">{{ $assignment['name'] }}</p>
|
|
<p class="text-xs text-slate-500">{{ $assignment['session'] ?: 'Session' }}@if($assignment['day']) · {{ $assignment['day'] }}@endif@if($assignment['time']) · {{ $assignment['time'] }}@endif</p>
|
|
</div>
|
|
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-[11px] font-medium text-slate-600">Programme</span>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</x-user-layout>
|