Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
03092f3d
Commit
03092f3d
authored
Feb 25, 2020
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address minor review comments
parent
bc8266dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
ee/app/assets/javascripts/analytics/cycle_analytics/components/custom_stage_form.vue
...nalytics/cycle_analytics/components/custom_stage_form.vue
+11
-6
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/custom_stage_form.vue
View file @
03092f3d
...
...
@@ -38,7 +38,7 @@ export const initializeFormData = ({ emptyFieldState, initialFields, errors }) =
:
{
...
emptyFieldState
,
endEventIdentifier
:
initialFields
&&
!
initialFields
?
.
startEventIdentifier
initialFields
&&
!
initialFields
.
startEventIdentifier
?
[
s__
(
'
CustomCycleAnalytics|Please select a start event first
'
)]
:
null
,
};
...
...
@@ -97,10 +97,15 @@ export default {
},
data
()
{
const
{
initialFields
=
{},
errors
=
null
}
=
this
;
const
formData
=
initializeFormData
({
emptyFieldState
:
defaultFields
,
initialFields
,
errors
});
const
{
fields
,
fieldErrors
}
=
initializeFormData
({
emptyFieldState
:
defaultFields
,
initialFields
,
errors
,
});
return
{
labelEvents
:
getLabelEventsIdentifiers
(
this
.
events
),
...
formData
,
fields
,
fieldErrors
,
};
},
computed
:
{
...
...
@@ -130,7 +135,7 @@ export default {
hasErrors
()
{
return
(
this
.
eventMismatchError
||
Object
.
values
(
this
.
fieldErrors
).
some
(
errArray
=>
errArray
&&
errArray
.
length
)
Object
.
values
(
this
.
fieldErrors
).
some
(
errArray
=>
errArray
?
.
length
)
);
},
isComplete
()
{
...
...
@@ -281,7 +286,6 @@ export default {
:label=
"s__('CustomCycleAnalytics|Name')"
:state=
"!hasFieldErrors('name')"
:invalid-feedback=
"fieldErrorMessage('name')"
@
change.native=
"onUpdateNameField"
>
<gl-form-input
v-model=
"fields.name"
...
...
@@ -290,6 +294,7 @@ export default {
name=
"custom-stage-name"
:placeholder=
"s__('CustomCycleAnalytics|Enter a name for the stage')"
required
@
change.native=
"onUpdateNameField"
/>
</gl-form-group>
<div
class=
"d-flex"
:class=
"{ 'justify-content-between': startEventRequiresLabel }"
>
...
...
@@ -333,7 +338,6 @@ export default {
:label=
"s__('CustomCycleAnalytics|Stop event')"
:state=
"!hasFieldErrors('endEventIdentifier')"
:invalid-feedback=
"fieldErrorMessage('endEventIdentifier')"
@
change.native=
"onUpdateEndEventField"
>
<gl-form-select
v-model=
"fields.endEventIdentifier"
...
...
@@ -341,6 +345,7 @@ export default {
:options=
"endEventOptions"
:required=
"true"
:disabled=
"!hasStartEvent"
@
change.native=
"onUpdateEndEventField"
/>
</gl-form-group>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment