diff --git a/VERSION_CW b/VERSION_CW index 53cf85e17..813b83b65 100644 --- a/VERSION_CW +++ b/VERSION_CW @@ -1 +1 @@ -4.12.1 +4.13.0 diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue b/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue index b38f44018..7f7b8392d 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue @@ -103,6 +103,7 @@ const showPagination = computed(() => { diff --git a/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue b/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue index 5e96df3c6..779165caa 100644 --- a/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue +++ b/app/javascript/dashboard/components-next/Conversation/SidepanelSwitch.vue @@ -57,7 +57,7 @@ useKeyboardEvents(keyboardEvents); diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue index d08147739..9fd25c481 100644 --- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue +++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue @@ -250,6 +250,12 @@ const menuItems = computed(() => { activeOn: ['conversation_through_mentions'], to: accountScopedRoute('conversation_mentions'), }, + { + name: 'Participating', + label: t('SIDEBAR.PARTICIPATING_CONVERSATIONS'), + activeOn: ['conversation_through_participating'], + to: accountScopedRoute('conversation_participating'), + }, { name: 'Unattended', activeOn: ['conversation_through_unattended'], diff --git a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue index 812da812a..048a99cf8 100644 --- a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue +++ b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue @@ -158,9 +158,11 @@ const activeChild = computed(() => { return rankedPage ?? activeOnPages[0]; } - return navigableChildren.value.find( - child => child.to && route.path.startsWith(resolvePath(child.to)) - ); + return navigableChildren.value.find(child => { + if (!child.to) return false; + const childPath = resolvePath(child.to); + return route.path === childPath || route.path.startsWith(`${childPath}/`); + }); }); const hasActiveChild = computed(() => { diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index eeb2ad6e7..f311de4b2 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -56,6 +56,7 @@ import { generateValuesForEditCustomViews } from 'dashboard/helper/customViewsHe import { conversationListPageURL } from '../helper/URLHelper'; import { isOnMentionsView, + isOnParticipatingView, isOnUnattendedView, } from '../store/modules/conversations/helpers/actionHelpers'; import { @@ -113,6 +114,7 @@ const chatLists = useMapGetter('getFilteredConversations'); const mineChatsList = useMapGetter('getMineChats'); const allChatList = useMapGetter('getAllStatusChats'); const unAssignedChatsList = useMapGetter('getUnAssignedChats'); +const participatingChatsList = useMapGetter('getParticipatingChats'); const chatListLoading = useMapGetter('getChatListLoadingStatus'); const activeInbox = useMapGetter('getSelectedInbox'); const conversationStats = useMapGetter('conversationStats/getStats'); @@ -296,13 +298,15 @@ const pageTitle = computed(() => { if (props.label) { return `#${props.label}`; } - if (props.conversationType === 'mention') { + if (props.conversationType === wootConstants.CONVERSATION_TYPE.MENTION) { return t('CHAT_LIST.MENTION_HEADING'); } - if (props.conversationType === 'participating') { + if ( + props.conversationType === wootConstants.CONVERSATION_TYPE.PARTICIPATING + ) { return t('CONVERSATION_PARTICIPANTS.SIDEBAR_MENU_TITLE'); } - if (props.conversationType === 'unattended') { + if (props.conversationType === wootConstants.CONVERSATION_TYPE.UNATTENDED) { return t('CHAT_LIST.UNATTENDED_HEADING'); } if (hasActiveFolders.value) { @@ -311,12 +315,30 @@ const pageTitle = computed(() => { return t('CHAT_LIST.TAB_HEADING'); }); +function filterByAssigneeTab(conversations) { + if (activeAssigneeTab.value === wootConstants.ASSIGNEE_TYPE.ME) { + return conversations.filter( + c => c.meta?.assignee?.id === currentUser.value?.id + ); + } + if (activeAssigneeTab.value === wootConstants.ASSIGNEE_TYPE.UNASSIGNED) { + return conversations.filter(c => !c.meta?.assignee); + } + return [...conversations]; +} + const conversationList = computed(() => { let localConversationList = []; if (!hasAppliedFiltersOrActiveFolders.value) { const filters = conversationFilters.value; - if (activeAssigneeTab.value === 'me') { + if ( + props.conversationType === wootConstants.CONVERSATION_TYPE.PARTICIPATING + ) { + localConversationList = filterByAssigneeTab( + participatingChatsList.value(filters) + ); + } else if (activeAssigneeTab.value === 'me') { localConversationList = [...mineChatsList.value(filters)]; } else if (activeAssigneeTab.value === 'unassigned') { localConversationList = [...unAssignedChatsList.value(filters)]; @@ -637,9 +659,11 @@ function redirectToConversationList() { let conversationType = ''; if (isOnMentionsView({ route: { name } })) { - conversationType = 'mention'; + conversationType = wootConstants.CONVERSATION_TYPE.MENTION; + } else if (isOnParticipatingView({ route: { name } })) { + conversationType = wootConstants.CONVERSATION_TYPE.PARTICIPATING; } else if (isOnUnattendedView({ route: { name } })) { - conversationType = 'unattended'; + conversationType = wootConstants.CONVERSATION_TYPE.UNATTENDED; } router.push( conversationListPageURL({ diff --git a/app/javascript/dashboard/components/widgets/WootWriter/CopilotEditor.vue b/app/javascript/dashboard/components/widgets/WootWriter/CopilotEditor.vue index cb4c93932..964645fbb 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/CopilotEditor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/CopilotEditor.vue @@ -27,10 +27,6 @@ const props = defineProps({ type: Boolean, default: true, }, - isPopout: { - type: Boolean, - default: false, - }, }); const emit = defineEmits([ @@ -208,10 +204,7 @@ onMounted(() => {