summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/integrations/edit/store/getters.js
blob: 310d970c73ebaf1dcc5f47eae392ca2c52ba5c64 (plain)
1
2
3
4
5
6
7
8
export const isInheriting = state => (state.defaultState === null ? false : !state.override);

export const isDisabled = state => state.isSaving || state.isTesting || state.isResetting;

export const propsSource = (state, getters) =>
  getters.isInheriting ? state.defaultState : state.customState;

export const currentKey = (state, getters) => (getters.isInheriting ? 'admin' : 'custom');