Commit ed481568 authored by Johannes Winter's avatar Johannes Winter

Only show joining functionality if more than one abstract cost exists

parent a6a53076
......@@ -126,7 +126,7 @@
<!-- Only show if a expense category is selected -->
<div v-if="selected.classification">
<div v-if="absIntents.length">
<button class="button" v-if="!$store.state.ro" @click="isJoinModalActive = true"
<button class="button" v-if="joiningEnabled" @click="isJoinModalActive = true"
style="display: flex;" :title="$t('merge-selected')">
{{$t('join-exp')}}
</button>
......@@ -136,8 +136,7 @@
<!-- ABSTRACT INTENTS -->
<b-tooltip :label="$t('sub-cost-contribs')">
<!-- TODO: make text -->
<b-table :data="absIntents" :checkable="!$store.state.ro" :checked-rows.sync="intentsToJoin"
<b-table :data="absIntents" :checkable="joiningEnabled" :checked-rows.sync="intentsToJoin"
focusable>
<template slot-scope="props">
<b-table-column sortable field="label" :label="$t('abstract-expenses')" style="text-align:left;">
......@@ -489,6 +488,9 @@ export default {
}
},
computed: {
joiningEnabled() {
return !this.$store.state.ro && (this.absIntents.length > 1)
},
loadedData() {
if (((this.$store.state.webId && this.loggedIn) || this.url || this.exampleBudgets.length) && this.focus.ID) return true
else return false
......
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