From a9a09ad0a3aa9f81639a98c88680308fc1ec542c Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 27 Dec 2024 13:58:35 +0100 Subject: [PATCH 01/11] refactor: refs #8316 used VnSection and VnCardBeta --- src/pages/Entry/Card/EntryCard.vue | 14 +- src/pages/Entry/EntryList.vue | 122 ++++++++--------- src/pages/Entry/locale/en.yml | 3 + src/pages/Entry/locale/es.yml | 6 +- src/router/modules/entry.js | 201 ++++++++++++++++------------- 5 files changed, 179 insertions(+), 167 deletions(-) diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue index 3f2596338..6d743926e 100644 --- a/src/pages/Entry/Card/EntryCard.vue +++ b/src/pages/Entry/Card/EntryCard.vue @@ -1,21 +1,11 @@ diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 84ead85ad..6e7e9fc82 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -2,19 +2,19 @@ import { onMounted, ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import EntryFilter from './EntryFilter.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import { useStateStore } from 'stores/useStateStore'; import VnTable from 'components/VnTable/VnTable.vue'; -import RightMenu from 'src/components/common/RightMenu.vue'; import { toDate } from 'src/filters'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import EntrySummary from './Card/EntrySummary.vue'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; +import VnSection from 'src/components/common/VnSection.vue'; const stateStore = useStateStore(); const { t } = useI18n(); const tableRef = ref(); +const dataKey = 'EntryList'; const { viewSummary } = useSummaryDialog(); const entryFilter = { @@ -180,67 +180,71 @@ const columns = computed(() => [ }, ]); + diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 572a5908b..edd3ae942 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -188,7 +188,6 @@ const columns = computed(() => [ :array-data-props="{ url: 'Entries/filter', order: 'id DESC', - exprBuilder, }" > + From 80413eef3ef616e77efeb842bd4159078b558e88 Mon Sep 17 00:00:00 2001 From: jtubau Date: Wed, 15 Jan 2025 15:19:47 +0100 Subject: [PATCH 06/11] refactor: refs #8316 moved localizations to local locale --- src/i18n/locale/en.yml | 74 --------------------------------- src/i18n/locale/es.yml | 74 --------------------------------- src/pages/Entry/EntryList.vue | 10 +---- src/pages/Entry/locale/en.yml | 77 ++++++++++++++++++++++++++++++++-- src/pages/Entry/locale/es.yml | 78 +++++++++++++++++++++++++++++++++-- 5 files changed, 148 insertions(+), 165 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 91d07a9d3..80f18238d 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -389,80 +389,6 @@ cau: subtitle: By sending this ticket, all the data related to the error, the section, the user, etc., are already sent. inputLabel: Explain why this error should not appear askPrivileges: Ask for privileges -entry: - list: - newEntry: New entry - tableVisibleColumns: - created: Creation - supplierFk: Supplier - isBooked: Booked - isConfirmed: Confirmed - isOrdered: Ordered - companyFk: Company - travelFk: Travel - isExcludedFromAvailable: Inventory - invoiceAmount: Import - summary: - commission: Commission - currency: Currency - invoiceNumber: Invoice number - ordered: Ordered - booked: Booked - excludedFromAvailable: Inventory - travelReference: Reference - travelAgency: Agency - travelShipped: Shipped - travelDelivered: Delivered - travelLanded: Landed - travelReceived: Received - buys: Buys - stickers: Stickers - package: Package - packing: Pack. - grouping: Group. - buyingValue: Buying value - import: Import - pvp: PVP - basicData: - travel: Travel - currency: Currency - commission: Commission - observation: Observation - booked: Booked - excludedFromAvailable: Inventory - buys: - observations: Observations - packagingFk: Box - color: Color - printedStickers: Printed stickers - notes: - observationType: Observation type - latestBuys: - tableVisibleColumns: - image: Picture - itemFk: Item ID - weightByPiece: Weight/Piece - isActive: Active - family: Family - entryFk: Entry - freightValue: Freight value - comissionValue: Commission value - packageValue: Package value - isIgnored: Is ignored - price2: Grouping - price3: Packing - minPrice: Min - ektFk: Ekt - packingOut: Package out - landing: Landing - isExcludedFromAvailable: Es inventory - params: - toShipped: To - fromShipped: From - warehouseiNFk: Warehouse - daysOnward: Days onward - daysAgo: Days ago - warehouseInFk: Warehouse in ticket: params: ticketFk: Ticket ID diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 2d3077b78..786236617 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -389,80 +389,6 @@ cau: subtitle: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc inputLabel: Explique el motivo por el que no deberia aparecer este fallo askPrivileges: Solicitar permisos -entry: - list: - newEntry: Nueva entrada - tableVisibleColumns: - created: Creación - supplierFk: Proveedor - isBooked: Asentado - isConfirmed: Confirmado - isOrdered: Pedida - companyFk: Empresa - travelFk: Envio - isExcludedFromAvailable: Inventario - invoiceAmount: Importe - summary: - commission: Comisión - currency: Moneda - invoiceNumber: Núm. factura - ordered: Pedida - booked: Contabilizada - excludedFromAvailable: Inventario - travelReference: Referencia - travelAgency: Agencia - travelShipped: F. envio - travelWarehouseOut: Alm. salida - travelDelivered: Enviada - travelLanded: F. entrega - travelReceived: Recibida - buys: Compras - stickers: Etiquetas - package: Embalaje - packing: Pack. - grouping: Group. - buyingValue: Coste - import: Importe - pvp: PVP - basicData: - travel: Envío - currency: Moneda - observation: Observación - commission: Comisión - booked: Asentado - excludedFromAvailable: Inventario - buys: - observations: Observaciónes - packagingFk: Embalaje - color: Color - printedStickers: Etiquetas impresas - notes: - observationType: Tipo de observación - latestBuys: - tableVisibleColumns: - image: Foto - itemFk: Id Artículo - weightByPiece: Peso (gramos)/tallo - isActive: Activo - family: Familia - entryFk: Entrada - freightValue: Porte - comissionValue: Comisión - packageValue: Embalaje - isIgnored: Ignorado - price2: Grouping - price3: Packing - minPrice: Min - ektFk: Ekt - packingOut: Embalaje envíos - landing: Llegada - isExcludedFromAvailable: Es inventario - params: - toShipped: Hasta - fromShipped: Desde - warehouseInFk: Alm. entrada - daysOnward: Días adelante - daysAgo: Días atras ticket: params: ticketFk: ID de ticket diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 6afce1edf..ea6f1a621 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -200,7 +200,7 @@ const columns = computed(() => [ :data-key="dataKey" :create="{ urlCreate: 'Entries', - title: t('Create entry'), + title: t('entry.list.newEntry'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: {}, }" @@ -248,11 +248,3 @@ const columns = computed(() => [ - - -es: - Virtual entry: Es una redada - Search entries: Buscar entradas - You can search by entry reference: Puedes buscar por referencia de la entrada - Create entry: Crear entrada - diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 565989e13..5d0162fe2 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -1,10 +1,79 @@ entry: + list: + newEntry: New entry + tableVisibleColumns: + created: Creation + supplierFk: Supplier + isBooked: Booked + isConfirmed: Confirmed + isOrdered: Ordered + companyFk: Company + travelFk: Travel + isExcludedFromAvailable: Inventory + invoiceAmount: Import + inventoryEntry: Inventory entry + summary: + commission: Commission + currency: Currency + invoiceNumber: Invoice number + ordered: Ordered + booked: Booked + excludedFromAvailable: Inventory + travelReference: Reference + travelAgency: Agency + travelShipped: Shipped + travelDelivered: Delivered + travelLanded: Landed + travelReceived: Received + buys: Buys + stickers: Stickers + package: Package + packing: Pack. + grouping: Group. + buyingValue: Buying value + import: Import + pvp: PVP + basicData: + travel: Travel + currency: Currency + commission: Commission + observation: Observation + booked: Booked + excludedFromAvailable: Inventory + buys: + observations: Observations + packagingFk: Box + color: Color + printedStickers: Printed stickers + notes: + observationType: Observation type + latestBuys: + tableVisibleColumns: + image: Picture + itemFk: Item ID + weightByPiece: Weight/Piece + isActive: Active + family: Family + entryFk: Entry + freightValue: Freight value + comissionValue: Commission value + packageValue: Package value + isIgnored: Is ignored + price2: Grouping + price3: Packing + minPrice: Min + ektFk: Ekt + packingOut: Package out + landing: Landing + isExcludedFromAvailable: Es inventory + params: + toShipped: To + fromShipped: From + daysOnward: Days onward + daysAgo: Days ago + warehouseInFk: Warehouse in search: Search entries searchInfo: You can search by entry reference -entryList: - list: - inventoryEntry: Inventory entry - showEntryReport: Show entry report entryFilter: filter: search: General search diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index f6e8a8b7c..064dcbfd9 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -1,10 +1,80 @@ entry: + list: + newEntry: Nueva entrada + tableVisibleColumns: + created: Creación + supplierFk: Proveedor + isBooked: Asentado + isConfirmed: Confirmado + isOrdered: Pedida + companyFk: Empresa + travelFk: Envio + isExcludedFromAvailable: Inventario + invoiceAmount: Importe + inventoryEntry: Es inventario + summary: + commission: Comisión + currency: Moneda + invoiceNumber: Núm. factura + ordered: Pedida + booked: Contabilizada + excludedFromAvailable: Inventario + travelReference: Referencia + travelAgency: Agencia + travelShipped: F. envio + travelWarehouseOut: Alm. salida + travelDelivered: Enviada + travelLanded: F. entrega + travelReceived: Recibida + buys: Compras + stickers: Etiquetas + package: Embalaje + packing: Pack. + grouping: Group. + buyingValue: Coste + import: Importe + pvp: PVP + basicData: + travel: Envío + currency: Moneda + observation: Observación + commission: Comisión + booked: Asentado + excludedFromAvailable: Inventario + buys: + observations: Observaciónes + packagingFk: Embalaje + color: Color + printedStickers: Etiquetas impresas + notes: + observationType: Tipo de observación + latestBuys: + tableVisibleColumns: + image: Foto + itemFk: Id Artículo + weightByPiece: Peso (gramos)/tallo + isActive: Activo + family: Familia + entryFk: Entrada + freightValue: Porte + comissionValue: Comisión + packageValue: Embalaje + isIgnored: Ignorado + price2: Grouping + price3: Packing + minPrice: Min + ektFk: Ekt + packingOut: Embalaje envíos + landing: Llegada + isExcludedFromAvailable: Es inventario + params: + toShipped: Hasta + fromShipped: Desde + warehouseInFk: Alm. entrada + daysOnward: Días adelante + daysAgo: Días atras search: Buscar entradas searchInfo: Puedes buscar por referencia de entrada -entryList: - list: - inventoryEntry: Es inventario - showEntryReport: Ver informe del pedido entryFilter: filter: search: Búsqueda general From 4b3c78dd658018c73375b8480243281af74c5d73 Mon Sep 17 00:00:00 2001 From: provira Date: Thu, 16 Jan 2025 12:40:28 +0100 Subject: [PATCH 07/11] fix: refs #8243 fixed SkeletonSummary --- src/components/ui/SkeletonSummary.vue | 71 ++++++++++++++++----------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/src/components/ui/SkeletonSummary.vue b/src/components/ui/SkeletonSummary.vue index e8407ee7b..659d4c53d 100644 --- a/src/components/ui/SkeletonSummary.vue +++ b/src/components/ui/SkeletonSummary.vue @@ -1,38 +1,49 @@ From eed895b21c35944438f44a446bf98ec2647013cd Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 16 Jan 2025 13:25:00 +0100 Subject: [PATCH 08/11] fix: redirect to TicketSale from OrderLines --- src/pages/Order/Card/OrderLines.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/Order/Card/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue index 6093addb5..9d802c557 100644 --- a/src/pages/Order/Card/OrderLines.vue +++ b/src/pages/Order/Card/OrderLines.vue @@ -208,6 +208,20 @@ async function remove(item) { async function handleConfirm() { const result = await confirm(route.params.id); if (result) { + const sale = await axios.get(`OrderRows`, { + params: { + filter: JSON.stringify({ + where: { orderFk: route.params.id }, + }), + }, + }); + const ticket = await axios.get(`Sales`, { + params: { + filter: JSON.stringify({ + where: { id: sale.data[0].saleFk }, + }), + }, + }); quasar.notify({ message: t('globals.dataSaved'), type: 'positive', @@ -215,7 +229,7 @@ async function handleConfirm() { router.push({ name: 'TicketSale', query: { - table: JSON.stringify({ id: route.params.id }), + table: JSON.stringify({ id: ticket.data[0].ticketFk }), }, }); } From 972b377e131fb7b110eb82658c269ebedaaa3974 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 17 Jan 2025 07:35:23 +0100 Subject: [PATCH 09/11] fix: redirect when confirming lines --- src/pages/Order/Card/OrderLines.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/Order/Card/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue index 9d802c557..2c9b1618b 100644 --- a/src/pages/Order/Card/OrderLines.vue +++ b/src/pages/Order/Card/OrderLines.vue @@ -227,10 +227,7 @@ async function handleConfirm() { type: 'positive', }); router.push({ - name: 'TicketSale', - query: { - table: JSON.stringify({ id: ticket.data[0].ticketFk }), - }, + path: `/ticket/${ticket.data[0].ticketFk}/sale?table={"filter":{"limit":20,"skip":0}}`, }); } } From c2cbcb330950f05059868f85c9f026a305fd6d7a Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 17 Jan 2025 08:58:25 +0100 Subject: [PATCH 10/11] refactor: refs #8316 add new localization keys and update existing ones for entry components --- src/i18n/locale/en.yml | 3 ++ src/i18n/locale/es.yml | 4 ++ src/pages/Entry/EntryFilter.vue | 61 +++++++--------------------- src/pages/Entry/EntryLatestBuys.vue | 9 +--- src/pages/Entry/EntryStockBought.vue | 35 +++++----------- src/pages/Entry/MyEntries.vue | 8 +--- src/pages/Entry/locale/en.yml | 26 +++++++++++- src/pages/Entry/locale/es.yml | 26 +++++++++++- 8 files changed, 87 insertions(+), 85 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 80f18238d..7c733eae8 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -816,7 +816,10 @@ components: hasMinPrice: Minimum price # LatestBuysFilter salesPersonFk: Buyer + supplierFk: Supplier from: From + to: To + visible: Is visible active: Is active floramondo: Is floramondo showBadDates: Show future items diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 786236617..d13ccf3f9 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -816,7 +816,11 @@ components: wareHouseFk: Almacén # LatestBuysFilter salesPersonFk: Comprador + supplierFk: Proveedor + visible: Visible active: Activo + from: Desde + to: Hasta floramondo: Floramondo showBadDates: Ver items a futuro userPanel: diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue index f91f7f128..bc8b40aaa 100644 --- a/src/pages/Entry/EntryFilter.vue +++ b/src/pages/Entry/EntryFilter.vue @@ -40,7 +40,7 @@ const companiesOptions = ref([]); @@ -49,7 +49,7 @@ const companiesOptions = ref([]); @@ -58,7 +58,7 @@ const companiesOptions = ref([]); @@ -67,7 +67,7 @@ const companiesOptions = ref([]); @@ -76,7 +76,7 @@ const companiesOptions = ref([]); @@ -84,7 +84,7 @@ const companiesOptions = ref([]); @@ -194,7 +194,7 @@ const companiesOptions = ref([]); @@ -202,35 +202,4 @@ const companiesOptions = ref([]); - - - -en: - params: - - invoiceNumber: Invoice number - travelFk: Travel - companyFk: Company - currencyFk: Currency - supplierFk: Supplier - from: From - to: To - created: Created - isBooked: Booked - isConfirmed: Confirmed - isOrdered: Ordered -es: - params: - - invoiceNumber: Núm. factura - travelFk: Envío - companyFk: Empresa - currencyFk: Moneda - supplierFk: Proveedor - from: Desde - to: Hasta - created: Fecha creación - isBooked: Asentado - isConfirmed: Confirmado - isOrdered: Pedida - + \ No newline at end of file diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index 450efe624..73fdcbbbf 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -102,7 +102,7 @@ const columns = [ }, { align: 'left', - label: t('globals.weightByPiece'), + label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'), name: 'weightByPiece', columnFilter: { component: 'number', @@ -157,7 +157,7 @@ const columns = [ }, { align: 'left', - label: t('entry.buys.packageValue'), + label: t('entry.latestBuys.tableVisibleColumns.packageValue'), name: 'packageValue', columnFilter: { component: 'number', @@ -262,8 +262,3 @@ onUnmounted(() => (stateStore.rightDrawer = false)); :right-search="false" /> - - -es: - Edit buy(s): Editar compra(s) - diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue index 3f0cd2d99..fa0bdc12e 100644 --- a/src/pages/Entry/EntryStockBought.vue +++ b/src/pages/Entry/EntryStockBought.vue @@ -1,5 +1,5 @@