Deploy Ladill Events / deploy (push) Successful in 35s
Give each area its own sidebar entry and hub pages, and walk new events through details, QR design, then review before publish. Co-authored-by: Cursor <cursoragent@cursor.com>
90 lines
6.2 KiB
PHP
90 lines
6.2 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Badge printing — {{ $qrCode->label }}</x-slot>
|
|
|
|
<div class="mx-auto max-w-5xl space-y-6"
|
|
x-data="{
|
|
selected: [],
|
|
toggle(id) { const i = this.selected.indexOf(id); i === -1 ? this.selected.push(id) : this.selected.splice(i, 1); },
|
|
toggleAll(ids) { this.selected = this.selected.length === ids.length ? [] : [...ids]; },
|
|
get qs() { return this.selected.map(id => 'ids[]=' + id).join('&'); },
|
|
printSelected() { window.open(@js(route('events.badges', $qrCode)) + '?auto=1&' + this.qs, '_blank'); },
|
|
zplSelected() { window.location = @js(route('events.badges.zpl', $qrCode)) + '?' + this.qs; }
|
|
}">
|
|
|
|
<div>
|
|
<a href="{{ route('badges.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>
|
|
Badge printing
|
|
</a>
|
|
<h1 class="mt-1.5 text-2xl font-bold text-slate-900">{{ $qrCode->content()['name'] ?? $qrCode->label }}</h1>
|
|
<p class="mt-1 text-sm text-slate-500">{{ number_format($printableCount) }} confirmed attendees · {{ strtoupper($badgeSize) }} badges</p>
|
|
</div>
|
|
|
|
<div class="flex flex-col gap-3 rounded-2xl border border-slate-200 bg-white p-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<span x-show="selected.length" x-cloak class="text-xs font-medium text-slate-500"><span x-text="selected.length"></span> selected</span>
|
|
<button type="button" x-show="selected.length" x-cloak @click="printSelected()"
|
|
class="rounded-xl bg-indigo-600 px-3.5 py-2 text-xs font-semibold text-white hover:bg-indigo-700 transition">Print selected</button>
|
|
<button type="button" x-show="selected.length" x-cloak @click="zplSelected()"
|
|
class="rounded-xl border border-slate-200 px-3.5 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50 transition">ZPL selected</button>
|
|
<a href="{{ route('events.badges', $qrCode) }}?auto=1" target="_blank"
|
|
class="rounded-xl bg-slate-900 px-3.5 py-2 text-xs font-semibold text-white hover:bg-slate-800 transition">Print all badges</a>
|
|
<a href="{{ route('events.badges.zpl', $qrCode) }}"
|
|
class="rounded-xl border border-slate-200 px-3.5 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50 transition">Download ZPL</a>
|
|
</div>
|
|
<a href="{{ route('events.attendees', $qrCode) }}" class="text-xs font-semibold text-indigo-600 hover:text-indigo-800">Manage attendees →</a>
|
|
</div>
|
|
|
|
<form method="GET" class="flex items-center gap-2">
|
|
<input type="text" name="search" value="{{ request('search') }}" placeholder="Search name, email, code…"
|
|
class="w-full max-w-sm rounded-xl border border-slate-200 px-3.5 py-2 text-sm focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/30">
|
|
<button type="submit" class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-semibold text-slate-600 hover:bg-slate-50 transition">Search</button>
|
|
</form>
|
|
|
|
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="border-b border-slate-100 bg-slate-50/70 text-left text-xs uppercase tracking-wide text-slate-400">
|
|
<tr>
|
|
<th class="px-4 py-3 w-8">
|
|
@if($registrations->isNotEmpty())
|
|
<input type="checkbox"
|
|
@change="toggleAll(@js($registrations->pluck('id')->all()))"
|
|
:checked="selected.length === @js($registrations->count()) && selected.length > 0"
|
|
class="h-4 w-4 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
|
@endif
|
|
</th>
|
|
<th class="px-4 py-3">Attendee</th>
|
|
<th class="px-4 py-3">Ticket</th>
|
|
<th class="px-4 py-3">Badge code</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100">
|
|
@forelse($registrations as $reg)
|
|
<tr class="hover:bg-slate-50/60">
|
|
<td class="px-4 py-3">
|
|
<input type="checkbox" :checked="selected.includes({{ $reg->id }})" @change="toggle({{ $reg->id }})"
|
|
class="h-4 w-4 rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<p class="font-semibold text-slate-800">{{ $reg->attendee_name }}</p>
|
|
<p class="text-xs text-slate-400">{{ $reg->attendee_email }}</p>
|
|
</td>
|
|
<td class="px-4 py-3">
|
|
<span class="font-medium text-slate-700">{{ $reg->tier_name }}</span>
|
|
</td>
|
|
<td class="px-4 py-3"><code class="rounded bg-slate-100 px-2 py-0.5 text-xs">{{ $reg->badge_code }}</code></td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="4" class="px-4 py-12 text-center text-sm text-slate-400">No confirmed attendees to print yet.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@if($registrations->hasPages())
|
|
<div class="border-t border-slate-100 px-4 py-3">{{ $registrations->links() }}</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</x-user-layout>
|