55 lines
1.6 KiB
PHP
55 lines
1.6 KiB
PHP
<?php
|
|
|
|
use App\Models\Quote;
|
|
use App\Models\RequestedQuotes;
|
|
use App\Providers\RouteServiceProvider;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Validation\ValidationException;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Attributes\On;
|
|
use Livewire\Attributes\Rule;
|
|
use Livewire\Volt\Component;
|
|
|
|
new #[Layout('layouts.guest')] class extends Component
|
|
{
|
|
public Collection $quotes;
|
|
|
|
public function mount(): void
|
|
{
|
|
$this->getRequestedQuotes();
|
|
|
|
}
|
|
|
|
#[On('quote-requested')]
|
|
public function getRequestedQuotes()
|
|
{
|
|
$this->quotes = RequestedQuotes::all()->whereNull('deleted_at')->sortDesc();
|
|
}
|
|
}; ?>
|
|
|
|
|
|
<div class="px-4 sm:px-6 lg:px-8">
|
|
<div class="-mx-4 mt-10 ring-1 ring-gray-300 sm:mx-0 sm:rounded-lg bg-nexi-primary dark:bg-zinc-800 transition-colors duration-300">
|
|
<table class="min-w-full divide-y divide-gray-300">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col"
|
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-nexi-black dark:text-gray-200 sm:pl-6">
|
|
Requested Quotes
|
|
</th>
|
|
{{-- TODO: add logged in user stuff --}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($quotes as $quote)
|
|
<tr>
|
|
<td class="relative py-4 pl-4 pr-3 text-sm sm:pl-6 border-t text-nexi-black dark:text-gray-200">
|
|
{{ $quote->quote }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|