debian-mirror-gitlab/app/assets/javascripts/integrations/edit/store/getters.js
2020-08-09 17:41:57 +05:30

6 lines
295 B
JavaScript

export const isInheriting = state => (state.adminState === null ? false : !state.override);
export const propsSource = (state, getters) =>
getters.isInheriting ? state.adminState : state.customState;
export const currentKey = (state, getters) => (getters.isInheriting ? 'admin' : 'custom');