chore: Add inbox id in get campaigns API (#2278)

This commit is contained in:
Muhsin Keloth 2021-05-17 21:38:12 +05:30 committed by GitHub
parent 60177ef418
commit 18cea3b0ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 7 deletions

View file

@ -335,6 +335,10 @@ export default {
if (this.isAWebWidgetInbox) {
return [
...visibleToAllChannelTabs,
{
key: 'campaign',
name: this.$t('INBOX_MGMT.TABS.CAMPAIGN'),
},
{
key: 'preChatForm',
name: this.$t('INBOX_MGMT.TABS.PRE_CHAT_FORM'),
@ -397,7 +401,7 @@ export default {
},
toggleInput(selected, current) {
if (selected.includes(current)) {
const newSelectedFlags = selected.filter((flag) => flag !== current);
const newSelectedFlags = selected.filter(flag => flag !== current);
return newSelectedFlags;
}
return [...selected, current];
@ -438,7 +442,7 @@ export default {
}
},
async updateAgents() {
const agentList = this.selectedAgents.map((el) => el.id);
const agentList = this.selectedAgents.map(el => el.id);
this.isAgentListUpdating = true;
try {
await this.$store.dispatch('inboxMembers/create', {

View file

@ -62,7 +62,9 @@ export default {
},
},
mounted() {
this.$store.dispatch('campaigns/get');
this.$store.dispatch('campaigns/get', {
inboxId: this.$route.params.inboxId,
});
},
methods: {
openAddPopup() {