From cf193b07c58649168bf8f4aeae619768b90ace5b Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 26 Apr 2024 08:02:17 -0300 Subject: [PATCH] Item tax --- src/components/CrudModel.vue | 8 ++- src/i18n/locale/en.yml | 3 + src/pages/Item/Card/ItemTax.vue | 103 +++++++++++++++++++++++++++++++- 3 files changed, 111 insertions(+), 3 deletions(-) diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fb3ac10c3..24d848f3b 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -124,11 +124,15 @@ async function onSubmit() { }); } isLoading.value = true; - await saveChanges(); + await saveChanges($props.saveFn ? formData.value : null); } async function saveChanges(data) { - if ($props.saveFn) return $props.saveFn(data, getChanges); + if ($props.saveFn) { + $props.saveFn(data, getChanges); + isLoading.value = false; + return; + } const changes = data || getChanges(); try { await axios.post($props.saveUrl || $props.url + '/crud', changes); diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 04c278abe..d3b18dfe2 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1123,6 +1123,9 @@ item: fixedPrice: Fixed prices wasteBreakdown: Waste breakdown itemCreate: New item + botanical: Botanical + barcode: Barcodes + tax: Tax descriptor: item: Item buyer: Buyer diff --git a/src/pages/Item/Card/ItemTax.vue b/src/pages/Item/Card/ItemTax.vue index 76663932c..b966eede9 100644 --- a/src/pages/Item/Card/ItemTax.vue +++ b/src/pages/Item/Card/ItemTax.vue @@ -1 +1,102 @@ - + + + + +es: + Country: PaĆ­s + Class: Clase +