100 lines
7.1 KiB
PHP
Executable File
100 lines
7.1 KiB
PHP
Executable File
<div class="bg-[#f5f5f5] md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4">
|
|
|
|
<x-ver-entrada />
|
|
|
|
<x-primary-table>
|
|
<x-slot name="thead">
|
|
<tr class="text-left">
|
|
<th class="rounded-l-lg font-normal pl-[2rem]"></th>
|
|
<th class="font-normal pl-[2rem]">id</th>
|
|
<th class="font-normal pl-[2rem]">Servicio</th>
|
|
<th class="font-normal pl-[2rem]">Cantidad</th>
|
|
<th class="font-normal pl-[2rem]">Estado</th>
|
|
<th class="font-normal pl-[2rem]">Fecha</th>
|
|
<th class="font-normal rounded-r-lg"></th>
|
|
</tr>
|
|
</x-slot>
|
|
<x-slot name="tbody">
|
|
@foreach ($consulta as $item)
|
|
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4" x-data="{ openOption: false }">
|
|
{{-- <td class="hidden"><input type="checkbox" wire:model="delete_1" value="{{ $item->id }}"> </td> --}}
|
|
<td class=""></td>
|
|
<td class="pl-[2rem]">{{ $item->id ?? '' }}</td>
|
|
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->servicio->nombre ?? '' }}</td>
|
|
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->cantidad ?? '' }}</td>
|
|
<td class="pl-[2rem] text-xs sm:text-sm">{{ $item->estado ?? '' }}</td>
|
|
<td class="pl-[2rem] text-xs sm:text-sm">
|
|
{{ carbon\Carbon::parse($item->created_at)->format('d M Y') ?? '' }}
|
|
</td>
|
|
{{-- <td class="pl-2">
|
|
<button x-on:click="openOption=!openOption">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
stroke-width="1.5" stroke="currentColor" class="w-6 h-6 cursor-pointer">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
|
|
</svg>
|
|
</button>
|
|
|
|
<div x-cloak x-show="openOption" @click.away="openOption = false"
|
|
class="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
|
|
<button x-on:click="openOption=false,ver=true"
|
|
wire:click="ver({{ $item->id }},'{{ $servicioNom }}')"
|
|
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Ver
|
|
usuarios</button>
|
|
<button x-on:click="openOption=false,observacionesm1=true"
|
|
wire:click="verObservacion1({{ $item->id }})"
|
|
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
|
|
Nota</button>
|
|
<button x-on:click="openOption=false,observacionesm1=true"
|
|
wire:click="verObservacion1({{ $item->id }})"
|
|
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">+
|
|
Nota</button>
|
|
<button x-on:click="openOption=false" onclick="copiarAlPortapapeles({{ $n }})"
|
|
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Copiar
|
|
item</button>
|
|
@if (auth()->user()->rol->nombre != 'editor')
|
|
<button x-on:click="openOption=false" wire:click="delete_item({{ $item->id }})"
|
|
class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
|
|
@endif
|
|
</div>
|
|
</td>
|
|
<td class="pl-2 md:inline-table">
|
|
@if (!empty($item->observaciones))
|
|
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true"
|
|
title="{{ $item->observaciones }}" wire:click="verObservacion1({{ $item->id }})">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-green-700">
|
|
<path stroke-linecap="round" stroke-linejoin="round"
|
|
d="M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
|
|
</svg>
|
|
</div>
|
|
@else
|
|
<div x-on:click="openOption=false,observacionesm1=true" title="Sin obversaciones"
|
|
wire:click="verObservacion1({{ $item->id }})">
|
|
<svg class="w-7 cursor-pointer" xmlns="http://www.w3.org/2000/svg" version="1.1"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"
|
|
x="0" y="0" viewBox="0 0 32 32" style="enable-background:new 0 0 512 512"
|
|
xml:space="preserve" class="">
|
|
<g>
|
|
<g id="Layer_57" data-name="Layer 57">
|
|
<path
|
|
d="m23 28a3 3 0 0 0 3-3v-13.17a3 3 0 0 0 -.88-2.12l-4.83-4.83a3 3 0 0 0 -2.12-.88h-8.17a3 3 0 0 0 -3 3v18a3 3 0 0 0 3 3zm-.41-18h-1.59a1 1 0 0 1 -1-1v-1.59zm-13.59 15v-18a1 1 0 0 1 1-1h8v3a3 3 0 0 0 3 3h3v13a1 1 0 0 1 -1 1h-13a1 1 0 0 1 -1-1z"
|
|
fill="#d3b637" data-original="#000000" class=""></path>
|
|
<path
|
|
d="m12.5 19.5h2.5v2.5a1 1 0 0 0 2 0v-2.5h2.5a1 1 0 0 0 0-2h-2.5v-2.5a1 1 0 0 0 -2 0v2.5h-2.5a1 1 0 0 0 0 2z"
|
|
fill="#d3b637" data-original="#000000" class=""></path>
|
|
</g>
|
|
</g>
|
|
</svg>
|
|
</div>
|
|
@endif
|
|
</td> --}}
|
|
</tr>
|
|
@endforeach
|
|
</x-slot>
|
|
<x-slot name="tlink">
|
|
{{ $consulta->links() }}
|
|
</x-slot>
|
|
</x-primary-table>
|
|
</div>
|