diff --git a/app/Http/Livewire/Chat/PublicChat.php b/app/Http/Livewire/Chat/PublicChat.php index 68cca8e..e5eb28f 100755 --- a/app/Http/Livewire/Chat/PublicChat.php +++ b/app/Http/Livewire/Chat/PublicChat.php @@ -191,6 +191,16 @@ class PublicChat extends Component ]); } + public function limpiarChat(): void + { + // Cierra la conversación actual y abre una nueva en la próxima interacción + $this->mensajes = []; + $this->convId = null; + $this->flujo = ''; + $this->flujoData = []; + session()->forget('chat_conv_id'); + } + public function cerrarSesion(): void { session()->forget(['chat_user_id', 'chat_conv_id']); diff --git a/resources/views/livewire/chat/public-chat.blade.php b/resources/views/livewire/chat/public-chat.blade.php old mode 100644 new mode 100755 index 81b63bb..424d6c8 --- a/resources/views/livewire/chat/public-chat.blade.php +++ b/resources/views/livewire/chat/public-chat.blade.php @@ -182,13 +182,35 @@
${{ number_format($saldoUsuario) }}
@endif - {{-- Cerrar sesión --}} - + {{-- Menú de opciones --}} +