Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
HenriT
2021-02-16 18:34:12 +02:00
3 changed files with 7 additions and 5 deletions

View File

@ -23,7 +23,7 @@
<template slot="button-content"> <template slot="button-content">
<i class="material-icons">more_vert</i> <i class="material-icons">more_vert</i>
</template> </template>
<b-dropdown-item :href="invoice.pdf_url" target="_blank">Download PDF</b-dropdown-item> <b-dropdown-item-button @click="print">Download PDF</b-dropdown-item-button>
<b-dropdown-item-button @click="deleteInvoice">Delete</b-dropdown-item-button> <b-dropdown-item-button @click="deleteInvoice">Delete</b-dropdown-item-button>
</b-dropdown> </b-dropdown>
</div> </div>
@ -34,13 +34,12 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NotificationService from '@/services/notification.service'; import NotificationService from '@/services/notification.service';
import { BDropdown, BDropdownItem, BDropdownItemButton } from 'bootstrap-vue'; import { BDropdown, BDropdownItemButton } from 'bootstrap-vue';
import AppSelect from '@/components/form/AppSelect'; import AppSelect from '@/components/form/AppSelect';
export default { export default {
components: { components: {
BDropdown, BDropdown,
BDropdownItem,
BDropdownItemButton, BDropdownItemButton,
AppSelect, AppSelect,
}, },
@ -72,6 +71,9 @@ export default {
updateProp(props) { updateProp(props) {
this.$store.dispatch('invoices/updateInvoice', props); this.$store.dispatch('invoices/updateInvoice', props);
}, },
print() {
window.print();
},
}, },
}; };
</script> </script>

View File

@ -6,7 +6,7 @@
<transition name="fade" mode="out-in"> <transition name="fade" mode="out-in">
<router-view/> <router-view/>
</transition> </transition>
<footer class="col-12 d-flex justify-content-between align-items-center text-secondary px-0"> <footer class="col-12 d-flex justify-content-between align-items-center text-secondary px-0 mt-3 d-print-none">
<button class="btn btn-sm text-secondary" @click="toggleTheme"> <button class="btn btn-sm text-secondary" @click="toggleTheme">
Lights {{ theme === 'dark' ? 'on' : 'off' }} Lights {{ theme === 'dark' ? 'on' : 'off' }}
<i class="material-icons material-icons-round md-14 align-text-bottom ml-1"> <i class="material-icons material-icons-round md-14 align-text-bottom ml-1">

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="team"> <div v-if="team">
<InvoiceControls/> <InvoiceControls class="d-print-none"/>
<InvoiceForm/> <InvoiceForm/>
</div> </div>
</template> </template>