diff --git a/app/javascript/dashboard/assets/scss/plugins/_multiselect.scss b/app/javascript/dashboard/assets/scss/plugins/_multiselect.scss index 6d522dc9b..480e31c61 100644 --- a/app/javascript/dashboard/assets/scss/plugins/_multiselect.scss +++ b/app/javascript/dashboard/assets/scss/plugins/_multiselect.scss @@ -91,7 +91,6 @@ } .sidebar-labels-wrap { - &.has-edited, &:hover { .multiselect { @@ -108,8 +107,6 @@ } .multiselect { - margin-top: $space-small; - >.multiselect__select { visibility: hidden; } diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue index aa9af83b2..a2a914bb2 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue @@ -6,15 +6,15 @@ >

- {{ chat.meta.sender.name }} + {{ currentContact.name }}

- + v-html="extractMessageText(lastMessageInChat)" + />
- {{ dynamicTime(lastMessage(chat).created_at) }} + {{ + lastMessageInChat ? dynamicTime(lastMessageInChat.created_at) : '' + }} {{ getUnreadCount }}
@@ -78,6 +79,12 @@ export default { accountId: 'getCurrentAccountId', }), + currentContact() { + return this.$store.getters['contacts/getContact']( + this.chat.meta.sender.id + ); + }, + isActiveChat() { return this.currentChat.id === this.chat.id; }, @@ -93,6 +100,10 @@ export default { isInboxNameVisible() { return !this.activeInbox; }, + + lastMessageInChat() { + return this.lastMessage(this.chat); + }, }, methods: { @@ -102,6 +113,10 @@ export default { router.push({ path: frontendURL(path) }); }, extractMessageText(chatItem) { + if (!chatItem) { + return ''; + } + const { content, attachments } = chatItem; if (content) { diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue index 29215362f..8be30ff68 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue @@ -2,14 +2,14 @@

- {{ chat.meta.sender.name }} + {{ currentContact.name }}

-
+
+ +
+ {{ + $t('CONTACT_PANEL.LABELS.UPDATE_ERROR') + }} +
@@ -45,10 +49,12 @@