From 554b9e814b9af83e65c091cf1d0a30c61d6ead3e Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 2 May 2024 09:08:03 -0300 Subject: [PATCH 1/5] WIP --- src/components/FilterItemForm.vue | 11 +- src/pages/Entry/Card/EntryBuysImport.vue | 1 + src/pages/Item/Card/CreateIntrastatForm.vue | 52 +++++ src/pages/Item/Card/ItemBasicData.vue | 240 +++++++++++++++++++- src/pages/Item/locale/en.yml | 17 ++ src/pages/Item/locale/es.yml | 17 ++ 6 files changed, 334 insertions(+), 4 deletions(-) create mode 100644 src/pages/Item/Card/CreateIntrastatForm.vue diff --git a/src/components/FilterItemForm.vue b/src/components/FilterItemForm.vue index e031999e2..00659f8fd 100644 --- a/src/components/FilterItemForm.vue +++ b/src/components/FilterItemForm.vue @@ -1,7 +1,6 @@ + + diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue index 334cf049d..dc6868fba 100644 --- a/src/pages/Item/Card/ItemBasicData.vue +++ b/src/pages/Item/Card/ItemBasicData.vue @@ -1 +1,239 @@ - + + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index ec3b134e8..410ed5edc 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -11,3 +11,20 @@ itemDiary: showBefore: Show what's before the inventory since: Since warehouse: Warehouse +basicData: + type: Type + reference: Reference + relevancy: Relevancy + stems: Stems + multiplier: Multiplier + generic: Generic + intrastat: Intrastat + expense: Expense + weightByPiece: Weight/Piece + boxUnits: Units/Box + recycledPlastic: Recycled plastic + nonRecycledPlastic: Non recycled plastic +createIntrastatForm: + title: New intrastat + identifier: Identifier + description: Description diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 4f76313fa..6540c36c8 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -11,3 +11,20 @@ itemDiary: showBefore: Mostrar lo anterior al inventario since: Desde warehouse: Almacén +basicData: + type: Tipo + reference: Referencia + relevancy: Relevancia + stems: Tallos + multiplier: Multiplicador + generic: Genérico + intrastat: Intrastat + expense: Gasto + weightByPiece: Peso (gramos)/tallo + boxUnits: Unidades/caja + recycledPlastic: Plástico reciclado + nonRecycledPlastic: Plástico no reciclado +createIntrastatForm: + title: Nuevo intrastat + identifier: Identificador + description: Descripción From d68934a5269ff18f69ef8398e32914228bccab22 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 2 May 2024 11:51:04 -0300 Subject: [PATCH 2/5] Item basic data --- src/pages/Item/Card/ItemBasicData.vue | 66 ++++++++++++--------------- src/pages/Item/locale/en.yml | 7 +++ src/pages/Item/locale/es.yml | 7 +++ 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue index dc6868fba..7e8fa1d92 100644 --- a/src/pages/Item/Card/ItemBasicData.vue +++ b/src/pages/Item/Card/ItemBasicData.vue @@ -192,48 +192,42 @@ const onIntrastatCreated = (response, formData) => { type="number" /> - - + + + + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index 410ed5edc..35d65b2da 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -24,6 +24,13 @@ basicData: boxUnits: Units/Box recycledPlastic: Recycled plastic nonRecycledPlastic: Non recycled plastic + description: Description + isActive: Active + hasKgPrice: Price in kg + isFragile: Fragile + isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...) + isPhotoRequested: Do photo + isPhotoRequestedTooltip: This item does need a photo createIntrastatForm: title: New intrastat identifier: Identifier diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 6540c36c8..498520c26 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -24,6 +24,13 @@ basicData: boxUnits: Unidades/caja recycledPlastic: Plástico reciclado nonRecycledPlastic: Plástico no reciclado + description: Descripción + isActive: Activo + hasKgPrice: Precio en kg + isFragile: Frágil + isFragileTooltip: Se muestra en la web app, que este artículo no puede viajar (coronas, palmas, ...) + isPhotoRequested: Hacer foto + isPhotoRequestedTooltip: Este artículo necesita una foto createIntrastatForm: title: Nuevo intrastat identifier: Identificador From 0f5d06614d2c1e0e21a433be89957ea340c43b49 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 6 May 2024 07:24:52 +0200 Subject: [PATCH 3/5] feat: VnInput numberValidation --- src/components/common/VnInput.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 96028862a..0d7d6edca 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -52,6 +52,12 @@ const focus = () => { defineExpose({ focus, }); + +const inputRules = (val) => { + const { min } = vnInputRef.value.$attrs; + if (min >= 0) + if (val.toString().indexOf('.') < min) return t('inputMin', { value: min }); +};