diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue
index 68bf9511f..b13e8661d 100644
--- a/src/pages/Order/Card/OrderCatalog.vue
+++ b/src/pages/Order/Card/OrderCatalog.vue
@@ -130,4 +130,5 @@ function extractValueTags(items) {
es:
You can search items by name or id: Puedes buscar items por nombre o id
+ Search items: Buscar items
diff --git a/src/pages/Order/Card/OrderCatalogItemDialog.vue b/src/pages/Order/Card/OrderCatalogItemDialog.vue
index 46a50c021..09a25fcb8 100644
--- a/src/pages/Order/Card/OrderCatalogItemDialog.vue
+++ b/src/pages/Order/Card/OrderCatalogItemDialog.vue
@@ -20,8 +20,10 @@ const props = defineProps({
const fields = ref((props.prices || []).map((item) => ({ ...item, quantity: 0 })));
const descriptorData = useArrayData('orderData');
-
+const isLoading = ref(false);
const addToOrder = async () => {
+ if (isLoading.value) return;
+ isLoading.value = true;
const items = (fields.value || []).filter((item) => Number(item.quantity) > 0);
await axios.post('/OrderRows/addToOrder', {
items,
@@ -30,6 +32,10 @@ const addToOrder = async () => {
notify(t('globals.dataSaved'), 'positive');
emit('added');
descriptorData.fetch({});
+ isLoading.value = false;
+};
+const canAddToOrder = () => {
+ return (fields.value || []).some((item) => Number(item.quantity) > 0);
};
@@ -68,7 +74,11 @@ const addToOrder = async () => {
-
+
{{ t('globals.add') }}
@@ -81,3 +91,10 @@ const addToOrder = async () => {
width: 200px;
}
+
+
+es:
+ noAmount: La cantidad no puede ser 0
+en:
+ noAmount: Amount can not be 0
+