Chatwoot/app/javascript/widget/store/modules/conversation_new/index.js
Nithin David Thomas e4b7b9a63d
feat: Add actions for multiple conversation on widget #2851 (#3020)
* State structure

* How to refactr action modules

* feat: Add state and mutations for multiple conversation on widget

* Adds actions to support multiple conversation

* Fix linter errors
2021-09-23 11:03:36 +05:30

37 lines
670 B
JavaScript
Executable file

import { getters } from './getters';
import { actions } from './actions';
import { mutations } from './mutations';
const state = {
conversations: {
byId: {},
allIds: [],
uiFlags: {
byId: {
// 1: { allMessagesLoaded: false, isAgentTyping: false, isFetching: false },
},
},
},
messages: {
byId: {},
allIds: [],
uiFlags: {
byId: {
// 1: { isCreating: false, isPending: false, isDeleting: false },
},
},
},
uiFlags: {
allConversationsLoaded: false,
isFetching: false,
isCreating: true,
},
};
export default {
namespaced: true,
state,
getters,
actions,
mutations,
};