feat: Create store to manage Portals (#5020)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> 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:
committed by
GitHub
parent
1594d49a70
commit
bfca4852c8
36
app/javascript/dashboard/store/modules/helpCenterPortals/index.js
Executable file
36
app/javascript/dashboard/store/modules/helpCenterPortals/index.js
Executable file
@@ -0,0 +1,36 @@
|
||||
import { getters } from './getters';
|
||||
import { actions } from './actions';
|
||||
import { mutations } from './mutations';
|
||||
|
||||
export const defaultPortalFlags = {
|
||||
isFetching: false,
|
||||
isUpdating: false,
|
||||
isDeleting: false,
|
||||
};
|
||||
|
||||
const state = {
|
||||
portals: {
|
||||
byId: {},
|
||||
allIds: [],
|
||||
uiFlags: {
|
||||
byId: {
|
||||
// 1: { isFetching: false, isUpdating: false, isDeleting: false },
|
||||
},
|
||||
},
|
||||
meta: {
|
||||
byId: {},
|
||||
},
|
||||
},
|
||||
uiFlags: {
|
||||
allFetched: false,
|
||||
isFetching: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations,
|
||||
};
|
||||
Reference in New Issue
Block a user