fix: little oops

This commit is contained in:
llama committed 2023-10-07 22:51:34 +11:00
1 parent 0ec936088e
commit 87b1edbdca
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -10,11 +10,11 @@ class RequestQuotePolicy
public function approve(): bool
{
return auth()->user()->is_admin;
return !empty(auth()->user()) && auth()->user()->is_admin;
}
public function reject(): bool
{
return auth()->user()->is_admin;
return !empty(auth()->user()) && auth()->user()->is_admin;
}
}
@@ -55,7 +55,7 @@ new #[Layout('layouts.guest')] class extends Component
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>
@if(auth()->user()->is_admin)
@if(!empty(auth()->user()) && auth()->user()->is_admin)
<th scope="col"></th>
@endif
</tr>
@@ -66,7 +66,7 @@ new #[Layout('layouts.guest')] class extends Component
<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>
@if(auth()->user()->is_admin)
@if(!empty(auth()->user()) && auth()->user()->is_admin)
<td class="relative w-8 pl-4 pr-3 text-sm sm:pl-6 border-t">
<div class="flex flex-row space-x-2">
<form wire:submit="approve({{ $quote }})">