diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
index 133261e54..0e9e074c0 100644
--- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
@@ -40,12 +40,17 @@
-
+
+
+
+
+
+
{{ getUnreadCount }}
@@ -90,7 +95,11 @@ import ConversationHeader from './ConversationHeader';
import ReplyBox from './ReplyBox';
import Message from './Message';
import conversationMixin from '../../../mixins/conversations';
-import { getTypingUsersText } from '../../../helper/commons';
+import {
+ getTypingUsersText,
+ getGroupedConversation,
+} from '../../../helper/commons';
+import DateSeparator from 'shared/components/DateSeparator.vue';
import { BUS_EVENTS } from 'shared/constants/busEvents';
export default {
@@ -98,6 +107,7 @@ export default {
ConversationHeader,
Message,
ReplyBox,
+ DateSeparator,
},
mixins: [conversationMixin],
@@ -159,12 +169,23 @@ export default {
);
return chat;
},
+
+ getGroupedMessages() {
+ const chat = this.getMessages;
+ const conversations = this.readMessages(chat);
+ const groupedConversationList = getGroupedConversation({
+ conversations,
+ });
+ return chat === undefined ? null : groupedConversationList;
+ },
+
getReadMessages() {
const chat = this.getMessages;
return chat === undefined ? null : this.readMessages(chat);
},
getUnReadMessages() {
const chat = this.getMessages;
+
return chat === undefined ? null : this.unReadMessages(chat);
},
shouldShowSpinner() {
@@ -288,6 +309,10 @@ export default {