update ver tarifas

This commit is contained in:
Felipe
2024-01-23 10:42:36 -05:00
parent f466b38baa
commit 82de69e854
6 changed files with 41 additions and 42 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ class ShowPlanes extends Component
if ($this->servicio_modTarifas) { if ($this->servicio_modTarifas) {
$this->tarifas = Tarifas::with('rol') $this->tarifas = Tarifas::with('rol')
->where('servicio_id', $this->servicio_modTarifas) ->where('servicio_id', $this->servicio_modTarifas)
->where('estado', 'activo') // ->where('estado', 'activo')
->get(); ->get();
} }
@@ -1,8 +1,8 @@
<div x-data="{ categorian: @entangle('categorian'),verPro: @entangle('verPro')}" class="h-full w-full md:my-2"> <div x-data="{ categorian: @entangle('categorian'),verPro: @entangle('verPro')}" class="h-full w-full md:my-2">
<div class="text-right mx-12"> <div class="text-right mx-12">
<a href="/#planes"> <a href="/#planes">
<button class="my-2 mx max-w-sm ml-auto rounded-lg border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green sm-text-sm sm-leading-5">Ver planes</button> <button class="my-2 mx max-w-sm ml-auto rounded-lg border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green sm-text-sm sm-leading-5">Ver planes</button>
</a> </a>
</div> </div>
<div class=" md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4"> <div class=" md:w-[100%] m-auto p-2 md:p-5 rounded-[1.2rem] relative mb-4">
@@ -16,13 +16,10 @@
<table> <table>
@foreach ($categorias as $categoria1) @foreach ($categorias as $categoria1)
<td> <td>
<div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[450px] sm:h-[450px] mx-4" <div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[450px] sm:h-[450px] mx-4" x-on:click="categorian='{{ $categoria1->nombre }}'">
x-on:click="categorian='{{ $categoria1->nombre }}'">
<img src="{{ asset($categoria1->imagen) }}" class="w-full m-auto rounded-lg object-cover h-full object-center shadow" alt="imagen de {{ $categoria1->nombre }}">
<img src="{{ asset($categoria1->imagen) }}"
class="w-full m-auto rounded-lg object-cover h-full object-center shadow"
alt="imagen de {{ $categoria1->nombre }}">
</div> </div>
</td> </td>
@endforeach @endforeach
@@ -51,7 +48,7 @@
</g> </g>
</svg></button> </svg></button>
</div> </div>
<button x-on:click="verPro=true" class="my-2 mx max-w-sm ml-auto rounded-lg border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green sm-text-sm sm-leading-5">Ver todos</button> <button x-on:click="verPro=true" class="my-2 mx max-w-sm ml-auto rounded-lg border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green sm-text-sm sm-leading-5">Ver todos</button>
</div> </div>
<div> <div>
@@ -71,7 +68,7 @@
<img src="{{ asset($promocion->img_publicidad) }}" alt="" class="w-full m-auto rounded-lg object-cover h-24 sm:h-44 object-center shadow"> <img src="{{ asset($promocion->img_publicidad) }}" alt="" class="w-full m-auto rounded-lg object-cover h-24 sm:h-44 object-center shadow">
</a> </a>
</div> </div>
@endif @endif
@endforeach @endforeach
</div> </div>
@@ -89,24 +86,24 @@
x-transition:leave-end="opacity-0 scale-100" x-transition:leave-end="opacity-0 scale-100"
class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-10"> class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-10">
<div class="overflow-auto h-full "> <div class="overflow-auto h-full ">
<div class="grid sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 py-2 px-4 "> <div class="grid sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-3 py-2 px-4 ">
@foreach ($categorias as $categoria1) @foreach ($categorias as $categoria1)
<div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[350px] sm:h-[350px] mx-4 my-2 mx-auto" <div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[350px] sm:h-[350px] mx-4 my-2 mx-auto"
x-on:click="categorian='{{ $categoria1->nombre }}',verPro=false"> x-on:click="categorian='{{ $categoria1->nombre }}',verPro=false">
<img src="{{ asset($categoria1->imagen) }}" <img src="{{ asset($categoria1->imagen) }}"
class="w-full m-auto rounded-lg object-cover h-full object-center shadow" class="w-full m-auto rounded-lg object-cover h-full object-center shadow"
alt=""> alt="">
</div> </div>
@endforeach @endforeach
<span class="absolute z-40 top-0 right-0 md:right-[48%]"> <span class="absolute z-40 top-0 right-0 md:right-[48%]">
<button type="button" x-on:click="verPro=false" <button type="button" x-on:click="verPro=false"
class="inline-flex justify-center w-full rounded-l-md md:rounded-md rounded-b-md border border-transparent px-4 py-2 text-white bg-[#ff5050] hover:bg-[#fd3737] ease-in-out sm-text-sm sm-leading-5">Cerrar</button> class="inline-flex justify-center w-full rounded-l-md md:rounded-md rounded-b-md border border-transparent px-4 py-2 text-white bg-[#ff5050] hover:bg-[#fd3737] ease-in-out sm-text-sm sm-leading-5">Cerrar</button>
+18 -10
View File
@@ -361,7 +361,7 @@
<span class="mr-4"> <span class="mr-4">
<button wire:click="openAdd" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button> <button wire:click="openAdd" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5 ">Añadir usuario</button>
</span> </span>
@endif @endif
@endif @endif
@endif @endif
<span> <span>
@@ -472,23 +472,23 @@
</div> </div>
{{-- @if (!empty($consulta_verUsuarios->servicio->perfiles)) {{-- @if (!empty($consulta_verUsuarios->servicio->perfiles))
<div class="mb-4"> <div class="mb-4">
<label for="Perfil " class="block text-gray-700 text-sm font-bold mb-2">Perfil:</label> <label for="Perfil " class="block text-gray-700 text-sm font-bold mb-2">Perfil:</label>
<select name="" id="" wire:model="perfil" disabled class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> <select name="" id="" wire:model="perfil" disabled class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
@if ($consulta_verUsuarios) @if ($consulta_verUsuarios)
<option value="" select>Seleccionar</option> <option value="" select>Seleccionar</option>
@php @php
$pantallas = $consulta_verUsuarios->servicio->pantallas; $pantallas = $consulta_verUsuarios->servicio->pantallas;
@endphp @endphp
@for ($i = 1; $i <= $pantallas; $i++) @for ($i = 1; $i <= $pantallas; $i++)
<option value="{{$i}}">Perfil {{$i}}</option> <option value="{{$i}}">Perfil {{$i}}</option>
@endfor @endfor
@endif @endif
</select> </select>
</div> </div>
@endif --}} @endif --}}
@if (!empty($consulta_verUsuarios->servicio->tarifas)) @if (!empty($consulta_verUsuarios->servicio->tarifas))
@@ -506,7 +506,7 @@
@endif @endif
@else @else
@if ($tarifaItem->rol_id == '5' && ($tarifaItem->pantallas < ($tarifaItem->servicio->pantallas - count($consulta_verUsuarios->historiales)))) @if ($tarifaItem->rol_id == '5' && ($tarifaItem->pantallas < ($tarifaItem->servicio->pantallas - count($consulta_verUsuarios->historiales))))
@if ($tarifaItem->servicio->por_tiempo) @if ($tarifaItem->servicio->por_tiempo)
<option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option> <option value="{{ $tarifaItem }}">{{ $tarifaItem->servicio->nombre }} - {{ $tarifaItem->dias }} {{ __($tarifaItem->dias == 1 ? 'día' : 'días') }}</option>
@else @else
@@ -791,7 +791,8 @@
<table class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2 mb-4"> <table class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2 mb-4">
<thead class="font-normal bg-[#000029] text-white h-9"> <thead class="font-normal bg-[#000029] text-white h-9">
<tr class="text-left"> <tr class="text-left">
<th class="rounded-l-lg font-normal pl-[1rem]">Rol</th> <th class="rounded-l-lg font-normal pl-[1rem]">Estado</th>
<th class="font-normal pl-[1rem]">Rol</th>
<th class="font-normal pl-[1rem] whitespace-nowrap">Pantallas</th> <th class="font-normal pl-[1rem] whitespace-nowrap">Pantallas</th>
<th class="font-normal pl-[1rem]">Valor</th> <th class="font-normal pl-[1rem]">Valor</th>
<th class="font-normal pl-[1rem]">Dias</th> <th class="font-normal pl-[1rem]">Dias</th>
@@ -804,6 +805,13 @@
@if (!empty($tarifas)) @if (!empty($tarifas))
@foreach ($tarifas as $tarifa) @foreach ($tarifas as $tarifa)
<tr class="border-gray-200 text-left w-full pl-4"> <tr class="border-gray-200 text-left w-full pl-4">
<td class="pl-[1rem]">
@if ($tarifa->estado == 'activo')
<div class="bg-green-500 rounded-full w-3 h-3"></div>
@else
<div class="bg-red-500 rounded-full w-3 h-3"></div>
@endif
</td>
<td class="pl-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td> <td class="pl-[1rem]">{{ $tarifa->rol->nombre ?? '' }}</td>
<td class="pl-[1rem]">{{ $tarifa->pantallas ?? '' }}</td> <td class="pl-[1rem]">{{ $tarifa->pantallas ?? '' }}</td>
<td class="pl-[1rem]">{{ $tarifa->valor ?? '' }}</td> <td class="pl-[1rem]">{{ $tarifa->valor ?? '' }}</td>
@@ -85,12 +85,9 @@
<table> <table>
@foreach ($categorias as $categoria1) @foreach ($categorias as $categoria1)
<td> <td>
<div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[350px] sm:h-[350px] mx-4" <div class="cursor-pointer transition hover:scale-[1.05] w-[250px] h-[250px] sm:w-[350px] sm:h-[350px] mx-4" x-on:click="categorian='{{ $categoria1->nombre }}'">
x-on:click="categorian='{{ $categoria1->nombre }}'">
<img src="{{ asset($categoria1->imagen) }}" <img src="{{ asset($categoria1->imagen) }}" class="w-full m-auto rounded-lg object-cover h-full object-center shadow" alt="imagen de {{ $categoria1->nombre }}">
class="w-full m-auto rounded-lg object-cover h-full object-center shadow"
alt="imagen de {{ $categoria1->nombre }}">
</div> </div>
</td> </td>
@@ -106,9 +106,7 @@
<tr class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500" <tr class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500"
x-data="{ openOption: false }"> x-data="{ openOption: false }">
<td class="sm:pl-[2rem] w-full py-2"> <td class="sm:pl-[2rem] w-full py-2">
<img src="{{ asset($servicio->img) }}" <img src="{{ asset($servicio->img) }}" class=" w-24 sm:w-28 m-auto rounded-lg object-cover h-12 sm:h-14 object-center shadow" alt="{{ $servicio->nombre }}">
class=" w-24 sm:w-28 m-auto rounded-lg object-cover h-12 sm:h-14 object-center shadow"
alt="">
</td> </td>
<td class="sm:pr-[2rem] hidden sm:table-cell"> <td class="sm:pr-[2rem] hidden sm:table-cell">
{{ $servicio->id }} {{ $servicio->id }}
@@ -59,8 +59,7 @@
wire:click="consultaTarifa({{ $servicio1 }})"> wire:click="consultaTarifa({{ $servicio1 }})">
<img src="{{ asset($servicio1->img) }}" <img src="{{ asset($servicio1->img) }}"
class="w-full m-auto rounded-lg object-cover h-full object-center shadow" class="w-full m-auto rounded-lg object-cover h-full object-center shadow"
alt=""> alt="imagen de {{ $servicio1->nombre }}">
<!--p>{{ $servicio1->nombre }}</p-->
</button> </button>
</td> </td>
@endforeach @endforeach
@@ -391,7 +390,7 @@
@php @php
$n = 0; $n = 0;
@endphp @endphp
@foreach ($cuentas->cuentas->unique() as $cuenta) @foreach ($cuentas->cuentas->unique() as $cuenta)
@php @php
$n++; $n++;
@@ -565,7 +564,7 @@
*Usuario:* {{ trim($cuenta->correo) }} *Usuario:* {{ trim($cuenta->correo) }}
*Contraseña:* {{ trim($cuenta->password) }} *Contraseña:* {{ trim($cuenta->password) }}
@endforeach @endforeach
</textarea> </textarea>