File: //home/arjun/projects/buyercall/buyercall/assets/vue/widgets/Workflows/store/index.js
// import {createApp} from 'vue';
// import Vuex from 'vuex';
// Vue.use(Vuex);
// import mutations from './mutations.js';
// import actions from './actions.js';
// import getters from './getters.js';
// const initialState = {
// pageTitle: 'Workflows',
// windowWidth: window.innerWidth,
// errorMessage: null,
// successMessage: null,
// breadCrumbs: {
// home: {
// label: 'Home',
// isLink: true,
// value: '',
// isVisible: true,
// sort: 1,
// },
// 'workflow-list': {
// label: 'Workflow List',
// isLink: false,
// value: '',
// isVisible: true,
// sort: 2,
// },
// 'workflow-edit': {
// label: 'Workflow Edit',
// isLink: false,
// value: '',
// isVisible: false,
// sort: 3,
// },
// },
// };
// const rootModule = {
// namespaced: true,
// state: initialState,
// getters,
// actions,
// mutations,
// };
// export default new Vuex.Store({
// modules: {
// root: rootModule,
// },
// });
import { createStore } from 'vuex';
import mutations from './mutations.js';
import actions from './actions.js';
import getters from './getters.js';
const initialState = {
pageTitle: 'Workflows',
windowWidth: window.innerWidth,
errorMessage: null,
successMessage: null,
breadCrumbs: {
home: {
label: 'Home',
isLink: true,
value: '',
isVisible: true,
sort: 1,
},
'workflow-list': {
label: 'Workflow List',
isLink: false,
value: '',
isVisible: true,
sort: 2,
},
'workflow-edit': {
label: 'Workflow Edit',
isLink: false,
value: '',
isVisible: false,
sort: 3,
},
},
};
const rootModule = {
namespaced: true,
state() {
return initialState;
},
getters,
actions,
mutations,
};
const store = createStore({
modules: {
root: rootModule,
},
});
export default store;