-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-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 '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 }} {{ msg.text }}
</div> </div>
</div> </div>
@@ -112,4 +112,4 @@
</div> </div>
<!-- Overlay กันกดส่วนอื่นตอนกำลังลาก --> <!-- 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', styleUrl: './chat-widget-component.css',
}) })
export class ChatWidgetComponent { export class ChatWidgetComponent {
isOpen = true; isOpen = false;
newMessage = ''; // newMessage = '';
chatForm!: FormGroup; chatForm!: FormGroup;
// State สำหรับจัดการขนาด // State สำหรับจัดการขนาด
@@ -53,9 +53,10 @@ export class ChatWidgetComponent {
} }
sendMessage() { sendMessage() {
if (this.newMessage.trim()) { let newMessage = this.chatForm.get('message')?.value;
this.messages.push({ text: this.newMessage, isUser: true }); if (newMessage.trim()) {
this.newMessage = ''; this.messages.push({ text: newMessage, isUser: true });
newMessage = '';
setTimeout(() => { setTimeout(() => {
this.messages.push({ this.messages.push({
text: 'รับทราบครับ ระบบกำลังประมวลผล...', text: 'รับทราบครับ ระบบกำลังประมวลผล...',

View File

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