fix: little oops
This commit is contained in:
parent
0ec936088e
commit
87b1edbdca
@ -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 }})">
|
||||
|
||||
Reference in New Issue
Block a user