editar tarifas promociones

This commit is contained in:
Felipe
2024-03-01 17:35:41 -05:00
parent b3f03331f3
commit eb2e3ce76c
7 changed files with 252 additions and 148 deletions
@@ -1,11 +1,11 @@
<div class=" bg-gray-100">
<div class="md:px-10 py-8 ">
<h1 class="ml-2 text-xl sm:text-2xl font-black">
{{$servicio->nombre}}
</h1>
</h1>
<div class="md:grid md:grid-cols-4 md:items-center ">
@@ -13,7 +13,7 @@
<img src="{{asset($servicio->img_inicio) }}" alt="" class="rounded-xl md:w-[100%]">
</div>
<div class="px-8 mb-4 md:mb-0 md:border-r md:mr-6 max-w-xs">
<div class="mb-4">
@if($servicio->nombre == 'Youtube Premium' || $servicio->nombre== 'Spotify Premium')
@@ -33,35 +33,35 @@
@endforeach
</select>
@endif
@if (!empty($disponibles))
<p class="italic text-green-500">
{{$disponibles ?? ''}} Cuentas disponibles.
{{$disponibles ?? ''}} Cuentas disponibles.
</p>
@endif
</div>
<div class="mb-4">
<label class="block text-gray-700 font-bold mb-1">Cantidad</label>
<input type="tel" wire:model="cantidad_tarjetaPlan" class="@error('cantidad_tarjetaPlan') border border-red-500 @enderror border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full md:w-[72%] py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
@error('cantidad_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div>
<div class="mb-4">
<label class="block text-gray-700 font-bold mb-1">Descripción</label>
<p class="text-gray-500 ">
{{$servicio->descripcion}}
</p>
</div>
@if (!empty($valor))
<label class="block text-gray-700 font-bold mb-1">Precio</label>
<p class="font-bold text-lg"> ${{number_format( $valor ?? '')}}</p>
@else
<label class="block text-gray-700 font-bold mb-1">Precio</label>
@if ($servicio->tarifas_min_valor != $servicio->tarifas_max_valor)
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}} - {{number_format($servicio->tarifas_max_valor)}}</p>
@@ -69,7 +69,7 @@
<p class="font-bold text-lg"> {{number_format($servicio->tarifas_min_valor)}}</p>
@endif
@endif
</div>
@@ -79,7 +79,7 @@
<input type="text" wire:model="nombre_tarjetaPlan" class="@error('nombre_tarjetaPlan') border border-red-500 @enderror 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">
@error('nombre_tarjetaPlan') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div>
<div class="mb-4">
<label class="block text-gray-700 font-bold mb-1">Email</label>
<input type="text" wire:model="email_tarjetaPlan" class="@error('email_tarjetaPlan') border border-red-500 @enderror 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">
@@ -94,19 +94,19 @@
<div class="px-4 py-3 sm:px-6 sm:flex sm:justify-evenly">
<span>
<button wire:click="comprar" @if ($cantidad_tarjetaPlan <= (int)$disponibles )
<button wire:click="comprar" @if ($cantidad_tarjetaPlan <= (int)$disponibles )
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 sm-text-sm sm-leading-5"
@else disabled
@else disabled
class="cursor-no-drop inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-gray-200 hover:bg-gray-200 focus:shadow-outline-green sm-text-sm sm-leading-5" @endif>Pagar</button>
class="cursor-no-drop inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-gray-200 hover:bg-gray-200 focus:shadow-outline-green sm-text-sm sm-leading-5" @endif>Pagar</button>
</span>
</div>
</div>
</div>
</div>
@@ -136,11 +136,11 @@ class="cursor-no-drop inline-flex justify-center w-full rounded-md border border
<p class="font-bold text-base"> {{number_format($plan->tarifas_min_valor)}}</p>
@endif
</div>
<div class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly mb-2">
<button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-1 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Comprar</button>
</div>
</div>
</a>