Refactor: Inbox store, remove inboxes from sidebar (#387)
* Refactor: Inbox store, remove inboxes from sidebar * Add a new page for inbox settings * Show inboxes on sidebar * Add inbox_members API * Disable similar-code check * Fix codeclimate scss issues * Add widget_color update API and actions * Add specs for inbox store * Fix Facebook auth flow * Fix agent loading, inbox name
This commit is contained in:
24
app/javascript/dashboard/store/modules/inboxMembers.js
Normal file
24
app/javascript/dashboard/store/modules/inboxMembers.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import InboxMembersAPI from '../../api/inboxMembers';
|
||||
|
||||
const state = {};
|
||||
|
||||
const getters = {};
|
||||
|
||||
const actions = {
|
||||
get(_, { inboxId }) {
|
||||
return InboxMembersAPI.show(inboxId);
|
||||
},
|
||||
create(_, { inboxId, agentList }) {
|
||||
return InboxMembersAPI.create({ inboxId, agentList });
|
||||
},
|
||||
};
|
||||
|
||||
const mutations = {};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
};
|
||||
Reference in New Issue
Block a user