mirror of
https://github.com/mokuappio/serverless-invoices.git
synced 2025-10-27 07:51:08 -04:00
Remove unused code. Fix deleting invoice.
This commit is contained in:
@ -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']"
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -43,7 +43,6 @@ export default {
|
||||
},
|
||||
all() {
|
||||
return Team.query()
|
||||
.with(['logos'])
|
||||
.where('$isNew', false)
|
||||
.get();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user