aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/item_selector.vue4
-rw-r--r--src/views/EditInvoice.vue2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/item_selector.vue b/src/components/item_selector.vue
index 5dc9b84..9cdbeed 100644
--- a/src/components/item_selector.vue
+++ b/src/components/item_selector.vue
@@ -4,7 +4,7 @@ import axios from 'axios'
import { useToast } from 'vue-toast-notification'
import InvoiceItem from "./../classes/invoice_item"
-const props = defineProps(["invoiceId"])
+const props = defineProps(["invoice"])
const emit = defineEmits(["added"])
const toast = useToast({
@@ -42,7 +42,7 @@ const submit = async (e: Event) => {
submitting.value = true
try {
- await axios.post(`/invoice/${props.invoiceId}/item`, toRaw(item.value))
+ await axios.post(`/invoice/${props.invoice.ID}/item`, toRaw(item.value))
itemSelection.value = null
item.value = new InvoiceItem()
emit("added")
diff --git a/src/views/EditInvoice.vue b/src/views/EditInvoice.vue
index 983e9ef..b134721 100644
--- a/src/views/EditInvoice.vue
+++ b/src/views/EditInvoice.vue
@@ -43,5 +43,5 @@ onMounted(() => {
<template>
<invoiceHeader :invoice="invoice" />
- <itemSelector :invoiceId="invoice.ID" @added="refreshItems()"/>
+ <itemSelector :invoice="invoice" @added="refreshItems()"/>
</template>