diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
index 5d93ac9fa..9f6b25ad5 100644
--- a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue
@@ -1,263 +1,51 @@
-
-
-
-
- -
-
-
-
-
- -
-
- {{ getUnreadCount }} UNREAD MESSAGE{{
- getUnreadCount > 1 ? 'S' : ''
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
- {{ $t('CONVERSATION.NO_INBOX_1') }}
-
-
- {{ $t('CONVERSATION.CLICK_HERE') }}
-
- {{ $t('CONVERSATION.NO_INBOX_2') }}
-
-
- {{ $t('CONVERSATION.NO_INBOX_AGENT') }}
-
-
-
-
-
-
-

-
{{ $t('CONVERSATION.404') }}
-
-
-
+
+
+
-
diff --git a/app/javascript/dashboard/components/widgets/conversation/EmptyState.vue b/app/javascript/dashboard/components/widgets/conversation/EmptyState.vue
new file mode 100644
index 000000000..d0cf98a5e
--- /dev/null
+++ b/app/javascript/dashboard/components/widgets/conversation/EmptyState.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+

+
+ {{ $t('CONVERSATION.NO_INBOX_1') }}
+
+
+ {{ $t('CONVERSATION.CLICK_HERE') }}
+
+ {{ $t('CONVERSATION.NO_INBOX_2') }}
+
+
+ {{ $t('CONVERSATION.NO_INBOX_AGENT') }}
+
+
+
+
+

+
+ {{ $t('CONVERSATION.NO_MESSAGE_1') }}
+
+
+
+
+
+

+
{{ $t('CONVERSATION.404') }}
+
+
+
+
+
diff --git a/app/javascript/dashboard/components/widgets/conversation/Conversation.vue b/app/javascript/dashboard/components/widgets/conversation/Message.vue
similarity index 66%
rename from app/javascript/dashboard/components/widgets/conversation/Conversation.vue
rename to app/javascript/dashboard/components/widgets/conversation/Message.vue
index de5be0408..59283b4c1 100644
--- a/app/javascript/dashboard/components/widgets/conversation/Conversation.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/Message.vue
@@ -1,30 +1,40 @@
-
+
@@ -46,8 +56,13 @@ export default {
BubbleMap,
BubbleAudio,
},
- props: ['data'],
mixins: [timeMixin],
+ props: {
+ data: {
+ type: Object,
+ required: true,
+ },
+ },
data() {
return {
isHovered: false,
@@ -71,11 +86,16 @@ export default {
return this.data.private;
},
toolTipMessage() {
- return this.data.private ? { content: this.$t('CONVERSATION.VISIBLE_TO_AGENTS'), classes: 'top' } : false;
+ return this.data.private
+ ? { content: this.$t('CONVERSATION.VISIBLE_TO_AGENTS'), classes: 'top' }
+ : false;
},
sentByMessage() {
- return this.data.message_type === 1 && !this.isHovered && this.data.sender !== undefined ?
- { content: `Sent by: ${this.data.sender.name}`, classes: 'top' } : false;
+ return this.data.message_type === 1 &&
+ !this.isHovered &&
+ this.data.sender !== undefined
+ ? { content: `Sent by: ${this.data.sender.name}`, classes: 'top' }
+ : false;
},
wrapClass() {
return {
@@ -83,14 +103,16 @@ export default {
'activity-wrap': !this.isBubble,
};
},
-
},
methods: {
getEmojiSVG,
linkify(text) {
if (!text) return text;
const urlRegex = /(https?:\/\/[^\s]+)/g;
- return text.replace(urlRegex, url => `${url}`);
+ return text.replace(
+ urlRegex,
+ url => `${url}`
+ );
},
},
};
diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
new file mode 100644
index 000000000..59a683774
--- /dev/null
+++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+ {{ getUnreadCount }} UNREAD MESSAGE{{ getUnreadCount > 1 ? 'S' : '' }}
+
+
+
+
+
+
+
+
+