fix: little oops
This commit is contained in:
parent
0ec936088e
commit
87b1edbdca
@ -10,11 +10,11 @@ class RequestQuotePolicy
|
|||||||
|
|
||||||
public function approve(): bool
|
public function approve(): bool
|
||||||
{
|
{
|
||||||
return auth()->user()->is_admin;
|
return !empty(auth()->user()) && auth()->user()->is_admin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reject(): bool
|
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">
|
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
|
Requested Quotes
|
||||||
</th>
|
</th>
|
||||||
@if(auth()->user()->is_admin)
|
@if(!empty(auth()->user()) && auth()->user()->is_admin)
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
@endif
|
@endif
|
||||||
</tr>
|
</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">
|
<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 }}
|
{{ $quote->quote }}
|
||||||
</td>
|
</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">
|
<td class="relative w-8 pl-4 pr-3 text-sm sm:pl-6 border-t">
|
||||||
<div class="flex flex-row space-x-2">
|
<div class="flex flex-row space-x-2">
|
||||||
<form wire:submit="approve({{ $quote }})">
|
<form wire:submit="approve({{ $quote }})">
|
||||||
|
|||||||
Reference in New Issue
Block a user