update
This commit is contained in:
@@ -1,129 +1,143 @@
|
||||
<div>
|
||||
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4 @if($historiales >= '1' ) bg-green-200 @endif" x-data="{ openOption: false }">
|
||||
<td><input type="checkbox" wire:model="delete_1" value="{{$cuenta->id}}"> </td>
|
||||
<td class="pl-[2rem]">{{ $cuenta->id ?? '' }}</td>
|
||||
<td class="pl-[2rem]">{{ $cuenta->servicio->nombre ?? '' }}</td>
|
||||
<tr class="hover:bg-gray-200 hover:ring-gray-500 border-gray-200 text-sm text-left w-full pl-4 @if ($historiales >= '1') bg-green-200 @endif"
|
||||
x-data="{ openOption: false }">
|
||||
<td><input type="checkbox" wire:model="delete_1" value="{{ $cuenta->id }}"> </td>
|
||||
<td class="pl-[2rem]">{{ $cuenta->id ?? '' }}</td>
|
||||
<td class="pl-[2rem]">{{ $cuenta->servicio->nombre ?? '' }}</td>
|
||||
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->correo?? '' }}</td>
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->password ?? '' }}</td>
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->correo ?? '' }}</td>
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->password ?? '' }}</td>
|
||||
|
||||
<td class="pl-[2rem] text-xs hidden md:inline-table">{{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} - {{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }}</td>
|
||||
|
||||
<td class="pl-[2rem] text-xs hidden md:inline-table">
|
||||
{{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} -
|
||||
{{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }}</td>
|
||||
|
||||
@php
|
||||
$servicioNom = $cuenta->servicio->nombre ?? '';
|
||||
|
||||
$date1 = new DateTime(strtr(strval($fechaActual), '/', '-'));
|
||||
$date2 = new DateTime(strtr(strval($cuenta->vencimiento), '/', '-'));
|
||||
|
||||
@endphp
|
||||
|
||||
@if ($date1 < $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
$diff = $date1->diff($date2);
|
||||
echo $diff->days . ' dias';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
@php
|
||||
$servicioNom = $cuenta->servicio->nombre ?? '';
|
||||
|
||||
@if ($date1 > $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
echo 'Vencido';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
$date1 = new DateTime(strtr(strval($fechaActual), '/', '-'));
|
||||
$date2 = new DateTime(strtr(strval($cuenta->vencimiento), '/', '-'));
|
||||
|
||||
@if ($date1 == $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
echo 'Vence hoy!!';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
<p class="hidden" id="{{ $n }}">{{ $cuenta->servicio->nombre ?? ''}} - email:
|
||||
{{ $cuenta->correo ?? '' }} - Pass: {{ $cuenta->password ?? '' }}</p>
|
||||
<td class="pl-[2rem]">@if($cuenta->estado=='pendiente')
|
||||
@if($cuenta->historiales_count == 0)
|
||||
<p class="text-green-600 font-semibold"> Disponible </p>
|
||||
@else
|
||||
<p class="text-orange-600 font-semibold"> Ocupado </p>
|
||||
@endif
|
||||
@endphp
|
||||
|
||||
@else
|
||||
<p class="@if(($cuenta->historiales_count ?? '') == ($cuenta->servicio->pantallas ?? '' )) text-orange-600 font-semibold @else text-green-600 font-semibold @endif"> {{ $cuenta->historiales_count ?? '0' }}/{{$cuenta->servicio->pantallas?? '0'}} @endif @if($historiales >= '1')<span class="text-green-500 px-2 py-1 rounded-full bg-green-300">{{$historiales}}</span> </p> @endif
|
||||
</td>
|
||||
<td class="pl-[2rem] text-sm">@if ($cuenta->estado == 'pendiente') Cuenta completa @elseif($cuenta->estado == 'activo') Pantallas @else Inactiva @endif</td>
|
||||
<td class="m-auto hidden md:inline-table">
|
||||
<button x-on:click="ver=true"
|
||||
wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
|
||||
class="bg-[#B221FD] hover:bg-[#7a02b8] text-white px-4 py-1 rounded-lg">Ver</button>
|
||||
</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({{ $cuenta->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({{ $cuenta->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({{ $cuenta->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
|
||||
cuenta</button>
|
||||
@if (auth()->user()->rol->nombre != "editor")
|
||||
<button x-on:click="openOption=false"
|
||||
wire:click="delete_cuenta({{ $cuenta->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($cuenta->observaciones))
|
||||
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true" title="{{$cuenta->observaciones}}" wire:click="verObservacion1({{ $cuenta->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({{ $cuenta->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>
|
||||
@if ($date1 < $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
$diff = $date1->diff($date2);
|
||||
echo $diff->days . ' dias';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@if ($date1 > $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
echo 'Vencido';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@if ($date1 == $date2)
|
||||
<td class="pl-[2rem]">
|
||||
@php
|
||||
echo 'Vence hoy!!';
|
||||
@endphp
|
||||
</td>
|
||||
@endif
|
||||
<p class="hidden" id="{{ $n }}">{{ $cuenta->servicio->nombre ?? '' }} - email:
|
||||
{{ $cuenta->correo ?? '' }} - Pass: {{ $cuenta->password ?? '' }}</p>
|
||||
<td class="pl-[2rem]">
|
||||
@if ($cuenta->estado == 'pendiente')
|
||||
@if ($cuenta->historiales_count == 0)
|
||||
<p class="text-green-600 font-semibold"> Disponible </p>
|
||||
@else
|
||||
<p class="text-orange-600 font-semibold"> Ocupado </p>
|
||||
@endif
|
||||
@else
|
||||
<p
|
||||
class="@if (($cuenta->historiales_count ?? '') == ($cuenta->servicio->pantallas ?? '')) text-orange-600 font-semibold @else text-green-600 font-semibold @endif">
|
||||
{{ $cuenta->historiales_count ?? '0' }}/{{ $cuenta->servicio->pantallas ?? '0' }} @endif
|
||||
@if ($historiales >= '1')
|
||||
<span class="text-green-500 px-2 py-1 rounded-full bg-green-300">{{ $historiales }}</span>
|
||||
</p>
|
||||
@endif
|
||||
</td>
|
||||
<td class="pl-[2rem] text-sm">
|
||||
@if ($cuenta->estado == 'pendiente')
|
||||
Cuenta completa
|
||||
@elseif($cuenta->estado == 'activo')
|
||||
Pantallas
|
||||
@else
|
||||
Inactiva
|
||||
@endif
|
||||
</td>
|
||||
<td class="m-auto hidden md:inline-table">
|
||||
<button x-on:click="ver=true" wire:click="ver({{ $cuenta->id }},'{{ $servicioNom }}')"
|
||||
class="bg-[#B221FD] hover:bg-[#7a02b8] text-white px-4 py-1 rounded-lg">Ver</button>
|
||||
</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({{ $cuenta->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({{ $cuenta->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({{ $cuenta->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
|
||||
cuenta</button>
|
||||
@if (auth()->user()->rol->nombre != 'editor')
|
||||
<button x-on:click="openOption=false" wire:click="delete_cuenta({{ $cuenta->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($cuenta->observaciones))
|
||||
<div class="cursor-pointer" x-on:click="openOption=false,observacionesm1=true"
|
||||
title="{{ $cuenta->observaciones }}" wire:click="verObservacion1({{ $cuenta->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({{ $cuenta->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>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user