Remove unused code. Fix deleting invoice.

This commit is contained in:
HenriT
2021-02-26 23:59:45 +02:00
parent 13578024e8
commit b859309312
3 changed files with 1 additions and 6 deletions

View File

@ -5,12 +5,8 @@
:to="{name: 'invoices'}">
<i class="material-icons">arrow_back</i>
<span class="d-inline-block">Back</span>
<!-- Back-->
</router-link>
<div class="d-flex align-items-center">
<!-- <button class="btn btn-sm btn-outline-danger mr-2" @click="deleteInvoice">Delete</button>-->
<!-- <a :href="invoice.pdf_url" target="_blank" class="btn btn-sm btn-outline-primary mr-2">PDF</a>-->
<AppSelect :value="invoice.status"
class="mb-0 mr-2 text-capitalize multiselect--capitalize"
:options="['draft', 'booked', 'sent', 'paid', 'cancelled']"

View File

@ -133,7 +133,7 @@ export default {
return InvoiceService.updateInvoice(getters.invoice)
.catch(err => commit('setErrors', err.errors));
},
async deleteInvoice(invoice) {
async deleteInvoice(store, invoice) {
const res = await InvoiceService.deleteInvoice(invoice.id);
if ('invoice_id' in res) {
Invoice.delete(res.invoice_id);

View File

@ -43,7 +43,6 @@ export default {
},
all() {
return Team.query()
.with(['logos'])
.where('$isNew', false)
.get();
},