Commit 28dbd27e authored by Alexander Turinske's avatar Alexander Turinske

Clean up component

- create new computed property for button configurations
parent bf144ed7
...@@ -56,16 +56,20 @@ export default { ...@@ -56,16 +56,20 @@ export default {
}, },
computed: { computed: {
actionButtons() { actions() {
const buttons = []; return {
const issueButton = { issueCreation: {
name: s__('ciReport|Create issue'), name: s__('ciReport|Create issue'),
isLoading: this.isProcessing, isLoading: this.isProcessing,
action: 'createIssue', action: 'createIssue',
},
}; };
},
actionButtons() {
const buttons = [];
if (!this.hasIssue) { if (!this.hasIssue) {
buttons.push(issueButton); buttons.push(this.actions.issueCreation);
} }
return buttons; return buttons;
......
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