Commit 1664c740 authored by Kev's avatar Kev

Add canCreateIssue computed value

parent 8c5ff0fd
......@@ -59,6 +59,9 @@ export default {
isIssueAlreadyCreated() {
return Boolean(this.state.relatedIssues.find(i => i.lockIssueRemoval));
},
canCreateIssue() {
return !this.isIssueAlreadyCreated && !this.isFetching && Boolean(this.createIssueUrl);
},
},
inject: {
vulnerabilityId: {
......@@ -261,7 +264,7 @@ export default {
<template #headerText>
{{ $options.i18n.relatedIssues }}
</template>
<template v-if="!isIssueAlreadyCreated && !isFetching && createIssueUrl" #headerActions>
<template v-if="canCreateIssue" #headerActions>
<gl-button
ref="createIssue"
variant="success"
......
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