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