feat: Split reconnect logic PR (store) (#9520)
# Pull Request Template ## Description This PR includes store filter parts split from this [Reconnect PR](https://github.com/chatwoot/chatwoot/pull/9453)
This commit is contained in:
@@ -9,6 +9,7 @@ export const state = {
|
||||
isCreating: false,
|
||||
isDeleting: false,
|
||||
},
|
||||
activeConversationFolder: null,
|
||||
};
|
||||
|
||||
export const getters = {
|
||||
@@ -21,6 +22,9 @@ export const getters = {
|
||||
getCustomViewsByFilterType: _state => filterType => {
|
||||
return _state.records.filter(record => record.filter_type === filterType);
|
||||
},
|
||||
getActiveConversationFolder(_state) {
|
||||
return _state.activeConversationFolder;
|
||||
},
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
@@ -71,6 +75,9 @@ export const actions = {
|
||||
commit(types.SET_CUSTOM_VIEW_UI_FLAG, { isDeleting: false });
|
||||
}
|
||||
},
|
||||
setActiveConversationFolder({ commit }, data) {
|
||||
commit(types.SET_ACTIVE_CONVERSATION_FOLDER, data);
|
||||
},
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
@@ -85,6 +92,10 @@ export const mutations = {
|
||||
[types.SET_CUSTOM_VIEW]: MutationHelpers.set,
|
||||
[types.UPDATE_CUSTOM_VIEW]: MutationHelpers.update,
|
||||
[types.DELETE_CUSTOM_VIEW]: MutationHelpers.destroy,
|
||||
|
||||
[types.SET_ACTIVE_CONVERSATION_FOLDER](_state, folder) {
|
||||
_state.activeConversationFolder = folder;
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user