diff --git a/app/javascript/dashboard/routes/dashboard/commands/commandBarBusEvents.js b/app/javascript/dashboard/routes/dashboard/commands/commandBarBusEvents.js
index 86e417ad7..7d4f8c9bc 100644
--- a/app/javascript/dashboard/routes/dashboard/commands/commandBarBusEvents.js
+++ b/app/javascript/dashboard/routes/dashboard/commands/commandBarBusEvents.js
@@ -18,3 +18,4 @@ export const CMD_AI_ASSIST = 'CMD_AI_ASSIST';
// Inbox Commands (Notifications)
export const CMD_SNOOZE_NOTIFICATION = 'CMD_SNOOZE_NOTIFICATION';
+export const CMD_TOGGLE_SNOOZE_NOTIFICATION = 'CMD_TOGGLE_SNOOZE_NOTIFICATION';
diff --git a/app/javascript/dashboard/routes/dashboard/commands/commandbar.vue b/app/javascript/dashboard/routes/dashboard/commands/commandbar.vue
index 45b807fb3..658517e66 100644
--- a/app/javascript/dashboard/routes/dashboard/commands/commandbar.vue
+++ b/app/javascript/dashboard/routes/dashboard/commands/commandbar.vue
@@ -6,11 +6,12 @@
hideBreadcrumbs
:placeholder="placeholder"
@selected="onSelected"
+ @closed="onClosed"
/>
diff --git a/app/javascript/dashboard/routes/dashboard/commands/inboxHotKeys.js b/app/javascript/dashboard/routes/dashboard/commands/inboxHotKeys.js
index e8f92a9f6..af513a6be 100644
--- a/app/javascript/dashboard/routes/dashboard/commands/inboxHotKeys.js
+++ b/app/javascript/dashboard/routes/dashboard/commands/inboxHotKeys.js
@@ -1,6 +1,9 @@
import wootConstants from 'dashboard/constants/globals';
-import { CMD_SNOOZE_NOTIFICATION } from './commandBarBusEvents';
+import {
+ CMD_SNOOZE_NOTIFICATION,
+ CMD_TOGGLE_SNOOZE_NOTIFICATION,
+} from './commandBarBusEvents';
import { ICON_SNOOZE_NOTIFICATION } from './CommandBarIcons';
import { isAInboxViewRoute } from 'dashboard/helper/routeHelpers';
@@ -61,14 +64,28 @@ const INBOX_SNOOZE_EVENTS = [
},
];
export default {
+ data() {
+ return {
+ showSnoozeNotificationItems: false,
+ };
+ },
computed: {
inboxHotKeys() {
- if (isAInboxViewRoute(this.$route.name)) {
+ if (
+ isAInboxViewRoute(this.$route.name) ||
+ this.showSnoozeNotificationItems
+ ) {
return this.prepareActions(INBOX_SNOOZE_EVENTS);
}
return [];
},
},
+ mounted() {
+ bus.$on(CMD_TOGGLE_SNOOZE_NOTIFICATION, this.toggleSnoozeOptions);
+ },
+ destroyed() {
+ bus.$off(CMD_TOGGLE_SNOOZE_NOTIFICATION, this.toggleSnoozeOptions);
+ },
methods: {
prepareActions(actions) {
return actions.map(action => ({
@@ -77,5 +94,9 @@ export default {
section: this.$t(action.section),
}));
},
+ toggleSnoozeOptions() {
+ // Used to show/hide snooze notification items in cmd bar dynamically
+ this.showSnoozeNotificationItems = true;
+ },
},
};
diff --git a/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js b/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js
index 63a32d72b..2411acdbf 100644
--- a/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js
+++ b/app/javascript/dashboard/routes/dashboard/conversation/conversation.routes.js
@@ -15,12 +15,12 @@ export default {
},
},
{
- path: frontendURL('accounts/:accountId/inbox-view/:conversation_id'),
+ path: frontendURL('accounts/:accountId/inbox-view/:notification_id'),
name: 'inbox_view_conversation',
roles: ['administrator', 'agent'],
component: InboxView,
props: route => {
- return { inboxId: 0, conversationId: route.params.conversation_id };
+ return { inboxId: 0, notificationId: route.params.notification_id };
},
},
{
diff --git a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue
index bb0f2e7df..5aa9045ab 100644
--- a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue
+++ b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue
@@ -3,7 +3,11 @@
class="flex flex-col h-full w-full ltr:border-r border-slate-50 dark:border-slate-800/50"
:class="isOnExpandedLayout ? '' : 'min-w-[360px] max-w-[360px]'"
>
-