Skip to content
Snippets Groups Projects
Commit fdb46c55 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu
Browse files

Extract complex condition to computed prop

parent 2ba71571
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -53,6 +53,9 @@ export default Vue.extend({
const { issuesSize } = this.list;
return `${n__('%d issue', '%d issues', issuesSize)}`;
},
isNewIssueShown() {
return this.list.type === 'backlog' || (!this.disabled && this.list.type !== 'closed');
}
},
watch: {
filter: {
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@
 
%button.issue-count-badge-add-button.btn.btn-sm.btn-default.ml-1.has-tooltip.js-no-trigger-collapse{ type: "button",
"@click" => "showNewIssueForm",
"v-if" => 'list.type == "backlog" || (!disabled && list.type !== "closed")',
"v-if" => "isNewIssueShown",
"aria-label" => _("New issue"),
"title" => _("New issue"),
data: { placement: "top", container: "body" } }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment