mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-28 00:11:08 -04:00
Remove unused code. Fix deleting invoice.
This commit is contained in:
@ -5,12 +5,8 @@
|
|||||||
:to="{name: 'invoices'}">
|
:to="{name: 'invoices'}">
|
||||||
<i class="material-icons">arrow_back</i>
|
<i class="material-icons">arrow_back</i>
|
||||||
<span class="d-inline-block">Back</span>
|
<span class="d-inline-block">Back</span>
|
||||||
<!-- Back-->
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="d-flex align-items-center">
|
<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"
|
<AppSelect :value="invoice.status"
|
||||||
class="mb-0 mr-2 text-capitalize multiselect--capitalize"
|
class="mb-0 mr-2 text-capitalize multiselect--capitalize"
|
||||||
:options="['draft', 'booked', 'sent', 'paid', 'cancelled']"
|
:options="['draft', 'booked', 'sent', 'paid', 'cancelled']"
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export default {
|
|||||||
return InvoiceService.updateInvoice(getters.invoice)
|
return InvoiceService.updateInvoice(getters.invoice)
|
||||||
.catch(err => commit('setErrors', err.errors));
|
.catch(err => commit('setErrors', err.errors));
|
||||||
},
|
},
|
||||||
async deleteInvoice(invoice) {
|
async deleteInvoice(store, invoice) {
|
||||||
const res = await InvoiceService.deleteInvoice(invoice.id);
|
const res = await InvoiceService.deleteInvoice(invoice.id);
|
||||||
if ('invoice_id' in res) {
|
if ('invoice_id' in res) {
|
||||||
Invoice.delete(res.invoice_id);
|
Invoice.delete(res.invoice_id);
|
||||||
|
|||||||
@ -43,7 +43,6 @@ export default {
|
|||||||
},
|
},
|
||||||
all() {
|
all() {
|
||||||
return Team.query()
|
return Team.query()
|
||||||
.with(['logos'])
|
|
||||||
.where('$isNew', false)
|
.where('$isNew', false)
|
||||||
.get();
|
.get();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user