HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
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;