-mockup widgetchat coletely
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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: 'รับทราบครับ ระบบกำลังประมวลผล...',
|
||||
|
||||
@@ -36,9 +36,6 @@ export class MainManagerComponent implements OnInit {
|
||||
p.status = 'CN';
|
||||
}
|
||||
|
||||
download(){
|
||||
|
||||
}
|
||||
openBudgetDetail(idx: IPrjMst) {
|
||||
this.router.navigate(['/main/manager/aproval'], {
|
||||
state: {
|
||||
|
||||
Reference in New Issue
Block a user