reclamar premio
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<div class="flex justify-center items-center" x-data="{ menuNotificaciones: @entangle('menuNotificaciones') }">
|
||||
<div class="fill-[{{ App\Models\Configuracione::Orderby('id', 'desc')->first()->color_boton }}] relative cursor-pointer"
|
||||
wire:click="$refresh" @click="menuNotificaciones=!menuNotificaciones">
|
||||
<div class="fill-[{{ App\Models\Configuracione::Orderby('id', 'desc')->first()->color_boton }}] relative cursor-pointer" wire:click="$refresh" @click="menuNotificaciones=!menuNotificaciones">
|
||||
@if ($numNoti != 0)
|
||||
<span class="absolute top-0 left-0 bg-red-500 rounded-full w-5 h-5 flex justify-center items-center text-xs text-white">
|
||||
{{ $numNoti > 9 ? '9+' : $numNoti }}
|
||||
@@ -13,7 +12,7 @@
|
||||
|
||||
<div x-cloak x-show="menuNotificaciones" @click.outside="menuNotificaciones = false" class="absolute top-14 right-2 md:right-32 rounded-lg border overflow-y-auto border-[{{ App\Models\Configuracione::Orderby('id', 'desc')->first()->color_boton }}] bg-white w-72 md:w-96 h-96 z-50">
|
||||
<ul class="p-4">
|
||||
@foreach ($consulta as $item)
|
||||
@forelse ($consulta as $item)
|
||||
<li class="px-2 py-1 mb-2 border border-gray-300 rounded-lg relative" wire:loading.class="opacity-50 cursor-wait">
|
||||
<h4 class="font-bold text-base text-[{{ App\Models\Configuracione::Orderby('id', 'desc')->first()->color_boton }}]">
|
||||
{{ $item->titulo }}
|
||||
@@ -21,7 +20,15 @@
|
||||
<p class="text-sm">
|
||||
{{ $item->descripcion }}
|
||||
</p>
|
||||
@if (!$item->todos || Auth::user()->rol->nombre == 'administrador' || Auth::user()->rol->nombre == 'super' || Auth::user()->rol->nombre == 'editor')
|
||||
@if ($item->premio != null && $item->premio != 0)
|
||||
<p class="text-sm py-2">
|
||||
[${{ number_format($item->premio) }}] 🏆💵
|
||||
</p>
|
||||
<x-primary-button class="my-1" wire:click="reclamarPremio({{ $item->id }})" wire:loading.attr="disabled" wire:target="reclamarPremio">
|
||||
Reclamar premio
|
||||
</x-primary-button>
|
||||
@endif
|
||||
@if (!$item->todos || Auth::user()->rol->nombre == 'administrador' || Auth::user()->rol->nombre == 'super' || Auth::user()->rol->nombre == 'editor' || $item->premio == 0)
|
||||
<span class="text-red-500 font-semibold absolute top-0 right-2 cursor-pointer select-none" wire:click="deleteNotificacion({{ $item->id }})" wire:loading.remove>
|
||||
x
|
||||
</span>
|
||||
@@ -30,7 +37,9 @@
|
||||
</span>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
@empty
|
||||
<p class="text-center text-gray-500 py-2">No tienes notificaciones</p>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user