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

@@ -127,6 +127,10 @@ export default {
type: [Number, String],
required: true,
},
inboxId: {
type: Number,
default: undefined,
},
onToggle: {
type: Function,
default: () => {},
@@ -135,8 +139,9 @@ export default {
computed: {
...mapGetters({
currentChat: 'getSelectedChat',
agents: 'agents/getVerifiedAgents',
teams: 'teams/getTeams',
getAgents: 'inboxMembers/getMembersByInbox',
uiFlags: 'inboxMembers/getUIFlags',
}),
currentConversationMetaData() {
return this.$store.getters[
@@ -201,7 +206,7 @@ export default {
return this.$store.getters['contacts/getContact'](this.contactId);
},
agentsList() {
return [{ id: 0, name: 'None' }, ...this.agents];
return [{ id: 0, name: 'None' }, ...this.getAgents(this.inboxId)];
},
teamsList() {
return [{ id: 0, name: 'None' }, ...this.teams];