This commit is contained in:
lizandrogd
2024-05-13 14:00:18 -05:00
parent a35827aef7
commit d68d769782
2 changed files with 11 additions and 6 deletions
+9 -4
View File
@@ -86,10 +86,9 @@ class ShowServicios extends Component
$this->email_tarjetaPlan = $this->usuario_actual->email; $this->email_tarjetaPlan = $this->usuario_actual->email;
$this->celular_tarjetaPlan = $this->usuario_actual->celular; $this->celular_tarjetaPlan = $this->usuario_actual->celular;
} }
if (!empty($this->cantidad_tarjetaPlan)) { if ($this->cantidad_tarjetaPlan > 1) {
//dd($this->tarifa_id); //dd($this->tarifa_id);
//$this->cargartarjetaPlan($this->tarifa_id); $this->cargartarjetaPlan($this->tarifa_id);
} }
@@ -118,7 +117,7 @@ class ShowServicios extends Component
//Al abrir la tarjeta del servicio //Al abrir la tarjeta del servicio
public function cargartarjetaPlan($id) public function cargartarjetaPlan($id)
{ {
//$this->tarjetaPlan=false; $this->tarifa_id = $id; //$this->tarjetaPlan=false;
//Buscar tarifas por el id //Buscar tarifas por el id
$tarifa_seleccionada = Tarifas::find($id); $tarifa_seleccionada = Tarifas::find($id);
//Traer el servicio relacionado con esa tarifa //Traer el servicio relacionado con esa tarifa
@@ -208,6 +207,12 @@ class ShowServicios extends Component
$this->tarjetaPlan = true; $this->tarjetaPlan = true;
} }
public function cerrartarjetaPlan(){
$this->cantidad_tarjetaPlan = 1;
$this->tarjetaPlan = false;
$this->tarifa_id = '';
}
public function notificacionPocas($servicio, $restantes) public function notificacionPocas($servicio, $restantes)
{ {
@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<div class=" absolute backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading <div class=" absolute backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading
wire:target="cargartarjetaPlan,cantidad_tarjetaPlan,tp"> wire:target="cargartarjetaPlan,cantidad_tarjetaPlan,tp,cerrartarjetaPlan">
<div class="grid h-full place-items-center "> <div class="grid h-full place-items-center ">
<div class="max-w-xs"> <div class="max-w-xs">
<img src="./img/loading.gif" alt="" class="w-full text-center"> <img src="./img/loading.gif" alt="" class="w-full text-center">
@@ -326,7 +326,7 @@
</span> </span>
@endif @endif
<span> <span>
<button x-on:click="tarjetaPlan = false" type="button" <button wire:click="cerrartarjetaPlan" type="button"
class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button> class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] focus:shadow-outline-green sm-text-sm sm-leading-5">Cerrar</button>
</span> </span>
</div> </div>