From cd49ebe7a66790e039baaa4b9280d0aa3f9b6d3f Mon Sep 17 00:00:00 2001 From: jcasado Date: Wed, 3 Apr 2024 12:54:14 +0200 Subject: [PATCH 01/30] refs #6697 fix claimQuantity --- src/pages/Claim/Card/ClaimLines.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index 70c257c69..4a1d9c9d0 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -20,7 +20,7 @@ const { t } = useI18n(); const stateStore = useStateStore(); const arrayData = useArrayData('ClaimLines'); const store = arrayData.store; - +let claimedDefault = 0; const claimFilter = { fields: ['ticketFk'], }; @@ -79,6 +79,7 @@ const columns = computed(() => [ label: t('Claimed'), field: (row) => row.quantity, sortable: true, + default: 0, }, { name: 'description', From 4a0ae8aa45ca5ab0f5ad448a7f9bae64bb166623 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 10 Apr 2024 17:18:57 -0300 Subject: [PATCH 02/30] Item summary --- src/i18n/en/index.js | 41 +++- src/i18n/es/index.js | 35 +++ src/pages/Item/Card/ItemBarcode.vue | 1 + src/pages/Item/Card/ItemBasicData.vue | 1 + src/pages/Item/Card/ItemBotanical.vue | 1 + src/pages/Item/Card/ItemDescriptor.vue | 108 +-------- src/pages/Item/Card/ItemDescriptorImage.vue | 159 ++++++++++++++ src/pages/Item/Card/ItemSummary.vue | 232 +++++++++++++++++++- src/pages/Item/Card/ItemTax.vue | 1 + src/pages/Item/ItemList.vue | 2 +- src/router/modules/item.js | 64 +++++- 11 files changed, 529 insertions(+), 116 deletions(-) create mode 100644 src/pages/Item/Card/ItemBarcode.vue create mode 100644 src/pages/Item/Card/ItemBasicData.vue create mode 100644 src/pages/Item/Card/ItemBotanical.vue create mode 100644 src/pages/Item/Card/ItemDescriptorImage.vue create mode 100644 src/pages/Item/Card/ItemTax.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index cd61d46ff..c4affad71 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1213,9 +1213,13 @@ export default { pageTitles: { items: 'Items', list: 'List', - diary: 'Diary', - tags: 'Tags', - create: 'Create', + diary: 'Histórico', + tags: 'Etiquetas', + create: 'Crear', + basicData: 'Datos básicos', + tax: 'IVA', + botanical: 'Botánico', + barcode: 'Código de barras', }, descriptor: { item: 'Item', @@ -1246,6 +1250,37 @@ export default { producer: 'Producer', landed: 'Landed', }, + summary: { + basicData: 'Datos básicos', + otherData: 'Otros datos', + description: 'Descripción', + tax: 'IVA', + tags: 'Etiquetas', + botanical: 'Botánico', + barcode: 'Código de barras', + name: 'Nombre', + completeName: 'Nombre completo', + family: 'Familia', + size: 'Medida', + origin: 'Origen', + stems: 'Tallos', + multiplier: 'Multiplicador', + buyer: 'Comprador', + doPhoto: 'Hacer foto', + intrastatCode: 'Código intrastat', + intrastat: 'Intrastat', + ref: 'Referencia', + relevance: 'Relevancia', + weight: 'Peso (gramos)/tallo', + units: 'Unidades/caja', + expense: 'Gasto', + generic: 'Genérico', + recycledPlastic: 'Plástico reciclado', + nonRecycledPlastic: 'Plástico no reciclado', + minSalesQuantity: 'Cantidad mínima de venta', + genus: 'Genus', + specie: 'Specie', + }, }, components: { topbar: {}, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 08fb809b2..01263f224 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1215,6 +1215,10 @@ export default { diary: 'Histórico', tags: 'Etiquetas', create: 'Crear', + basicData: 'Datos básicos', + tax: 'IVA', + botanical: 'Botánico', + barcode: 'Código de barras', }, descriptor: { item: 'Artículo', @@ -1245,6 +1249,37 @@ export default { producer: 'Productor', landed: 'F. entrega', }, + summary: { + basicData: 'Datos básicos', + otherData: 'Otros datos', + description: 'Descripción', + tax: 'IVA', + tags: 'Etiquetas', + botanical: 'Botánico', + barcode: 'Código de barras', + name: 'Nombre', + completeName: 'Nombre completo', + family: 'Familia', + size: 'Medida', + origin: 'Origen', + stems: 'Tallos', + multiplier: 'Multiplicador', + buyer: 'Comprador', + doPhoto: 'Hacer foto', + intrastatCode: 'Código intrastat', + intrastat: 'Intrastat', + ref: 'Referencia', + relevance: 'Relevancia', + weight: 'Peso (gramos)/tallo', + units: 'Unidades/caja', + expense: 'Gasto', + generic: 'Genérico', + recycledPlastic: 'Plástico reciclado', + nonRecycledPlastic: 'Plástico no reciclado', + minSalesQuantity: 'Cantidad mínima de venta', + genus: 'Genus', + specie: 'Specie', + }, }, components: { topbar: {}, diff --git a/src/pages/Item/Card/ItemBarcode.vue b/src/pages/Item/Card/ItemBarcode.vue new file mode 100644 index 000000000..e4366a11b --- /dev/null +++ b/src/pages/Item/Card/ItemBarcode.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue new file mode 100644 index 000000000..334cf049d --- /dev/null +++ b/src/pages/Item/Card/ItemBasicData.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/Card/ItemBotanical.vue b/src/pages/Item/Card/ItemBotanical.vue new file mode 100644 index 000000000..a2a39d9df --- /dev/null +++ b/src/pages/Item/Card/ItemBotanical.vue @@ -0,0 +1 @@ + diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index 981de0632..59ac9adf9 100644 --- a/src/pages/Item/Card/ItemDescriptor.vue +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -9,7 +9,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import RegularizeStockForm from 'components/RegularizeStockForm.vue'; -import EditPictureForm from 'components/EditPictureForm.vue'; +import ItemDescriptorImage from 'src/pages/Item/Card/ItemDescriptorImage.vue'; import { useState } from 'src/composables/useState'; import useCardDescription from 'src/composables/useCardDescription'; @@ -50,12 +50,10 @@ const entityId = computed(() => { }); const image = ref(null); const regularizeStockFormDialog = ref(null); -const editPhotoFormDialog = ref(null); const item = ref(null); const available = ref(null); const visible = ref(null); const _warehouseFk = ref(null); -const warehouseText = ref(null); const salixUrl = ref(); const warehouseFk = computed({ get() { @@ -63,14 +61,9 @@ const warehouseFk = computed({ }, set(val) { _warehouseFk.value = val; - if (val) { - updateStock(); - getWarehouseName(val); - } + if (val) updateStock(); }, }); -const showWarehouseIconTooltip = ref(true); -const showEditPhotoForm = ref(false); onMounted(async () => { await getItemAvatar(); @@ -90,26 +83,6 @@ const setData = (entity) => { data.value = useCardDescription(entity.name, entity.id); }; -const getWarehouseName = async (warehouseFk) => { - try { - showWarehouseIconTooltip.value = false; - - const filter = { - where: { id: warehouseFk }, - }; - - const { data } = await axios.get('Warehouses/findOne', { filter }); - - warehouseText.value = t('item.descriptor.warehouseText', { - warehouseName: data.name, - }); - - showWarehouseIconTooltip.value = true; - } catch (err) { - console.error('Error finding warehouse'); - } -}; - const updateStock = async () => { try { available.value = null; @@ -135,10 +108,6 @@ const openRegularizeStockForm = () => { regularizeStockFormDialog.value.show(); }; -const toggleEditPictureForm = () => { - showEditPhotoForm.value = !showEditPhotoForm.value; -}; - const cloneItem = async () => { try { const { data } = await axios.post(`Items/${entityId.value}/clone`); @@ -198,74 +167,11 @@ const openCloneDialog = async () => { + + + + + + - +es: + Discard: Descartar diff --git a/src/pages/Item/ItemRequestDenyForm.vue b/src/pages/Item/ItemRequestDenyForm.vue new file mode 100644 index 000000000..f26edb845 --- /dev/null +++ b/src/pages/Item/ItemRequestDenyForm.vue @@ -0,0 +1,57 @@ + + + + + +es: + Specify the reasons to deny this request: Especifica las razones para descartar la petición + From 92429295cdffe0b6842f6a47edc4b1d96c52fb84 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 12 Apr 2024 10:44:25 -0300 Subject: [PATCH 05/30] more translations --- src/i18n/locale/en.yml | 30 ++++++++++++++++++++++++++++++ src/i18n/locale/es.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 593f0084c..ed71a8413 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1128,6 +1128,36 @@ item: stemMultiplier: Multiplier producer: Producer landed: Landed + summary: + basicData: 'Basic data' + otherData: 'Other data' + description: 'Description' + tax: 'Tax' + tags: 'Tags' + botanical: 'Botanical' + barcode: 'Barcode' + name: 'Nombre' + completeName: 'Nombre completo' + family: 'Familia' + size: 'Medida' + origin: 'Origen' + stems: 'Tallos' + multiplier: 'Multiplicador' + buyer: 'Comprador' + doPhoto: 'Do photo' + intrastatCode: 'Código intrastat' + intrastat: 'Intrastat' + ref: 'Referencia' + relevance: 'Relevancia' + weight: 'Peso (gramos)/tallo' + units: 'Unidades/caja' + expense: 'Gasto' + generic: 'Genérico' + recycledPlastic: 'Plástico reciclado' + nonRecycledPlastic: 'Plástico no reciclado' + minSalesQuantity: 'Cantidad mínima de venta' + genus: 'Genus' + specie: 'Specie' components: topbar: {} userPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 70d7a1113..16ede8bef 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1125,6 +1125,36 @@ item: stemMultiplier: Multiplicador producer: Productor landed: F. entrega + summary: + basicData: 'Datos básicos' + otherData: 'Otros datos' + description: 'Descripción' + tax: 'IVA' + tags: 'Etiquetas' + botanical: 'Botánico' + barcode: 'Código de barras' + name: 'Nombre' + completeName: 'Nombre completo' + family: 'Familia' + size: 'Medida' + origin: 'Origen' + stems: 'Tallos' + multiplier: 'Multiplicador' + buyer: 'Comprador' + doPhoto: 'Hacer foto' + intrastatCode: 'Código intrastat' + intrastat: 'Intrastat' + ref: 'Referencia' + relevance: 'Relevancia' + weight: 'Peso (gramos)/tallo' + units: 'Unidades/caja' + expense: 'Gasto' + generic: 'Genérico' + recycledPlastic: 'Plástico reciclado' + nonRecycledPlastic: 'Plástico no reciclado' + minSalesQuantity: 'Cantidad mínima de venta' + genus: 'Genus' + specie: 'Specie' components: topbar: {} userPanel: From 5f46ad225e82b80a6cb3bb849f18f59dd8acdcad Mon Sep 17 00:00:00 2001 From: wbuezas Date: Fri, 12 Apr 2024 10:44:56 -0300 Subject: [PATCH 06/30] Fix genus and specie value --- src/pages/Item/Card/ItemSummary.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/Item/Card/ItemSummary.vue b/src/pages/Item/Card/ItemSummary.vue index 69c09bb05..103b3af59 100644 --- a/src/pages/Item/Card/ItemSummary.vue +++ b/src/pages/Item/Card/ItemSummary.vue @@ -55,7 +55,7 @@ const isAdministrative = computed(() => { -