-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

@@ -63,7 +63,7 @@
'bg-red-800 text-white rounded-tl-2xl rounded-tr-2xl rounded-bl-2xl': msg.isUser,
'bg-white text-gray-800 border border-gray-200 rounded-tl-2xl rounded-tr-2xl rounded-br-2xl': !msg.isUser
}"
class="max-w-[85%] px-4 py-2 text-sm shadow-sm break-words relative group">
class="max-w-[85%] px-4 py-2 text-sm shadow-sm wrap-break-words relative group">
{{ msg.text }}
</div>
</div>
@@ -112,4 +112,4 @@
</div>
<!-- Overlay กันกดส่วนอื่นตอนกำลังลาก -->
<div *ngIf="isResizing" class="fixed inset-0 z-[60] cursor-nw-resize"></div>
<div *ngIf="isResizing" class="fixed inset-0 z-60 cursor-nw-resize"></div>

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: 'รับทราบครับ ระบบกำลังประมวลผล...',

View File

@@ -36,9 +36,6 @@ export class MainManagerComponent implements OnInit {
p.status = 'CN';
}
download(){
}
openBudgetDetail(idx: IPrjMst) {
this.router.navigate(['/main/manager/aproval'], {
state: {