Commit 2c39da05 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo Committed by Clement Ho

Async import custom stage form components

Imports the files needed for the custom
stage form and adds the EE specific css.

Added stub addStageMixin
parent b13e18da
export default {
data() {
return {
isCustomStageForm: false,
};
},
methods: {
showAddStageForm: () => {},
hideAddStageForm: () => {},
},
};
...@@ -23,7 +23,10 @@ export default { ...@@ -23,7 +23,10 @@ export default {
</script> </script>
<template> <template>
<div :class="{ active: isActive }" class="stage-nav-item d-flex pl-4 pr-4 m-0 mb-1 ml-2 rounded"> <div
:class="{ active: isActive }"
class="stage-nav-item d-flex pl-4 pr-4 m-0 mb-1 ml-2 rounded border-color-default border-style-solid border-width-1px"
>
<slot></slot> <slot></slot>
<div v-if="canEdit" class="dropdown"> <div v-if="canEdit" class="dropdown">
<gl-button <gl-button
......
...@@ -3,6 +3,7 @@ import Vue from 'vue'; ...@@ -3,6 +3,7 @@ import Vue from 'vue';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { GlEmptyState } from '@gitlab/ui'; import { GlEmptyState } from '@gitlab/ui';
import filterMixins from 'ee_else_ce/analytics/cycle_analytics/mixins/filter_mixins'; import filterMixins from 'ee_else_ce/analytics/cycle_analytics/mixins/filter_mixins';
import addStageMixin from 'ee_else_ce/analytics/cycle_analytics/mixins/add_stage_mixin';
import Flash from '../flash'; import Flash from '../flash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Translate from '../vue_shared/translate'; import Translate from '../vue_shared/translate';
...@@ -43,8 +44,12 @@ export default () => { ...@@ -43,8 +44,12 @@ export default () => {
DateRangeDropdown: () => DateRangeDropdown: () =>
import('ee_component/analytics/shared/components/date_range_dropdown.vue'), import('ee_component/analytics/shared/components/date_range_dropdown.vue'),
'stage-nav-item': stageNavItem, 'stage-nav-item': stageNavItem,
CustomStageForm: () =>
import('ee_component/analytics/cycle_analytics/components/custom_stage_form.vue'),
AddStageButton: () =>
import('ee_component/analytics/cycle_analytics/components/add_stage_button.vue'),
}, },
mixins: [filterMixins], mixins: [filterMixins, addStageMixin],
data() { data() {
return { return {
store: CycleAnalyticsStore, store: CycleAnalyticsStore,
...@@ -124,6 +129,7 @@ export default () => { ...@@ -124,6 +129,7 @@ export default () => {
return; return;
} }
this.hideAddStageForm();
this.isLoadingStage = true; this.isLoadingStage = true;
this.store.setStageEvents([], stage); this.store.setStageEvents([], stage);
this.store.setActiveStage(stage); this.store.setActiveStage(stage);
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
width: 20%; width: 20%;
} }
.fa { .fa {
color: $cycle-analytics-light-gray; color: $cycle-analytics-light-gray;
...@@ -146,7 +145,6 @@ ...@@ -146,7 +145,6 @@
.stage-nav-item { .stage-nav-item {
line-height: 65px; line-height: 65px;
border: 1px solid $border-color;
&.active { &.active {
background: $blue-50; background: $blue-50;
......
...@@ -15,3 +15,9 @@ ...@@ -15,3 +15,9 @@
font-size: $size; font-size: $size;
} }
} }
.border-width-1px { border-width: 1px; }
.border-style-dashed { border-style: dashed; }
.border-style-solid { border-style: solid; }
.border-color-blue-300 { border-color: $blue-300; }
.border-color-default { border-color: $border-color; }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment