diff --git a/src/components/RegularizeStockForm.vue b/src/components/RegularizeStockForm.vue index 180ff2100..098f8464d 100644 --- a/src/components/RegularizeStockForm.vue +++ b/src/components/RegularizeStockForm.vue @@ -54,6 +54,7 @@ const onDataSaved = (data) => { diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index ff57bf968..04c278abe 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -28,6 +28,7 @@ globals: reset: Reset close: Close cancel: Cancel + clone: Clone confirm: Confirm assign: Assign back: Back @@ -1165,6 +1166,36 @@ item: type: Type intrastat: Intrastat origin: Origin + 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: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index f9278a9b0..6bb64c9f5 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -28,6 +28,7 @@ globals: reset: Restaurar close: Cerrar cancel: Cancelar + clone: Clonar confirm: Confirmar assign: Asignar back: Volver @@ -1121,6 +1122,10 @@ item: fixedPrice: Precios fijados wasteBreakdown: Deglose de mermas itemCreate: Nuevo artículo + basicData: 'Datos básicos' + tax: 'IVA' + botanical: 'Botánico' + barcode: 'Código de barras' descriptor: item: Artículo buyer: Comprador @@ -1164,6 +1169,36 @@ item: type: Tipo intrastat: Intrastat origin: Origen + 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: {} itemsFilterPanel: 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 @@ +Item barcode 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 @@ +Item Botanical diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index 981de0632..62b54664d 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`); @@ -193,79 +162,16 @@ const openCloneDialog = async () => { - {{ t('Clone') }} + {{ t('globals.clone') }} - - - - - - - - - - {{ t('item.descriptor.item') }} - - - - - - - - - - - - - - - - - {{ t('item.descriptor.visible') }} - - {{ - visible - }} - - - - {{ t('item.descriptor.available') }} - - {{ - available - }} - - - - {{ warehouseText }} - - - + @@ -307,7 +213,6 @@ const openCloneDialog = async () => { es: Regularize stock: Regularizar stock - Clone: Clonar All it's properties will be copied: Todas sus propiedades serán copiadas Do you want to clone this item?: ¿Desea clonar este artículo? diff --git a/src/pages/Item/Card/ItemDescriptorImage.vue b/src/pages/Item/Card/ItemDescriptorImage.vue new file mode 100644 index 000000000..f16a57548 --- /dev/null +++ b/src/pages/Item/Card/ItemDescriptorImage.vue @@ -0,0 +1,158 @@ + + + + + + + + + + + + + {{ t('item.descriptor.item') }} + + + + + + + + + + + + + + + + + {{ t('item.descriptor.visible') }} + + {{ visible }} + + + + {{ t('item.descriptor.available') }} + + {{ available }} + + + + {{ + t('warehouseText', { + warehouseName: warehouseName, + }) + }} + + + + + + +es: + Regularize stock: Regularizar stock + All it's properties will be copied: Todas sus propiedades serán copiadas + Do you want to clone this item?: ¿Desea clonar este artículo? + warehouseText: Calculated on the warehouse of { warehouseName } + +en: + warehouseText: Calculado sobre el almacén de { warehouseName } + + + diff --git a/src/pages/Item/Card/ItemSummary.vue b/src/pages/Item/Card/ItemSummary.vue index 567fbf32b..103b3af59 100644 --- a/src/pages/Item/Card/ItemSummary.vue +++ b/src/pages/Item/Card/ItemSummary.vue @@ -1 +1,228 @@ -Item summary + + + + + + + + + + + {{ item.id }} - {{ item.name }} + + + + + + + + {{ t('item.summary.basicData') }} + + + + + + + + + + + + + + + + + + + + + + + + {{ t('item.summary.otherData') }} + + + + + + + + + + + + + + + + + {{ t('item.summary.tags') }} + + + + + + + {{ t('item.summary.description') }} + + + + {{ item.description }} + + + + + {{ t('item.summary.tax') }} + + + + + + + {{ t('item.summary.botanical') }} + + + + + + + + {{ t('item.summary.barcode') }} + + + + {{ barcode.code }} + + + + + + + +en: + Este artículo necesita una foto: Este artículo necesita una foto + diff --git a/src/pages/Item/Card/ItemTax.vue b/src/pages/Item/Card/ItemTax.vue new file mode 100644 index 000000000..76663932c --- /dev/null +++ b/src/pages/Item/Card/ItemTax.vue @@ -0,0 +1 @@ +Item tax diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index b4e0173a4..bd1bf75e5 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -538,7 +538,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); size="sm" > - {{ t('Clone') }} + {{ t('globals.clone') }} diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 5c670f680..c0888a225 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -213,7 +213,7 @@ const openTicketsDialog = (id) => { - {{ t('Clone') }} + {{ t('globals.clone') }} @@ -510,7 +510,6 @@ es: Select the starting date: Seleccione la fecha de inicio Stating date: Fecha de inicio Cancel: Cancelar - Clone: Clonar Mark as served: Marcar como servidas Download selected routes as PDF: Descargar rutas seleccionadas como PDF Add ticket: Añadir tickets diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index 3fffb3829..7a7dbd948 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -176,7 +176,7 @@ function navigateToRoadmapSummary(event, row) { - {{ t('Clone') }} + {{ t('globals.clone') }} diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue index c1ca5507e..44818323e 100644 --- a/src/pages/Route/RouteTickets.vue +++ b/src/pages/Route/RouteTickets.vue @@ -251,7 +251,7 @@ const openSmsDialog = async () => { - {{ t('Clone') }} + {{ t('globals.clone') }} diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 2a8e87194..b1aee83e6 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -11,7 +11,14 @@ export default { redirect: { name: 'ItemMain' }, menus: { main: ['ItemList', 'WasteBreakdown', 'ItemFixedPrice'], - card: ['ItemBasicData'], + card: [ + 'ItemBasicData', + 'ItemDiary', + 'ItemTags', + 'ItemTax', + 'ItemBotanical', + 'ItemBarcode', + ], }, children: [ { @@ -76,24 +83,6 @@ export default { }, component: () => import('src/pages/Item/Card/ItemSummary.vue'), }, - { - path: 'diary', - name: 'ItemDiary', - meta: { - title: 'diary', - icon: 'vn:transaction', - }, - component: () => import('src/pages/Item/Card/ItemDiary.vue'), - }, - { - path: 'tags', - name: 'ItemTags', - meta: { - title: 'Tags', - icon: 'vn:tags', - }, - component: () => import('src/pages/Item/Card/ItemTags.vue'), - }, { path: 'basic-data', name: 'ItemBasicData', @@ -103,6 +92,52 @@ export default { }, component: () => import('src/pages/Item/Card/ItemBasicData.vue'), }, + + { + path: 'tags', + name: 'ItemTags', + meta: { + title: 'tags', + icon: 'vn:tags', + }, + component: () => import('src/pages/Item/Card/ItemTags.vue'), + }, + { + path: 'tax', + name: 'ItemTax', + meta: { + title: 'tax', + icon: 'vn:tax', + }, + component: () => import('src/pages/Item/Card/ItemTax.vue'), + }, + { + path: 'botanical', + name: 'ItemBotanical', + meta: { + title: 'botanical', + icon: 'vn:botanical', + }, + component: () => import('src/pages/Item/Card/ItemBotanical.vue'), + }, + { + path: 'barcode', + name: 'ItemBarcode', + meta: { + title: 'barcode', + icon: 'vn:barcode', + }, + component: () => import('src/pages/Item/Card/ItemBarcode.vue'), + }, + { + path: 'diary', + name: 'ItemDiary', + meta: { + title: 'diary', + icon: 'vn:transaction', + }, + component: () => import('src/pages/Item/Card/ItemDiary.vue'), + }, ], }, ],
+ {{ item.description }} +
+ {{ barcode.code }} +