Update show-promociones.blade.php
This commit is contained in:
@@ -819,7 +819,7 @@
|
||||
class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4">
|
||||
<span>
|
||||
<!-- Botón de Comprar con protección de múltiples clics y mensaje de procesando -->
|
||||
<button id="comprarButton" wire:click="pagar" wire:loading.attr="disabled"
|
||||
<button id="comprarPromoButton" wire:click="pagar" wire:loading.attr="disabled"
|
||||
type="button"
|
||||
@if ($total <= auth()->user()->saldo->valor) 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
|
||||
@@ -853,7 +853,7 @@
|
||||
if (botonBloqueado) return; // Si el botón está bloqueado, no hacer nada
|
||||
|
||||
botonBloqueado = true; // Bloquea el botón
|
||||
const boton = document.getElementById('comprarButton');
|
||||
const boton = document.getElementById('comprarPromoButton');
|
||||
const mensaje = document.getElementById('procesandoMensaje'); // Referencia al mensaje de procesamiento
|
||||
boton.setAttribute('disabled', 'true'); // Deshabilita el botón
|
||||
boton.classList.add('cursor-not-allowed', 'bg-gray-300'); // Cambia el estilo visual
|
||||
|
||||
Reference in New Issue
Block a user