diff --git a/app/javascript/dashboard/assets/scss/_utility-helpers.scss b/app/javascript/dashboard/assets/scss/_utility-helpers.scss
index 71977cf2b..4120af396 100644
--- a/app/javascript/dashboard/assets/scss/_utility-helpers.scss
+++ b/app/javascript/dashboard/assets/scss/_utility-helpers.scss
@@ -60,3 +60,9 @@
text-overflow: ellipsis;
white-space: nowrap;
}
+
+.flex-between {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+}
diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue
index 90eaa7b86..6f6b1961c 100644
--- a/app/javascript/dashboard/components/ChatList.vue
+++ b/app/javascript/dashboard/components/ChatList.vue
@@ -84,7 +84,18 @@
{{ $t('CHAT_LIST.LIST.404') }}
-
+
{{ $t('CHAT_LIST.EOF') }}
@@ -136,16 +143,6 @@
@applyFilter="onApplyFilter"
/>
-
-
@@ -164,7 +161,7 @@ import advancedFilterTypes from './widgets/conversation/advancedFilterItems';
import filterQueryGenerator from '../helper/filterQueryGenerator.js';
import AddCustomViews from 'dashboard/routes/dashboard/customviews/AddCustomViews';
import DeleteCustomViews from 'dashboard/routes/dashboard/customviews/DeleteCustomViews.vue';
-import ConversationBulkActions from './widgets/conversation/conversationBulkActions/Actions.vue';
+import ConversationBulkActions from './widgets/conversation/conversationBulkActions/Index.vue';
import alertMixin from 'shared/mixins/alertMixin';
import {
@@ -252,6 +249,13 @@ export default {
}
return {};
},
+ showEndOfListMessage() {
+ return (
+ this.conversationList.length &&
+ this.hasCurrentPageEndReached &&
+ !this.chatListLoading
+ );
+ },
assigneeTabItems() {
const ASSIGNEE_TYPE_TAB_KEYS = {
me: 'mineCount',
@@ -363,8 +367,10 @@ export default {
},
allConversationsSelected() {
return (
- JSON.stringify(this.selectedConversations) ===
- JSON.stringify(this.conversationList.map(item => item.id))
+ this.conversationList.length === this.selectedConversations.length &&
+ this.conversationList.every(el =>
+ this.selectedConversations.includes(el.id)
+ )
);
},
uniqueInboxes() {
@@ -592,21 +598,27 @@ export default {
this.showAlert(this.$t('BULK_ACTION.ASSIGN_FAILED'));
}
},
- async onResolveConversations() {
+ async onUpdateConversations(status) {
try {
await this.$store.dispatch('bulkActions/process', {
type: 'Conversation',
ids: this.selectedConversations,
fields: {
- status: 'resolved',
+ status,
},
});
this.selectedConversations = [];
- this.showAlert(this.$t('BULK_ACTION.RESOLVE_SUCCESFUL'));
- } catch (error) {
- this.showAlert(this.$t('BULK_ACTION.RESOLVE_FAILED'));
+ this.showAlert(this.$t('BULK_ACTION.UPDATE.UPDATE_SUCCESFUL'));
+ } catch (err) {
+ this.showAlert(this.$t('BULK_ACTION.UPDATE.UPDATE_FAILED'));
}
},
+ allSelectedConversationsStatus(status) {
+ if (!this.selectedConversations.length) return false;
+ return this.selectedConversations.every(item => {
+ return this.$store.getters.getConversationById(item).status === status;
+ });
+ },
},
};
diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue
index ee12b989a..7b90ef6eb 100644
--- a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue
@@ -11,14 +11,13 @@
@mouseleave="onCardLeave"
@click="cardClick(chat)"
>
-