debian-mirror-gitlab/app/assets/javascripts/integrations/edit/store/getters.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
474 B
JavaScript
Raw Normal View History

2022-05-07 20:08:51 +05:30
import { integrationLevels } from '~/integrations/constants';
2021-03-08 18:12:59 +05:30
export const isInheriting = (state) => (state.defaultState === null ? false : !state.override);
2020-11-24 15:15:51 +05:30
2022-05-07 20:08:51 +05:30
export const isProjectLevel = (state) =>
state.customState.integrationLevel === integrationLevels.PROJECT;
2020-07-28 23:09:34 +05:30
export const propsSource = (state, getters) =>
2020-11-24 15:15:51 +05:30
getters.isInheriting ? state.defaultState : state.customState;
2020-07-28 23:09:34 +05:30
export const currentKey = (state, getters) => (getters.isInheriting ? 'admin' : 'custom');