From a9a09ad0a3aa9f81639a98c88680308fc1ec542c Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 27 Dec 2024 13:58:35 +0100 Subject: [PATCH 01/12] 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(() => [ }, ]); + + en: inputMin: Must be more than {value} @@ -179,8 +187,3 @@ const handleInsertMode = (e) => { maxLength: El valor excede los {value} carácteres inputMax: Debe ser menor a {value} - diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index fdfd7ff9c..037940ffa 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -50,6 +50,9 @@ const columns = computed(() => [ isTitle: true, create: true, columnClass: 'expand', + attrs: { + uppercase: true, + }, }, { align: 'left', diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index c0748af87..f9238e361 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -24,8 +24,13 @@ const columns = computed(() => [ label: t('globals.name'), name: 'socialName', create: true, + attrs: { + uppercase: true, + }, columnFilter: { - name: 'search', + name: 'search',attrs: { + uppercase: false, + }, }, isTitle: true, }, diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 48393a8c7..0b784b993 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -138,7 +138,11 @@ function uppercaseStreetModel(data) { return { get: () => (data.street ? data.street.toUpperCase() : ''), set: (value) => { - data.street = value.toUpperCase(); + if (value) { + data.street = value.toUpperCase(); + } else { + data.street = null; + } }, }; } From f834f3b7549e9c3ea726fa78a72b897d9b7aa50d Mon Sep 17 00:00:00 2001 From: provira Date: Fri, 10 Jan 2025 07:52:22 +0100 Subject: [PATCH 04/12] feat: refs #8258 added button to pass to uppercase --- src/components/common/VnInput.vue | 28 ++++++++++++++++--- .../Customer/Card/CustomerFiscalData.vue | 1 + src/pages/Customer/CustomerList.vue | 5 ++++ .../Supplier/Card/SupplierFiscalData.vue | 1 + src/pages/Supplier/SupplierList.vue | 7 +++-- 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index c45f7d073..e921d8e1f 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -49,15 +49,11 @@ const $props = defineProps({ }); const vnInputRef = ref(null); -const showPassword = ref(false); const value = computed({ get() { return $props.modelValue; }, set(value) { - if ($props.uppercase && typeof value === 'string') { - value = value.toUpperCase(); - } if ($props.emptyToNull && value === '') value = null; emit('update:modelValue', value); }, @@ -124,6 +120,10 @@ const handleInsertMode = (e) => { input.setSelectionRange(cursorPos + 1, cursorPos + 1); }); }; + +const handleUppercase = () => { + value.value = value.value?.toUpperCase() || ''; +}; + + + en: + inputMin: Must be more than {value} + maxLength: The value exceeds {value} characters + inputMax: Must be less than {value} + es: + inputMin: Debe ser mayor a {value} + maxLength: El valor excede los {value} carácteres + inputMax: Debe ser menor a {value} + \ No newline at end of file diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue index aff7deda4..8f2c4efb0 100644 --- a/src/pages/Customer/Card/CustomerFiscalData.vue +++ b/src/pages/Customer/Card/CustomerFiscalData.vue @@ -44,6 +44,7 @@ function handleLocation(data, location) { :required="true" :rules="validate('client.socialName')" clearable + uppercase="true" v-model="data.socialName" > 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 08/12] 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 972b377e131fb7b110eb82658c269ebedaaa3974 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 17 Jan 2025 07:35:23 +0100 Subject: [PATCH 09/12] 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/12] 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 @@