diff --git a/src/app/layout/components/chat-panel/chat-panel.component.html b/src/app/layout/components/chat-panel/chat-panel.component.html index eab3cb96..8828c5fe 100644 --- a/src/app/layout/components/chat-panel/chat-panel.component.html +++ b/src/app/layout/components/chat-panel/chat-panel.component.html @@ -2,7 +2,8 @@ -
+
chat

Team Chat

@@ -18,12 +19,14 @@ - -
@@ -37,7 +40,7 @@ class="contacts-list-item" [ngClass]="contact.status" [class.active]="contact.id === selectedContact?.id" - (click)="goToChat(contact)"> + (click)="toggleChat(contact)"> - +
chat @@ -87,11 +90,29 @@
Start a conversation by typing your message below.
+ + + + + +
+ +
+ chat +
+ +
+ Select a contact to start a conversation. +
+ +
+
-
+
{ + // Load the chat + this._chatPanelService.getChat(contact.id).then((chat) => { - // Set the chat - this.chat = chat; + // Set the chat + this.chat = chat; - // Prepare the chat for the replies - this._prepareChatForReplies(); - }); + // Prepare the chat for the replies + this._prepareChatForReplies(); + }); + } + } + + /** + * Remove the selected contact and unload the chat + */ + resetChat(): void + { + // Set the selected contact as null + this.selectedContact = null; + + // Set the chat as null + this.chat = null; } /**