Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

800 B
Raw Blame
import { getters } from './getters';
import { actions } from './actions';
import { mutations } from './mutations';

export const defaultPortalFlags = {
  isFetching: false,
  isUpdating: false,
  isDeleting: false,
  isFetchingSSLStatus: false,
};

const state = {
  meta: {
    allArticlesCount: 0,
    mineArticlesCount: 0,
    draftArticlesCount: 0,
    archivedArticlesCount: 0,
  },

  portals: {
    byId: {},
    allIds: [],
    uiFlags: {
      byId: {
        // 1: { isFetching: false, isUpdating: false, isDeleting: false },
      },
    },
    meta: {
      byId: {},
    },
  },
  uiFlags: {
    allFetched: false,
    isFetching: false,
    isSwitching: false,
    isFetchingSSLStatus: false,
  },
};

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations,
};