diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fb3ac10c3..de4724e55 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -124,11 +124,16 @@ 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; + hasChanges.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 113fd0202..50fe6db76 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -991,7 +991,7 @@ supplier: billingData: Billing data payMethod: Pay method payDeadline: Pay deadline - payDay: Día de pago + payDay: Pay day account: Account fiscalData: Fiscal data sageTaxType: Sage tax type @@ -1133,9 +1133,9 @@ item: fixedPrice: Fixed prices wasteBreakdown: Waste breakdown itemCreate: New item - log: Log + barcode: Barcodes tax: Tax - barcode: Barcode + log: Log botanical: Botanical itemTypeCreate: New item type family: Item Type diff --git a/src/pages/Customer/Card/CustomerContacts.vue b/src/pages/Customer/Card/CustomerContacts.vue index 6fb891dff..cd4d553df 100644 --- a/src/pages/Customer/Card/CustomerContacts.vue +++ b/src/pages/Customer/Card/CustomerContacts.vue @@ -1,5 +1,5 @@