aboutsummaryrefslogtreecommitdiff
path: root/src/components/item_selector.vue
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-12-03 22:37:23 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-12-03 22:37:23 +0530
commit366e2193c855ab28917b743c71a877ad5b76c934 (patch)
tree54fa67047cb7ff3da8eb67aaebca6c4eeb7f0803 /src/components/item_selector.vue
parentae45ad12a5840348550078cb62042e813a3492b5 (diff)
fixed typescript error
Diffstat (limited to 'src/components/item_selector.vue')
-rw-r--r--src/components/item_selector.vue4
1 files changed, 2 insertions, 2 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")