hide import and export options and the footer based on the storage type

This commit is contained in:
Marek Fraczyk
2021-08-27 11:55:43 +03:00
parent 643ab1e36a
commit d1556aec5b
2 changed files with 14 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<transition name="fade" mode="out-in">
<router-view/>
</transition>
<TheFooter/>
<TheFooter v-if="!isStorageWordpress"/>
</div>
</div>
</div>
@ -27,6 +27,7 @@ import TeamModal from '@/components/team/TeamModal';
import TheFooter from '@/components/TheFooter';
import CustomizationsModal from '@/components/invoices/CustomizationsModal';
import ImportModal from '../../components/ImportModal';
import config from '@/config/app.config';
export default {
directives: {
@ -44,6 +45,9 @@ export default {
...mapGetters({
team: 'teams/team',
}),
isStorageWordpress() {
return config.storageType === 'wordpress';
},
},
};
</script>

View File

@ -4,8 +4,11 @@
<div class="col-12 mb-4 pr-0 d-flex justify-content-between">
<h4 class="mb-0">{{ $t('title') }}</h4>
<div>
<button class="btn btn-sm btn-outline-dark" @click="createNewInvoice">{{ $t('new_invoice') }}</button>
<b-dropdown variant="link" size="sm" no-caret right>
<button class="btn btn-sm btn-outline-dark"
:class="{ 'mr-3': !isStorageLocal }"
@click="createNewInvoice">{{ $t('new_invoice') }}
</button>
<b-dropdown variant="link" size="sm" no-caret right v-if="isStorageLocal">
<template slot="button-content">
<i class="material-icons">more_vert</i>
</template>
@ -27,6 +30,7 @@
import { BDropdown, BDropdownItem } from 'bootstrap-vue';
import { mapGetters } from 'vuex';
import InvoicesList from '@/components/invoices/InvoicesList';
import config from '@/config/app.config';
export default {
name: 'invoices',
@ -40,6 +44,9 @@ export default {
...mapGetters({
team: 'teams/team',
}),
isStorageLocal() {
return config.storageType === 'local';
},
},
methods: {
createNewInvoice() {