Add button to mark invoice as paid
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
acf7b94094
commit
b05c5025c0
|
@ -114,6 +114,7 @@
|
|||
<div class="flex space-x-2">
|
||||
<ui-action-button tooltip="Anschauen" :href="invoice.links.pdf" class="btn-info" icon="eye" blank></ui-action-button>
|
||||
<ui-action-button tooltip="Erinnerung anschauen" :href="invoice.links.rememberpdf" class="btn-info" icon="document" blank></ui-action-button>
|
||||
<ui-action-button tooltip="Als Bezahlt markieren" class="btn-warning" icon="money" blank @click.prevent="markAsPaid(invoice)"></ui-action-button>
|
||||
<ui-action-button :data-cy="`edit-button-${invoice.id}`" tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(invoice)"></ui-action-button>
|
||||
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = invoice"></ui-action-button>
|
||||
</div>
|
||||
|
@ -143,4 +144,9 @@ async function sendMassstore() {
|
|||
await axios.post(meta.value.links['mass-store'], massstore.value);
|
||||
massstore.value = null;
|
||||
}
|
||||
|
||||
async function markAsPaid(invoice) {
|
||||
await axios.patch(invoice.links.update, {...invoice, status: 'Rechnung beglichen'});
|
||||
await reloadPage();
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue