-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-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>
|
||||||
|
|||||||
@@ -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: 'รับทราบครับ ระบบกำลังประมวลผล...',
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user