From 9d0940873d461ba0de04c5d6a34c799e4a427a5e Mon Sep 17 00:00:00 2001 From: Lizandro Date: Tue, 14 Jul 2026 01:08:46 +0000 Subject: [PATCH] =?UTF-8?q?feat(chat):=20bot=C3=B3n=20cerrar=20sesi=C3=B3n?= =?UTF-8?q?=20en=20el=20header=20del=20chat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- app/Http/Livewire/Chat/PublicChat.php | 21 +++++++++++++++++++ .../views/livewire/chat/public-chat.blade.php | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/app/Http/Livewire/Chat/PublicChat.php b/app/Http/Livewire/Chat/PublicChat.php index 61f8d87..ff86a39 100644 --- a/app/Http/Livewire/Chat/PublicChat.php +++ b/app/Http/Livewire/Chat/PublicChat.php @@ -137,6 +137,27 @@ class PublicChat extends Component $this->paso = 'email'; } + public function cerrarSesion(): void + { + $this->email = ''; + $this->nombreRegistro = ''; + $this->cedulaRegistro = ''; + $this->celularRegistro = ''; + $this->codigoIngresado = ''; + $this->emailMascarado = null; + $this->contactIdPending = null; + $this->userId = null; + $this->nombreUsuario = null; + $this->saldoUsuario = null; + $this->convId = null; + $this->estadoConv = 'bot'; + $this->flujo = ''; + $this->flujoData = []; + $this->mensajes = []; + $this->input = ''; + $this->paso = 'email'; + } + // ───────────────────────────────────────────────────────── // Paso 2b: verificar código OTP // ───────────────────────────────────────────────────────── diff --git a/resources/views/livewire/chat/public-chat.blade.php b/resources/views/livewire/chat/public-chat.blade.php index a9bac7c..6c9ba98 100644 --- a/resources/views/livewire/chat/public-chat.blade.php +++ b/resources/views/livewire/chat/public-chat.blade.php @@ -188,6 +188,13 @@

${{ number_format($saldoUsuario) }}

@endif + {{-- Cerrar sesión --}} +