Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/integrations/edit/store/getters.js')
-rw-r--r--app/assets/javascripts/integrations/edit/store/getters.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/integrations/edit/store/getters.js b/app/assets/javascripts/integrations/edit/store/getters.js
index b79132128cc..b0adc444395 100644
--- a/app/assets/javascripts/integrations/edit/store/getters.js
+++ b/app/assets/javascripts/integrations/edit/store/getters.js
@@ -1,5 +1,10 @@
+import { integrationLevels } from '~/integrations/constants';
+
export const isInheriting = (state) => (state.defaultState === null ? false : !state.override);
+export const isProjectLevel = (state) =>
+ state.customState.integrationLevel === integrationLevels.PROJECT;
+
export const propsSource = (state, getters) =>
getters.isInheriting ? state.defaultState : state.customState;