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:
parent
98f4a2f6f3
commit
03bd34be86
8 changed files with 168 additions and 8 deletions
|
@ -19,6 +19,7 @@
|
|||
<contact-panel
|
||||
v-if="showContactPanel"
|
||||
:conversation-id="currentChat.id"
|
||||
:inbox-id="currentChat.inbox_id"
|
||||
:on-toggle="onToggleContactPanel"
|
||||
/>
|
||||
</div>
|
||||
|
@ -59,6 +60,13 @@ export default {
|
|||
return this.isContactPanelOpen && this.currentChat.id;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'currentChat.inbox_id'(inboxId) {
|
||||
if (inboxId) {
|
||||
this.$store.dispatch('inboxMembers/fetch', { inboxId });
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onToggleContactPanel() {
|
||||
this.$emit('contact-panel-toggle');
|
||||
|
|
|
@ -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,
|
||||
];
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue