1 line
1.5 KiB
PHP
1 line
1.5 KiB
PHP
<div class="grid lg:grid-cols-3 gap-6"><section class="card"><h2>Start a conversation</h2><form wire:submit="create" class="space-y-4"><label>Subject<input wire:model="subject" required maxlength="200"></label><label>How can we help?<textarea wire:model="body" rows="5" required></textarea></label><button class="button" wire:loading.attr="disabled">Create ticket</button></form><h3 class="mt-8">Your tickets</h3>@foreach($tickets as $ticket)<button wire:click="select({{ $ticket->id }})" class="block text-left w-full py-4 border-b border-slate-700">#{{ $ticket->id }} {{ $ticket->subject }}<span class="block text-xs muted">{{ $ticket->status }}</span></button>@endforeach</section><section class="card lg:col-span-2">@if($errors->any())<p role="alert" class="text-rose-300 mb-4">{{ $errors->first() }}</p>@endif @if($ticketId)<h2>Ticket #{{ $ticketId }}</h2>@foreach($messages as $message)<article class="border-b border-slate-700 py-5"><p class="text-sm text-cyan-200">{{ $message->name }} · {{ $message->created_at }}</p><p class="prose-copy mt-2">{{ $message->body }}</p></article>@endforeach<form wire:submit="send" class="space-y-4 mt-6"><label>Reply<textarea wire:model="reply" required rows="4"></textarea></label><button class="button" wire:loading.attr="disabled">Send reply</button><button type="button" wire:click="close" class="secondary">Close ticket</button></form>@else<p class="muted">Choose a conversation or create a ticket. Please never send passwords or license keys.</p>@endif</section></div>
|