diff --git a/package.json b/package.json index c638b6c32..9d14e8727 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "axios": "^1.4.0", "chromium": "^3.0.3", "croppie": "^2.6.5", + "moment": "^2.30.1", "pinia": "^2.1.3", "quasar": "^2.14.5", "validator": "^13.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83dfa0469..7bf640347 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ dependencies: croppie: specifier: ^2.6.5 version: 2.6.5 + moment: + specifier: ^2.30.1 + version: 2.30.1 pinia: specifier: ^2.1.3 version: 2.1.7(typescript@5.5.4)(vue@3.4.19) @@ -832,8 +835,8 @@ packages: vue-i18n: optional: true dependencies: - '@intlify/message-compiler': 10.0.0 - '@intlify/shared': 10.0.0 + '@intlify/message-compiler': 11.0.0-rc.1 + '@intlify/shared': 11.0.0-rc.1 jsonc-eslint-parser: 1.4.1 source-map: 0.6.1 vue-i18n: 9.9.1(vue@3.4.19) @@ -847,11 +850,11 @@ packages: '@intlify/message-compiler': 9.9.1 '@intlify/shared': 9.9.1 - /@intlify/message-compiler@10.0.0: - resolution: {integrity: sha512-OcaWc63NC/9p1cMdgoNKBj4d61BH8sUW1Hfs6YijTd9656ZR4rNqXAlRnBrfS5ABq0vjQjpa8VnyvH9hK49yBw==} + /@intlify/message-compiler@11.0.0-rc.1: + resolution: {integrity: sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==} engines: {node: '>= 16'} dependencies: - '@intlify/shared': 10.0.0 + '@intlify/shared': 11.0.0-rc.1 source-map-js: 1.0.2 dev: true @@ -862,8 +865,8 @@ packages: '@intlify/shared': 9.9.1 source-map-js: 1.0.2 - /@intlify/shared@10.0.0: - resolution: {integrity: sha512-6ngLfI7DOTew2dcF9WMJx+NnMWghMBhIiHbGg+wRvngpzD5KZJZiJVuzMsUQE1a5YebEmtpTEfUrDp/NqVGdiw==} + /@intlify/shared@11.0.0-rc.1: + resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==} engines: {node: '>= 16'} dev: true @@ -887,7 +890,7 @@ packages: optional: true dependencies: '@intlify/bundle-utils': 4.0.0(vue-i18n@9.9.1) - '@intlify/shared': 10.0.0 + '@intlify/shared': 11.0.0-rc.1 '@rollup/pluginutils': 4.2.1 '@vue/compiler-sfc': 3.4.19 debug: 4.3.4(supports-color@8.1.1) @@ -4960,6 +4963,10 @@ packages: uuid: 8.3.2 dev: true + /moment@2.30.1: + resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} + dev: false + /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 278c3514d..bf001c9ba 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -455,12 +455,26 @@ entry: 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 weekDay: Weekday agencyModeFk: Agency id: Worker + state: State + created: Created + externalId: External ID + counter: Counter + freightItemName: Freight item name + packageItemName: Package item name + longName: Long name card: customerId: Customer ID customerCard: Customer card diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 139486e03..2c95f936c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -456,12 +456,25 @@ entry: 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 weekDay: Salida agencyModeFk: Agencia id: Comercial + created: Creado + state: Estado + externalId: ID externo + counter: Contador + freightItemName: Nombre + packageItemName: Embalaje + longName: Descripción card: customerId: ID cliente customerCard: Ficha del cliente diff --git a/src/pages/Customer/locale/en.yml b/src/pages/Customer/locale/en.yml index 1d2497ded..1918838b7 100644 --- a/src/pages/Customer/locale/en.yml +++ b/src/pages/Customer/locale/en.yml @@ -95,6 +95,7 @@ customer: isToBeMailed: Mailing hasSepaVnl: VNL B2B received params: + id: Id isWorker: Is Worker payMethod: Payment Method workerFk: Author @@ -102,4 +103,15 @@ customer: created: Last Update Date creditInsurance: Credit Insurance defaulterSinced: Defaulted Since - hasRecovery: Has Recovery \ No newline at end of file + hasRecovery: Has Recovery + socialName: Social name + city: City + phone: Phone + postcode: Postcode + campaign: Campaign + grouped: Grouped + search: Contains + itemId: Item Id + ticketFk: Ticket Id + description: Description + quantity: Quantity diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml index 1b56f6805..d5db3df1b 100644 --- a/src/pages/Customer/locale/es.yml +++ b/src/pages/Customer/locale/es.yml @@ -97,6 +97,7 @@ customer: isToBeMailed: Env. emails hasSepaVnl: Recibido B2B VNL params: + id: ID isWorker: Es trabajador payMethod: F. Pago workerFk: Autor @@ -104,4 +105,15 @@ customer: created: Fecha Ú. O. creditInsurance: Crédito A. defaulterSinced: Desde - hasRecovery: Tiene recobro \ No newline at end of file + hasRecovery: Tiene recobro + socialName: Razón social + campaign: Campaña + city: Ciudad + phone: Teléfono + postcode: Código postal + grouped: Agrupado + search: Contiene + itemId: Id Artículo + ticketFk: Id Ticket + description: Descripción + quantity: Cantidad diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue index 3975bff19..a2d8c9117 100644 --- a/src/pages/Entry/EntryBuysTableDialog.vue +++ b/src/pages/Entry/EntryBuysTableDialog.vue @@ -1,24 +1,24 @@ +function downloadCSV(rows) { + const headers = ['id', 'itemFk', 'name', 'stickers', 'packing', 'comment']; + + const csvRows = rows.map((row) => { + const buy = row; + const item = buy.item || {}; + + return [ + buy.id, + buy.itemFk, + item.name || '', + buy.stickers, + buy.packing, + item.comment || '', + ].join(','); + }); + + const csvContent = [headers.join(','), ...csvRows].join('\n'); + + const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.setAttribute('download', `${entityId.value}data.csv`); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); +} +