diff --git a/CHANGELOG.md b/CHANGELOG.md index 243d67a34..3316aa441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2352.01] - 2023-12-28 + +### Added +- (carros) => Se añade contador de carros. #6545 +- (Reclamaciones) => Se añade la sección para hacer acciones sobre una reclamación. #5654 +### Changed +### Fixed +- (Reclamaciones) => Se corrige el color de la barra según el tema y el evento de actualziar cantidades #6334 + + ## [2253.01] - 2023-01-05 ### Added diff --git a/cypress.config.js b/cypress.config.js index 2b5b40d08..1934f833e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -8,7 +8,7 @@ module.exports = defineConfig({ supportFile: 'test/cypress/support/index.js', videosFolder: 'test/cypress/videos', video: false, - specPattern: 'test/cypress/integration/*.spec.js', + specPattern: 'test/cypress/integration/**/*.spec.js', experimentalRunAllSpecs: true, component: { componentFolder: 'src', diff --git a/package-lock.json b/package-lock.json index c541ee00e..9db93eff3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "salix-front", - "version": "23.48.01", + "version": "23.52.01", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "salix-front", - "version": "23.48.01", + "version": "23.52.01", "dependencies": { "@quasar/cli": "^2.3.0", "@quasar/extras": "^1.16.4", diff --git a/package.json b/package.json index 799401c08..bfaba6f10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "23.48.01", + "version": "23.52.01", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -9,7 +9,7 @@ "lint": "eslint --ext .js,.vue ./", "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore", "test:e2e": "cypress open", - "test:e2e:ci": "cd ../salix && gulp docker && cd ../salix-front && cypress run --browser chromium", + "test:e2e:ci": "cd ../salix && gulp docker && cd ../salix-front && cypress run", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", "test:unit": "vitest", "test:unit:ci": "vitest run" @@ -53,4 +53,4 @@ "vite": "^4.3.5", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/quasar.config.js b/quasar.config.js index cbcbae4dc..755e96bd3 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files - boot: ['i18n', 'axios', 'vnDate'], + boot: ['i18n', 'axios', 'vnDate', 'validations'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], @@ -66,7 +66,9 @@ module.exports = configure(function (/* ctx */) { // publicPath: '/', // analyze: true, // env: {}, - // rawDefine: {} + rawDefine: { + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) + }, // ignorePublicFolder: true, // minify: false, // polyfillModulePreload: true, @@ -89,11 +91,12 @@ module.exports = configure(function (/* ctx */) { vitePlugins: [ [ - VueI18nPlugin, + VueI18nPlugin({ + runtimeOnly: false + }), { // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false` // compositionOnly: false, - // you need to set i18n resource including paths ! include: path.resolve(__dirname, './src/i18n/**'), }, diff --git a/src/boot/validations.js b/src/boot/validations.js new file mode 100644 index 000000000..31e232f86 --- /dev/null +++ b/src/boot/validations.js @@ -0,0 +1,6 @@ +import { boot } from 'quasar/wrappers'; +import { useValidationsStore } from 'src/stores/useValidationsStore'; + +export default boot(async ({ store }) => { + await useValidationsStore(store).fetchModels(); +}); diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index a5156dc79..75353a35a 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -136,6 +136,10 @@ async function saveChanges(data) { hasChanges.value = false; isLoading.value = false; emit('saveChanges', data); + quasar.notify({ + type: 'positive', + message: t('globals.dataSaved'), + }); } async function insert() { diff --git a/src/components/common/SendEmailDialog.vue b/src/components/common/SendEmailDialog.vue index ab83c0949..501c48a4d 100644 --- a/src/components/common/SendEmailDialog.vue +++ b/src/components/common/SendEmailDialog.vue @@ -1,7 +1,9 @@ + + diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue new file mode 100644 index 000000000..e3040a698 --- /dev/null +++ b/src/components/common/VnInput.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue new file mode 100644 index 000000000..8e0ef2890 --- /dev/null +++ b/src/components/common/VnInputDate.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/components/common/VnJsonValue.vue b/src/components/common/VnJsonValue.vue new file mode 100644 index 000000000..a2e858d0d --- /dev/null +++ b/src/components/common/VnJsonValue.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index b14aae7be..0949fb5cb 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -1,19 +1,25 @@ - en: - actions: - insert: Creates - update: Updates - delete: Deletes - models: - Claim: Claim - ClaimDms: Document - ClaimBeginning: Claimed Sales - ClaimObservation: Observation - Shelving: Shelving - properties: - id: ID - claimFk: Claim ID - saleFk: Sale ID - quantity: Quantity - observation: Observation - ticketCreated: Created - created: Created - isChargedToMana: Charged to mana - hasToPickUp: Has to pick Up - dmsFk: Document ID - text: Description - claimStateFk: Claim State - workerFk: Worker - clientFk: Customer - rma: RMA - responsibility: Responsibility - packages: Packages + to: To + pointRecord: View record at this point in time + recordChanges: show all record changes + tooltips: + search: Search by id or concept + changes: Search by changes + actions: + Creates: Creates + Edits: Edits + Deletes: Deletes + Accesses: Accesses + Users: + User: Usuario + All: Todo + System: Sistema + properties: + id: ID + claimFk: Claim ID + saleFk: Sale ID + quantity: Quantity + observation: Observation + ticketCreated: Created + created: Created + isChargedToMana: Charged to mana + hasToPickUp: Has to pick Up + dmsFk: Document ID + text: Description + claimStateFk: Claim State + workerFk: Worker + clientFk: Customer + rma: RMA + responsibility: Responsibility + packages: Packages es: - Audit logs: Registros de auditoría - Property: Propiedad - Before: Antes - After: Después - Yes: Si - Nothing: Nada - actions: - insert: Crea - update: Actualiza - delete: Elimina - models: - Claim: Reclamación - ClaimDms: Documento - ClaimBeginning: Línea reclamada - ClaimObservation: Observación - Shelving: Carro - properties: - id: ID - claimFk: ID reclamación - saleFk: ID linea de venta - quantity: Cantidad - observation: Observación - ticketCreated: Creado - created: Creado - isChargedToMana: Cargado a maná - hasToPickUp: Se debe recoger - dmsFk: ID documento - text: Descripción - claimStateFk: Estado de la reclamación - workerFk: Trabajador - clientFk: Cliente - rma: RMA - responsibility: Responsabilidad - packages: Bultos + to: Hasta + pointRecord: Ver el registro en este punto + recordChanges: Mostrar todos los cambios realizados en el registro + tooltips: + search: Buscar por identificador o concepto + changes: Buscar por cambios. Los atributos deben buscarse por su nombre interno, para obtenerlo situar el cursor sobre el atributo. + Audit logs: Registros de auditoría + Property: Propiedad + Before: Antes + After: Después + Yes: Si + Nothing: Nada + actions: + Creates: Crea + Edits: Modifica + Deletes: Elimina + Accesses: Accede + Users: + User: Usuario + All: Todo + System: Sistema + properties: + id: ID + claimFk: ID reclamación + saleFk: ID linea de venta + quantity: Cantidad + observation: Observación + ticketCreated: Creado + created: Creado + isChargedToMana: Cargado a maná + hasToPickUp: Se debe recoger + dmsFk: ID documento + text: Descripción + claimStateFk: Estado de la reclamación + workerFk: Trabajador + clientFk: Cliente + rma: RMA + responsibility: Responsabilidad + packages: Bultos diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 04f10ace9..568da613f 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -15,6 +15,10 @@ const $props = defineProps({ type: String, default: '', }, + filterOptions: { + type: Array, + default: () => [], + }, isClearable: { type: Boolean, default: true, @@ -32,18 +36,22 @@ function setOptions(data) { setOptions(options.value); const filter = (val, options) => { - const search = val.toLowerCase(); + const search = val.toString().toLowerCase(); - if (val === '') return options; + if (!search) return options; return options.filter((row) => { + if ($props.filterOptions.length) { + return $props.filterOptions.some((prop) => { + const propValue = String(row[prop]).toLowerCase(); + return propValue.includes(search); + }); + } + const id = row.id; - const name = row[$props.optionLabel].toLowerCase(); + const optionLabel = String(row[$props.optionLabel]).toLowerCase(); - const idMatches = id == search; - const nameMatches = name.indexOf(search) > -1; - - return idMatches || nameMatches; + return id == search || optionLabel.includes(search); }); }; @@ -85,6 +93,7 @@ const value = computed({ map-options use-input @filter="filterHandler" + hide-selected fill-input ref="vnSelectRef" > @@ -97,7 +106,7 @@ const value = computed({ /> diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue index 7f019927e..8bb8c3858 100644 --- a/src/components/common/VnSmsDialog.vue +++ b/src/components/common/VnSmsDialog.vue @@ -1,7 +1,9 @@