feat: Add Bulk actions to conversations (#4647)

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Fayaz Ahmed 2022-06-03 11:12:22 +05:30 committed by GitHub
parent 43a0b4c039
commit 79a525aa62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 693 additions and 12 deletions

View file

@ -26,13 +26,16 @@ export const getters = {
};
export const actions = {
async fetch({ commit }, { inboxId }) {
async fetch({ commit }, inboxIds) {
commit(types.SET_INBOX_ASSIGNABLE_AGENTS_UI_FLAG, { isFetching: true });
try {
const {
data: { payload },
} = await AssignableAgentsAPI.get([inboxId]);
commit(types.SET_INBOX_ASSIGNABLE_AGENTS, { inboxId, members: payload });
} = await AssignableAgentsAPI.get(inboxIds);
commit(types.SET_INBOX_ASSIGNABLE_AGENTS, {
inboxId: inboxIds.join(','),
members: payload,
});
} catch (error) {
throw new Error(error);
} finally {