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 --}} +