From ac9063e1666d51056ebac551c775ea4de260fa49 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 29 Apr 2024 17:01:26 -0300 Subject: [PATCH 1/8] Item Last entries --- src/components/common/VnInputDate.vue | 9 +- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Item/Card/ItemLastEntries.vue | 291 ++++++++++++++++++++++++ src/pages/Item/locale/en.yml | 20 ++ src/pages/Item/locale/es.yml | 20 ++ src/router/modules/item.js | 10 + 7 files changed, 351 insertions(+), 1 deletion(-) create mode 100644 src/pages/Item/Card/ItemLastEntries.vue create mode 100644 src/pages/Item/locale/en.yml create mode 100644 src/pages/Item/locale/es.yml diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 2053eceb1..72d9bb2bc 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -15,6 +15,10 @@ const props = defineProps({ type: Boolean, default: false, }, + emitDate: { + type: Boolean, + default: false, + }, }); const hover = ref(false); @@ -37,7 +41,10 @@ const value = computed({ return props.modelValue; }, set(value) { - emit('update:modelValue', joinDateAndTime(value, time.value)); + emit( + 'update:modelValue', + props.emitDate ? new Date(value) : joinDateAndTime(value, time.value) + ); }, }); diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index abe59fe18..a898f4d53 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1135,6 +1135,7 @@ item: tax: Tax barcode: Barcode botanical: Botanical + lastEntries: Last entries descriptor: item: Item buyer: Buyer diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 06aa057e3..dd176e235 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1134,6 +1134,7 @@ item: botanical: 'Botánico' barcode: 'Código de barras' log: Historial + lastEntries: Últimas entradas descriptor: item: Artículo buyer: Comprador diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue new file mode 100644 index 000000000..2a2d84dfe --- /dev/null +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -0,0 +1,291 @@ + + + + + diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml new file mode 100644 index 000000000..b7909bdf9 --- /dev/null +++ b/src/pages/Item/locale/en.yml @@ -0,0 +1,20 @@ +lastEntries: + since: Since + to: To + ig: Ig + warehouse: Warehouse + landed: Landed + entry: Entry + pvp: PVP + label: Label + packing: Packing + grouping: Grouping + stems: Stems + quantity: Quantity + cost: Cost + kg: Kg. + cube: Cube + supplier: Supplier + package: Package + freight: Freight + comission: Comission diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml new file mode 100644 index 000000000..052ba1981 --- /dev/null +++ b/src/pages/Item/locale/es.yml @@ -0,0 +1,20 @@ +lastEntries: + since: Desde + to: Hasta + ig: Ig + warehouse: Almacén + landed: F. Entrega + entry: Entrada + pvp: PVP + label: Etiquetas + packing: Packing + grouping: Grouping + stems: Tallos + quantity: Cantidad + cost: Coste + kg: Kg. + cube: Cubo + supplier: Proveedor + package: Embalaje + freight: Porte + comission: Comisión diff --git a/src/router/modules/item.js b/src/router/modules/item.js index bc1e72a94..91c43a540 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -20,6 +20,7 @@ export default { 'ItemTax', 'ItemBotanical', 'ItemBarcode', + 'ItemLastEntries', ], }, children: [ @@ -157,6 +158,15 @@ export default { }, component: () => import('src/pages/Item/Card/ItemBotanical.vue'), }, + { + path: 'last-entries', + name: 'ItemLastEntries', + meta: { + title: 'lastEntries', + icon: 'vn:botanical', + }, + component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), + }, ], }, ], From 0890de37714f0859caba92087bfd196a509fa003 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 30 Apr 2024 16:21:06 -0300 Subject: [PATCH 2/8] change prop name --- src/components/common/VnInputDate.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 72d9bb2bc..fe0866292 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -15,7 +15,7 @@ const props = defineProps({ type: Boolean, default: false, }, - emitDate: { + emitDateFormat: { type: Boolean, default: false, }, @@ -43,7 +43,7 @@ const value = computed({ set(value) { emit( 'update:modelValue', - props.emitDate ? new Date(value) : joinDateAndTime(value, time.value) + props.emitDateFormat ? new Date(value) : joinDateAndTime(value, time.value) ); }, }); From 72ad524c6807b2d1c42af13dc7ea2fd241a7f6d2 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 30 Apr 2024 16:23:19 -0300 Subject: [PATCH 3/8] change prop names --- src/pages/Item/Card/ItemLastEntries.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue index 2a2d84dfe..af14e06c2 100644 --- a/src/pages/Item/Card/ItemLastEntries.vue +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -209,11 +209,16 @@ onUnmounted(() => (stateStore.rightDrawer = false)); - +
From d2531efdd62ff510f8fe1930de5f913949d63a9b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 1 May 2024 13:27:40 +0200 Subject: [PATCH 4/8] fix: Botanical icon --- src/router/modules/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 91c43a540..ff07a37d2 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -154,7 +154,7 @@ export default { name: 'ItemBotanical', meta: { title: 'botanical', - icon: 'vn:botanical', + icon: 'local_florist', }, component: () => import('src/pages/Item/Card/ItemBotanical.vue'), }, From 4ef7b0e17cacf33f4daa75dd5ebe5b1c6dfb2a8d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 1 May 2024 13:31:32 +0200 Subject: [PATCH 5/8] fix: item routes order --- src/router/modules/item.js | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/router/modules/item.js b/src/router/modules/item.js index ff07a37d2..51d9138db 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -113,6 +113,15 @@ export default { }, component: () => import('src/pages/Item/Card/ItemTags.vue'), }, + { + path: 'last-entries', + name: 'ItemLastEntries', + meta: { + title: 'lastEntries', + icon: 'vn:regentry', + }, + component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), + }, { path: 'tax', name: 'ItemTax', @@ -122,6 +131,15 @@ export default { }, component: () => import('src/pages/Item/Card/ItemTax.vue'), }, + { + path: 'botanical', + name: 'ItemBotanical', + meta: { + title: 'botanical', + icon: 'local_florist', + }, + component: () => import('src/pages/Item/Card/ItemBotanical.vue'), + }, { path: 'barcode', name: 'ItemBarcode', @@ -135,8 +153,8 @@ export default { path: 'diary', name: 'ItemDiary', meta: { - title: 'basicData', - icon: 'vn:settings', + title: 'diary', + icon: 'vn:transaction', }, component: () => import('src/pages/Item/Card/ItemDiary.vue'), }, @@ -149,24 +167,6 @@ export default { }, component: () => import('src/pages/Item/Card/ItemLog.vue'), }, - { - path: 'botanical', - name: 'ItemBotanical', - meta: { - title: 'botanical', - icon: 'local_florist', - }, - component: () => import('src/pages/Item/Card/ItemBotanical.vue'), - }, - { - path: 'last-entries', - name: 'ItemLastEntries', - meta: { - title: 'lastEntries', - icon: 'vn:botanical', - }, - component: () => import('src/pages/Item/Card/ItemLastEntries.vue'), - }, ], }, ], From 4fdf2bacf877fb8871ff16c20c579748c3e1521b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 1 May 2024 13:52:45 +0200 Subject: [PATCH 6/8] fix: pvp tooltip --- src/pages/Item/Card/ItemLastEntries.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue index af14e06c2..297cb6330 100644 --- a/src/pages/Item/Card/ItemLastEntries.vue +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -256,6 +256,14 @@ onUnmounted(() => (stateStore.rightDrawer = false)); + From 6a958a08072be38eb1f9e4124f01af4048d5352d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 2 May 2024 08:32:39 +0000 Subject: [PATCH 7/8] Actualizar src/pages/InvoiceIn/Card/InvoiceInDueDay.vue --- src/pages/InvoiceIn/Card/InvoiceInDueDay.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue index 476a0f31e..0e68b740f 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDueDay.vue @@ -70,7 +70,7 @@ const columns = computed(() => [ const isNotEuro = (code) => code != 'EUR'; async function insert() { - await axios.post('/InvoiceInDueDays/new ', { id: +invoiceId }); + await axios.post('/InvoiceInDueDays/new', { id: +invoiceId }); await invoiceInFormRef.value.reload(); } From 120e84f43952799a0e89d80d06a472f11375b6f0 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 2 May 2024 09:16:24 -0300 Subject: [PATCH 8/8] Add condition to packing and grouping badge colors --- src/pages/Item/Card/ItemLastEntries.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/Item/Card/ItemLastEntries.vue b/src/pages/Item/Card/ItemLastEntries.vue index af14e06c2..62c154de2 100644 --- a/src/pages/Item/Card/ItemLastEntries.vue +++ b/src/pages/Item/Card/ItemLastEntries.vue @@ -250,7 +250,11 @@ onUnmounted(() => (stateStore.rightDrawer = false));