From d68d769782dd06bbe0b996ac8f54fa6e9d34ed42 Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 13 May 2024 14:00:18 -0500 Subject: [PATCH] upd --- app/Http/Livewire/ShowServicios.php | 13 +++++++++---- resources/views/livewire/show-servicios.blade.php | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Http/Livewire/ShowServicios.php b/app/Http/Livewire/ShowServicios.php index b8b5ebe..c7f4c13 100755 --- a/app/Http/Livewire/ShowServicios.php +++ b/app/Http/Livewire/ShowServicios.php @@ -86,10 +86,9 @@ class ShowServicios extends Component $this->email_tarjetaPlan = $this->usuario_actual->email; $this->celular_tarjetaPlan = $this->usuario_actual->celular; } - if (!empty($this->cantidad_tarjetaPlan)) { + if ($this->cantidad_tarjetaPlan > 1) { //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 public function cargartarjetaPlan($id) { - //$this->tarjetaPlan=false; + $this->tarifa_id = $id; //$this->tarjetaPlan=false; //Buscar tarifas por el id $tarifa_seleccionada = Tarifas::find($id); //Traer el servicio relacionado con esa tarifa @@ -208,6 +207,12 @@ class ShowServicios extends Component $this->tarjetaPlan = true; } + public function cerrartarjetaPlan(){ + $this->cantidad_tarjetaPlan = 1; + $this->tarjetaPlan = false; + $this->tarifa_id = ''; + + } public function notificacionPocas($servicio, $restantes) { diff --git a/resources/views/livewire/show-servicios.blade.php b/resources/views/livewire/show-servicios.blade.php index 492419f..65b5f2a 100755 --- a/resources/views/livewire/show-servicios.blade.php +++ b/resources/views/livewire/show-servicios.blade.php @@ -16,7 +16,7 @@
+ wire:target="cargartarjetaPlan,cantidad_tarjetaPlan,tp,cerrartarjetaPlan">
@@ -326,7 +326,7 @@ @endif -