Asignar campo utilidad

This commit is contained in:
Felipe
2023-10-09 14:56:06 -05:00
parent 83b7bfe16b
commit 8dc97fb2df
15 changed files with 161 additions and 17 deletions
@@ -19,7 +19,7 @@
<div class="mb-10" id="planes">
<h1 class="text-gray-600 text-center text-lg my-8">Planes</h1>
<div class="mt-4 grid grid-cols-2 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-5 justify-items-center gap-y-8">
<div class="mt-4 grid grid-cols-2 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-5 justify-items-center gap-y-8 pb-12">
@foreach ($planes as $plan)
@if (!empty($plan->tarifas->first()->pantallas))
<a href="/single?servicio={{$plan->id}}" class="rounded-xl mb-2 bg-white shadow-lg">
@@ -703,7 +703,7 @@
<div>
<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]">
<label class="text-gray-500 text-sm">Rol</label>
<select name="roles" id="roles" wire:model.debounce.500ms="roles_modTarifas"
@@ -724,6 +724,11 @@
<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">
</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 class="mb-4 grid grid-cols-3">
@@ -744,9 +749,8 @@
class="inline-flex justify-center w-full md:w-auto rounded-md border border-transparent px-4 py-1 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</button>
</span>
</div>
</div>
</div>
</div>
<div class="overflow-y-auto max-h-48">
<table class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2 mb-4">
@@ -769,10 +773,10 @@
<td class="pl-[1rem]">{{ $tarifa->valor ?? '' }}</td>
<td class="pl-[1rem]">{{ $tarifa->dias ?? '' }}</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>
</td-->
</td> --}}
</tr>
@endforeach
@endif
@@ -303,9 +303,9 @@
</div>
<div class="mb-4">
<label for="valor_compra_promocion"
<label for="utilidad"
class="block text-gray-700 text-sm font-bold mb-2">Valor de compra:</label>
<input name="valor_compra_promocion" wire:model="valor_compra_promocion" type="number" min="0"
<input name="utilidad" wire:model="utilidad" type="number" min="0"
placeholder="$0"
class="w-full border-2 border-neutral-200 shadow rounded-[0.8rem] px-4 py-2 text-gray-900 sm:text-sm focus:border-neutral-300 focus:outline-none focus:shadow-outline focus:ring-0 block datepicker-input">