diff --git a/app/javascript/dashboard/i18n/locale/en/inbox.json b/app/javascript/dashboard/i18n/locale/en/inbox.json index c87f5163f..ce176d7cb 100644 --- a/app/javascript/dashboard/i18n/locale/en/inbox.json +++ b/app/javascript/dashboard/i18n/locale/en/inbox.json @@ -27,6 +27,21 @@ "MARK_ALL_READ": "Mark all as read", "DELETE_ALL": "Delete all", "DELETE_ALL_READ": "Delete all read" + }, + "DISPLAY_MENU": { + "SORT": "Sort", + "DISPLAY": "Display :", + "SORT_OPTIONS": { + "NEWEST": "Newest", + "OLDEST": "Oldest", + "PRIORITY": "Priority" + }, + "DISPLAY_OPTIONS": { + "SNOOZED": "Snoozed", + "READ": "Read", + "LABELS": "Labels", + "CONVERSATION_ID": "Conversation ID" + } } } } diff --git a/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue b/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue index 4867a28b1..5e6ee481b 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue @@ -166,6 +166,7 @@ export default { const targetNotification = this.notifications[activeIndex + indexOffset]; if (targetNotification) { const { + id, primary_actor_id: primaryActorId, primary_actor_type: primaryActorType, primary_actor: { id: conversationId, meta: { unreadCount } = {} }, @@ -177,6 +178,7 @@ export default { }); this.$store.dispatch('notifications/read', { + id, primaryActorId, primaryActorType, unreadCount, diff --git a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxDisplayMenu.vue b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxDisplayMenu.vue new file mode 100644 index 000000000..24316270c --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxDisplayMenu.vue @@ -0,0 +1,169 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxListHeader.vue b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxListHeader.vue index e674b693a..d58e89230 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxListHeader.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxListHeader.vue @@ -6,20 +6,27 @@

{{ $t('INBOX.LIST.TITLE') }}

-
- +
- {{ $t('INBOX.LIST.DISPLAY_DROPDOWN') }} - - + {{ $t('INBOX.LIST.DISPLAY_DROPDOWN') }} + + +
+
@@ -50,19 +57,22 @@