feat: Add store to manage Articles (#5048)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
30
app/javascript/dashboard/store/modules/helpCenterArticles/index.js
Executable file
30
app/javascript/dashboard/store/modules/helpCenterArticles/index.js
Executable file
@@ -0,0 +1,30 @@
|
||||
import { getters } from './getters';
|
||||
import { actions } from './actions';
|
||||
import { mutations } from './mutations';
|
||||
|
||||
export const defaultHelpCenterFlags = {
|
||||
isFetching: false,
|
||||
isUpdating: false,
|
||||
isDeleting: false,
|
||||
};
|
||||
const state = {
|
||||
articles: {
|
||||
byId: {},
|
||||
allIds: [],
|
||||
uiFlags: {
|
||||
byId: {},
|
||||
},
|
||||
},
|
||||
uiFlags: {
|
||||
allFetched: false,
|
||||
isFetching: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
};
|
||||
Reference in New Issue
Block a user