diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue index 8ba65dadc..dad5c9c0b 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue @@ -6,6 +6,7 @@ @@ -80,6 +82,10 @@ export default { default: '', required: false, }, + isInboxView: { + type: Boolean, + default: false, + }, isContactPanelOpen: { type: Boolean, default: true, diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue index 742b6003a..deeb98cb0 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue @@ -87,6 +87,7 @@ import Thumbnail from '../Thumbnail.vue'; import wootConstants from 'dashboard/constants/globals'; import { conversationListPageURL } from 'dashboard/helper/URLHelper'; import { conversationReopenTime } from 'dashboard/helper/snoozeHelpers'; +import { frontendURL } from 'dashboard/helper/URLHelper'; export default { components: { @@ -109,6 +110,10 @@ export default { type: Boolean, default: false, }, + isInboxView: { + type: Boolean, + default: false, + }, }, computed: { ...mapGetters({ @@ -123,6 +128,9 @@ export default { params: { accountId, inbox_id: inboxId, label, teamId }, name, } = this.$route; + if (this.isInboxView) { + return frontendURL(`accounts/${accountId}/inbox`); + } return conversationListPageURL({ accountId, inboxId, diff --git a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue index 7ff536942..747551e18 100644 --- a/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue +++ b/app/javascript/dashboard/components/widgets/conversation/MessagesView.vue @@ -12,7 +12,10 @@ variant="smooth" size="tiny" color-scheme="secondary" - class="rounded-bl-calc rtl:rotate-180 rounded-tl-calc fixed top-[9.5rem] md:top-[6.25rem] z-10 bg-white dark:bg-slate-700 border-slate-50 dark:border-slate-600 border-solid border border-r-0 box-border" + class="rounded-bl-calc rtl:rotate-180 rounded-tl-calc fixed z-10 bg-white dark:bg-slate-700 border-slate-50 dark:border-slate-600 border-solid border border-r-0 box-border" + :class=" + isInboxView ? 'top-52 md:top-40' : 'top-[9.5rem] md:top-[6.25rem]' + " :icon="isRightOrLeftIcon" @click="onToggleContactPanel" /> @@ -142,6 +145,10 @@ export default { type: Boolean, default: false, }, + isInboxView: { + type: Boolean, + default: false, + }, }, data() { diff --git a/app/javascript/dashboard/i18n/locale/en/inbox.json b/app/javascript/dashboard/i18n/locale/en/inbox.json index 5e9c6419a..c87f5163f 100644 --- a/app/javascript/dashboard/i18n/locale/en/inbox.json +++ b/app/javascript/dashboard/i18n/locale/en/inbox.json @@ -5,7 +5,12 @@ "DISPLAY_DROPDOWN": "Display", "LOADING": "Fetching notifications", "EOF": "All notifications loaded 🎉", - "404": "There are no active notifications in this group." + "404": "There are no active notifications in this group.", + "NOTE": "Notifications from all subscribed inboxes" + }, + "ACTION_HEADER": { + "SNOOZE": "Snooze notification", + "DELETE": "Delete notification" }, "TYPES": { "CONVERSATION_MENTION": "You have been mentioned in a conversation", diff --git a/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js b/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js index e741d93b1..643f69fab 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js +++ b/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js @@ -10,7 +10,18 @@ export default { name: 'inbox', roles: ['administrator', 'agent'], component: InboxView, - props: () => {}, + props: () => { + return { inboxId: 0 }; + }, + }, + { + path: frontendURL('accounts/:accountId/inbox/:conversation_id'), + name: 'inbox_view_conversation', + roles: ['administrator', 'agent'], + component: InboxView, + props: route => { + return { inboxId: 0, conversationId: route.params.conversation_id }; + }, }, { path: frontendURL('accounts/:accountId/dashboard'), diff --git a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue index b721ff395..56618bec3 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue @@ -1,8 +1,44 @@ + + - diff --git a/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue b/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue index 549860cee..4867a28b1 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/InboxView.vue @@ -1,9 +1,55 @@ + + - diff --git a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxCard.vue b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxCard.vue index c185c010d..336ead4ce 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/components/InboxCard.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/components/InboxCard.vue @@ -1,7 +1,12 @@