Files
sirpremiumv2/resources/views/livewire/show-reportes.blade.php
T
2023-11-07 22:43:10 +00:00

111 lines
5.6 KiB
PHP
Executable File

<div class="bg-white overflow-y-auto md:w-[95%] m-auto p-2 md:p-5 rounded-[1.2rem] border-b border-gray-200 shadow-md relative h-[95%] ">
<div class="flex justify-between my-2 items-center mb-4">
<div class="flex items-center md:gap-4">
<div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24"
style="enable-background:new 0 0 512 512" xml:space="preserve">
<g>
<path
d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z"
fill="#b221fd" data-original="#000000" />
</g>
</svg>
Reportes
</div>
</div>
@if (auth()->user()->rol->nombre == "super" || auth()->user()->rol->nombre == "administrador")
<select wire:model="usuario" name="usr" id="usr"
class="lg:w-1/6 border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none ring-0 focus:ring-0 focus:border-neutral-300 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<option value="">Total</option>
@foreach($roles->usuarios as $usuario)
<option value="{{$usuario->id}}">{{$usuario->name}}</option>
@endforeach
</select>
@endif
<select wire:model="mes" name="mes" id="mes"
class="lg:w-1/6 border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none ring-0 focus:ring-0 focus:border-neutral-300 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<option value="">MES</option>
<option value="01">ENERO</option>
<option value="02">FEBRERO</option>
<option value="03">MARZO</option>
<option value="04">ABRIL</option>
<option value="05">MAYO</option>
<option value="06">JUNIO</option>
<option value="07">JULIO</option>
<option value="08">AGOSTO</option>
<option value="09">SEPTIEMBRE</option>
<option value="10">OCTUBRE</option>
<option value="11">NOVIEMBRE</option>
<option value="12">DICIEMBRE</option>
</select>
</div>
<div class="text-center py-2">
Mis ventas
</div>
<div class="overflow-y-auto max-h-96">
<div class="bg-white rounded-lg lg:w-[30rem] mx-auto">
<div class="flex text-center text-4xl">
<p class="w-1/2 border-r border-r-gray-300/30 self-center py-8">
{{ $cantidad }}
</p>
<p class="w-1/2 text-xl self-center py-8">
${{ number_format($suma) }}
</p>
</div>
<div class="flex text-center text-white bg-[#000029] rounded-lg">
<p class="w-1/2 border-r border-r-gray-300/30 py-2 self-center">
Compras Realizadas
</p>
<p class="w-1/2 py-2 self-center">
Valor
</p>
</div>
</div>
</div>
<div class="text-center pt-4 pb-2">
Transacciones Paquetes
</div>
<table class="text-center rounded-lg shadow-lg m-auto mt-4 mb-4 bg-white ">
<thead class="font-normal bg-[#000029] text-white h-9 pr-4 sm:pr-2">
<tr class="text-left">
<th class="rounded-l-lg font-normal pl-[1rem] md:pl-[2rem]">Fecha</th>
<th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Valor</th>
<th class="font-normal sm:pl-[2rem] hidden sm:table-cell">Estado</th>
<th class="rounded-r-lg font-normal pr-[1rem] pl-[1rem] sm:pr-[2rem] sm:pl-[2rem] ">Detalle</th>
</tr>
</thead>
<tbody class="text-gray-500 select-none pr-4 sm:pr-2">
@foreach ($historiales as $historial)
<tr class="border-gray-200 text-left w-full sm:pl-4 " x-data="{openOption:false}">
<td class="sm:pl-[2rem] hidden sm:table-cell">
{{$historial->fecha_inicio}}
</td>
<td class="sm:pl-[2rem] hidden sm:table-cell">
{{$historial->valor}}
</td>
<td class=" pl-[1rem] sm:pl-[2rem]">
{{$historial->estado}}
</td>
<td class="md:pl-[2rem] md:pr-[2rem]">
@if(!empty($historial->tarifa_id))
{{$historial->tarifa->pantallas ?? ''}} {{ $historial->tarifa->servicio->nombre ?? ''}}
@endif
@if(!empty($historial->promocion_id))
{{ $historial->promocion->nombre ?? ''}}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $historiales->links() }}
</div>