-mockup widgetchat coletely
All checks were successful
Build Docker Image / Build Docker Image (push) Successful in 7m1s
Build Docker Image / Restart Docker Compose (push) Successful in 0s

This commit is contained in:
2025-12-01 14:46:16 +07:00
parent 6c52de4762
commit 1b6ef14c10
3 changed files with 8 additions and 10 deletions

View File

@@ -8,8 +8,8 @@ import { Component, HostListener } from '@angular/core';
styleUrl: './chat-widget-component.css',
})
export class ChatWidgetComponent {
isOpen = true;
newMessage = '';
isOpen = false;
// newMessage = '';
chatForm!: FormGroup;
// State สำหรับจัดการขนาด
@@ -53,9 +53,10 @@ export class ChatWidgetComponent {
}
sendMessage() {
if (this.newMessage.trim()) {
this.messages.push({ text: this.newMessage, isUser: true });
this.newMessage = '';
let newMessage = this.chatForm.get('message')?.value;
if (newMessage.trim()) {
this.messages.push({ text: newMessage, isUser: true });
newMessage = '';
setTimeout(() => {
this.messages.push({
text: 'รับทราบครับ ระบบกำลังประมวลผล...',