@@ -58,6 +63,7 @@ import InboxNameAndId from './InboxNameAndId.vue';
import InboxContextMenu from './InboxContextMenu.vue';
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
import timeMixin from 'dashboard/mixins/time';
+import { INBOX_EVENTS } from 'dashboard/helper/AnalyticsHelper/events';
export default {
components: {
PriorityIcon,
@@ -83,6 +89,9 @@ export default {
primaryActor() {
return this.notificationItem?.primary_actor;
},
+ isInboxCardActive() {
+ return this.$route.params.conversation_id === this.primaryActor?.id;
+ },
inbox() {
return this.$store.getters['inboxes/getInbox'](
this.primaryActor.inbox_id
@@ -135,7 +144,31 @@ export default {
},
methods: {
openConversation(notification) {
- this.$emit('open-conversation', notification);
+ const {
+ id,
+ primary_actor_id: primaryActorId,
+ primary_actor_type: primaryActorType,
+ primary_actor: { id: conversationId, inbox_id: inboxId },
+ notification_type: notificationType,
+ } = notification;
+
+ if (this.$route.params.conversation_id !== conversationId) {
+ this.$track(INBOX_EVENTS.OPEN_CONVERSATION_VIA_INBOX, {
+ notificationType,
+ });
+
+ this.$store.dispatch('notifications/read', {
+ id,
+ primaryActorId,
+ primaryActorType,
+ unreadCount: this.meta.unreadCount,
+ });
+
+ this.$router.push({
+ name: 'inbox_view_conversation',
+ params: { inboxId, conversation_id: conversationId },
+ });
+ }
},
closeContextMenu() {
this.isContextMenuOpen = false;
@@ -167,3 +200,19 @@ export default {
},
};
+
diff --git a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxItemHeader.vue b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxItemHeader.vue
index 0a7187cb5..73c3b10d3 100644
--- a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxItemHeader.vue
+++ b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxItemHeader.vue
@@ -1,3 +1,35 @@
+
+
+
+
+
+ {{ $t('INBOX.ACTION_HEADER.SNOOZE') }}
+
+
+ {{ $t('INBOX.ACTION_HEADER.DELETE') }}
+
+
+
+
-
-
-
-
-
-
- Snooze
-
-
- Delete notification
-
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/inbox/components/PaginationButton.vue b/app/javascript/dashboard/routes/dashboard/inbox/components/PaginationButton.vue
index d347ca3fa..46ff0c3bc 100644
--- a/app/javascript/dashboard/routes/dashboard/inbox/components/PaginationButton.vue
+++ b/app/javascript/dashboard/routes/dashboard/inbox/components/PaginationButton.vue
@@ -1,40 +1,3 @@
-
-
@@ -57,17 +20,51 @@ const handleDownClick = () => {
- {{ totalItems <= 1 ? '1' : currentPage }}
+ {{ totalLength <= 1 ? '1' : currentIndex }}
/
-
- {{ totalItems }}
+
+ {{ totalLength }}
+