This commit is contained in:
Felipe
2023-10-10 13:31:17 -05:00
parent d21d256551
commit 0c15e3c3b0
2 changed files with 21 additions and 17 deletions
+10 -4
View File
@@ -760,6 +760,7 @@
<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>
<th class="font-normal pl-[1rem]">Utilidad</th>
<th class="font-normal pl-[1rem]"></th> <th class="font-normal pl-[1rem]"></th>
<th class="rounded-r-lg font-normal w-[1rem]"></th> <th class="rounded-r-lg font-normal w-[1rem]"></th>
</tr> </tr>
@@ -772,11 +773,12 @@
<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>
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td> <td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</td>
<td class="pl-[1rem]">{{ $tarifa->utilidad ?? '' }}</td>
<td class="pl-[1rem]"><button wire:click="editar({{$tarifa}})" class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button></td> <td class="pl-[1rem]"><button wire:click="editar({{$tarifa}})" class="justify-center flex px-3 py-2 rounded-lg text-xs cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Editar</button></td>
{{-- <!--td class="pl-[1rem]"> <!--td class="pl-[1rem]">
<svg wire:click="eliminarModTarifa({{ $tarifa->id ?? ''}})" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-6 cursor-pointer" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><g id="Flat_Color" data-name="Flat Color"><circle cx="12" cy="12" fill="#e63946" r="10" data-original="#e63946" class=""></circle><path d="m13.41 12 2.3-2.29a1 1 0 0 0 -1.42-1.42l-2.29 2.3-2.29-2.3a1 1 0 0 0 -1.42 1.42l2.3 2.29-2.3 2.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l2.29-2.3 2.29 2.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z" fill="#edebea" data-original="#edebea" class=""></path></g></g> <svg wire:click="eliminarModTarifa({{ $tarifa->id ?? ''}})" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-6 cursor-pointer" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><g id="Flat_Color" data-name="Flat Color"><circle cx="12" cy="12" fill="#e63946" r="10" data-original="#e63946" class=""></circle><path d="m13.41 12 2.3-2.29a1 1 0 0 0 -1.42-1.42l-2.29 2.3-2.29-2.3a1 1 0 0 0 -1.42 1.42l2.3 2.29-2.3 2.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l2.29-2.3 2.29 2.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z" fill="#edebea" data-original="#edebea" class=""></path></g></g>
</svg> </svg>
</td> --}} </td> -->
</tr> </tr>
@endforeach @endforeach
@endif @endif
@@ -805,11 +807,10 @@
class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20"> class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
<div class="grid h-full place-items-center"> <div class="grid h-full place-items-center">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md"> <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md">
@if($informacionTarifaRol) @if($informacionTarifaRol)
<div> <div>
<label class="block text-gray-700 text-sm font-bold mb-2">Pantallas:</label> <label class="block text-gray-700 text-sm font-bold mb-2">Pantallas:</label>
<div class="grid grid-cols-3 gap-2 text-left mb-4"> <div class="grid grid-cols-4 gap-2 text-left mb-4">
<div class="w-[6rem]"> <div class="w-[6rem]">
<label class="text-gray-500 text-sm">Rol</label> <label class="text-gray-500 text-sm">Rol</label>
<select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas" <select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas"
@@ -829,6 +830,11 @@
<label class="text-gray-500 text-sm">Precio</label> <label class="text-gray-500 text-sm">Precio</label>
<input type="number" id="precio_modTarifas" wire:model="precio_modTarifas" min="0" <input type="number" id="precio_modTarifas" wire:model="precio_modTarifas" min="0"
class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div>
<div class="w-[6rem]">
<label class="text-gray-500 text-sm">Utilidad</label>
<input type="number" id="utilidad" wire:model="utilidad" min="0"
class="w-full border-2 border-neutral-200 rounded-[0.8rem] focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
</div> </div>
</div> </div>
@@ -110,8 +110,7 @@
@endphp @endphp
<tbody class="text-gray-500 select-none pr-4 sm:pr-2"> <tbody class="text-gray-500 select-none pr-4 sm:pr-2">
@foreach ($historiales as $historial) @foreach ($historiales as $historial)
<tr <tr class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500">
class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500">
<td class="md:pl-[2rem] md:pr-[2rem]"> <td class="md:pl-[2rem] md:pr-[2rem]">
{{ $historial->fecha_inicio }} {{ $historial->fecha_inicio }}
</td> </td>
@@ -127,15 +126,14 @@
</td> </td>
<td class="md:pl-[2rem] md:pr-[2rem]"> <td class="md:pl-[2rem] md:pr-[2rem]">
@foreach ($historial->promocion->tarifas as $tarifa) @foreach ($historial->promocion->tarifas as $tarifa)
<p>${{ number_format($tarifa->servicio->precio ?? 0, 2, ',', '.') }} <p>${{ number_format($tarifa->servicio->precio ?? 0, 0, ',', '.') }}</p>
</p>
@endforeach @endforeach
</td> </td>
<td class="md:pl-[2rem] md:pr-[2rem] text-right"> <td class="md:pl-[2rem] md:pr-[2rem] text-right">
@foreach ($historial->promocion->tarifas as $tarifa) ${{$historial->utilidad ?? ''}}
<p>${{ number_format($tarifa->servicio->precio / $tarifa->pantallas ?? 0, 2, ',', '.') }} {{-- @foreach ($historial->promocion->tarifas as $tarifa)
</p> <p>${{ number_format($tarifa->servicio->precio / $tarifa->pantallas ?? 0, 2, ',', '.') }}</p>
@endforeach @endforeach --}}
</td> </td>
</tr> </tr>
@foreach ($historial->promocion->tarifas as $tarifa) @foreach ($historial->promocion->tarifas as $tarifa)
@@ -185,8 +183,7 @@
@endphp @endphp
<tbody class="text-gray-500 select-none pr-4 sm:pr-2"> <tbody class="text-gray-500 select-none pr-4 sm:pr-2">
@foreach ($historiales as $historial) @foreach ($historiales as $historial)
<tr <tr class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500">
class="border-gray-200 text-left w-full sm:pl-4 hover:bg-gray-200 hover:ring-gray-500">
<td class="md:pl-[2rem] md:pr-[2rem]"> <td class="md:pl-[2rem] md:pr-[2rem]">
{{ $historial->fecha_inicio }} {{ $historial->fecha_inicio }}
</td> </td>
@@ -199,8 +196,9 @@
<td class="md:pl-[2rem] md:pr-[2rem]"> <td class="md:pl-[2rem] md:pr-[2rem]">
${{ $historial->tarifa->servicio->precio }} ${{ $historial->tarifa->servicio->precio }}
</td> </td>
<td class="md:pl-[2rem] md:pr-[2rem] text-right"> <td class="md:pl-[2rem] md:p-r[2rem] text-right">
${{ number_format($historial->tarifa->servicio->precio / $historial->tarifa->pantallas ?? 0, 2, ',', '.') }} ${{ $historial->utilidad ?? ''}}
{{-- ${{ number_format($historial->tarifa->servicio->precio / $historial->tarifa->pantallas ?? 0, 2, ',', '.') }} --}}
</td> </td>
</tr> </tr>
@php @php
@@ -224,7 +222,7 @@
</th> </th>
<td class="border-t border-b"> <td class="border-t border-b">
<p class="flex items-center px-6 py-4 cursor-pointer"> <p class="flex items-center px-6 py-4 cursor-pointer">
$ {{ number_format($totalUtilidades ?? 0, 2, ',', '.') }} $ {{ number_format($totalUtilidades ?? 0, 0, ',', '.') }}
</p> </p>
</td> </td>
</tr> </tr>