Skip to content

Commit

Permalink
Merge branch 'sendingtk:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wkarts authored Jun 24, 2024
2 parents 93e2eb0 + c47f0c6 commit 7e67799
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
31 changes: 8 additions & 23 deletions app/javascript/dashboard/components/ChatList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
]"
>
<slot />

<chat-list-header
:page-title="pageTitle"
:has-applied-filters="hasAppliedFilters"
Expand Down Expand Up @@ -298,17 +299,9 @@ export default {
)
);
},
// Adicionar la función hideUnassignedForAgents
hideUnassignedForAgents() {
return (
this.isFeatureEnabledonAccount(
this.accountId,
'hide_unassigned_for_agent'
) && this.currentRole !== 'administrator'
);
},
hideFiltersForAgents() {
hideUnassingnedForAgents() {
return (
this.currentRole !== 'administrator' &&
this.isFeatureEnabledonAccount(
this.accountId,
'hide_unassigned_for_agent'
Expand All @@ -330,13 +323,6 @@ export default {
hasAppliedFiltersOrActiveFolders() {
return this.hasAppliedFilters || this.hasActiveFolders;
},
savedFoldersValue() {
if (this.hasActiveFolders) {
const payload = this.activeFolder.query;
this.fetchSavedFilteredConversations(payload);
}
return {};
},
showEndOfListMessage() {
return (
this.conversationList.length &&
Expand All @@ -358,13 +344,13 @@ export default {
//unassigned: 'unAssignedCount',
//all: 'allCount',
};
// Mostrar la pestaña unassigned si se cumple la condición
if (!this.hideUnassignedForAgents) {
ASSIGNEE_TYPE_TAB_KEYS.unassigned = 'unAssignedCount';
}
if (!this.hideAllChatsForAgents) {
ASSIGNEE_TYPE_TAB_KEYS.all = 'allCount';
}
// Mostrar la pestaña unassigned si se cumple la condición
if (!this.hideUnassingnedForAgents) {
ASSIGNEE_TYPE_TAB_KEYS.unassigned = 'unAssignedCount';
}
return Object.keys(ASSIGNEE_TYPE_TAB_KEYS).map(key => {
const count = this.conversationStats[ASSIGNEE_TYPE_TAB_KEYS[key]] || 0;
return {
Expand Down Expand Up @@ -420,7 +406,6 @@ export default {
labels: this.label ? [this.label] : undefined,
teamId: this.teamId || undefined,
conversationType: this.conversationType || undefined,
folders: this.hasActiveFolders ? this.savedFoldersValue : undefined,
};
},
conversationListPagination() {
Expand Down Expand Up @@ -763,7 +748,7 @@ export default {
fetchConversations() {
this.$store.dispatch('updateChatListFilters', this.conversationFilters);
this.$store
.dispatch('fetchAllConversations', this.conversationFilters)
.dispatch('fetchAllConversations')
.then(this.emitConversationLoaded);
},
loadMoreConversations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'bg-slate-50 dark:bg-slate-600 dark:text-slate-50':
messageType === MESSAGE_TYPE.INCOMING,
'bg-woot-600 text-woot-50': messageType === MESSAGE_TYPE.OUTGOING,
'-mx-2': !parentHasAttachments,
'-mx-2': message.content,
}"
@click="scrollToMessage"
>
Expand Down

0 comments on commit 7e67799

Please sign in to comment.