Fix: Populate only agents part of the inbox in conversations (#2060)

* Fix: Show only agents part of the inbox in conversations

* Show only verified agents

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Nithin David Thomas
2021-04-09 14:32:29 +05:30
committed by GitHub
parent 98f4a2f6f3
commit 03bd34be86
8 changed files with 168 additions and 8 deletions

View File

@@ -34,6 +34,7 @@
<i class="icon ion-headphone" />
<multiselect
v-model="currentChat.meta.assignee"
:loading="uiFlags.isFetching"
:allow-empty="true"
:deselect-label="$t('CONVERSATION.ASSIGNMENT.REMOVE')"
:options="agentList"
@@ -82,7 +83,8 @@ export default {
computed: {
...mapGetters({
agents: 'agents/getVerifiedAgents',
getAgents: 'inboxMembers/getMembersByInbox',
uiFlags: 'inboxMembers/getUIFlags',
currentChat: 'getSelectedChat',
}),
@@ -97,6 +99,8 @@ export default {
},
agentList() {
const { inbox_id: inboxId } = this.chat;
const agents = this.getAgents(inboxId) || [];
return [
{
confirmed: true,
@@ -106,7 +110,7 @@ export default {
account_id: 0,
email: 'None',
},
...this.agents,
...agents,
];
},
},