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: {
actions() {
return {
issueCreation: {
name: s__('ciReport|Create issue'),
isLoading: this.isProcessing,
action: 'createIssue',
},
};
},
actionButtons() { actionButtons() {
const buttons = []; const buttons = [];
const issueButton = {
name: s__('ciReport|Create issue'),
isLoading: this.isProcessing,
action: 'createIssue',
};
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