mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-27 07:51:08 -04:00
hide import and export options and the footer based on the storage type
This commit is contained in:
@ -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>
|
||||
|
||||
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user