diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a679cdfc..51dd2010c 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). +## [2414.01] - 2024-04-04 + +### Added + +- (Tickets) => Se añade la opción de clonar ticket. #6951 + +### Changed + +### Fixed + ## [2400.01] - 2024-01-04 ### Added diff --git a/README.md b/README.md index 86fe11ca7..e87a84d60 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ Lilium frontend ## Install the dependencies ```bash -bun install +pnpm install ``` ### Install quasar cli ```bash -sudo bun install -g @quasar/cli +sudo npm install -g @quasar/cli ``` ### Start the app in development mode (hot-code reloading, error reporting, etc.) @@ -23,13 +23,13 @@ quasar dev ### Run unit tests ```bash -bun run test:unit +pnpm run test:unit ``` ### Run e2e tests ```bash -npm run test:e2e +pnpm run test:e2e ``` ### Build the app for production diff --git a/package.json b/package.json index 8bfeb9e43..a35020b66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.12.0", + "version": "24.14.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -35,7 +35,7 @@ "@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0", "@vue/test-utils": "^2.4.4", "autoprefixer": "^10.4.14", - "cypress": "^12.13.0", + "cypress": "^13.6.6", "eslint": "^8.41.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-cypress": "^2.13.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07896c006..f3fe7df55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,8 +59,8 @@ devDependencies: specifier: ^10.4.14 version: 10.4.17(postcss@8.4.35) cypress: - specifier: ^12.13.0 - version: 12.17.4 + specifier: ^13.6.6 + version: 13.6.6 eslint: specifier: ^8.41.0 version: 8.56.0 @@ -124,8 +124,8 @@ packages: resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==} dev: true - /@cypress/request@2.88.12: - resolution: {integrity: sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==} + /@cypress/request@3.0.1: + resolution: {integrity: sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==} engines: {node: '>= 6'} dependencies: aws-sign2: 0.7.0 @@ -1228,10 +1228,6 @@ packages: '@types/node': 20.11.19 dev: false - /@types/node@16.18.82: - resolution: {integrity: sha512-pcDZtkx9z8XYV+ius2P3Ot2VVrcYOfXffBQUBuiszrlUzKSmoDYqo+mV+IoL8iIiIjjtOMvNSmH1hwJ+Q+f96Q==} - dev: true - /@types/node@20.11.19: resolution: {integrity: sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==} dependencies: @@ -2248,15 +2244,14 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - /cypress@12.17.4: - resolution: {integrity: sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==} - engines: {node: ^14.0.0 || ^16.0.0 || >=18.0.0} + /cypress@13.6.6: + resolution: {integrity: sha512-S+2S9S94611hXimH9a3EAYt81QM913ZVA03pUmGDfLTFa5gyp85NJ8dJGSlEAEmyRsYkioS1TtnWtbv/Fzt11A==} + engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true requiresBuild: true dependencies: - '@cypress/request': 2.88.12 + '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/node': 16.18.82 '@types/sinonjs__fake-timers': 8.1.1 '@types/sizzle': 2.3.8 arch: 2.2.0 diff --git a/quasar.config.js b/quasar.config.js index 3e98e3618..5ce46667c 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,8 +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','quasar','setDefaults', 'validations'], + boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar.defaults'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], @@ -68,7 +67,7 @@ module.exports = configure(function (/* ctx */) { // analyze: true, // env: {}, rawDefine: { - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), }, // ignorePublicFolder: true, // minify: false, @@ -93,7 +92,7 @@ module.exports = configure(function (/* ctx */) { vitePlugins: [ [ VueI18nPlugin({ - runtimeOnly: false + runtimeOnly: false, }), { // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false` @@ -118,15 +117,13 @@ module.exports = configure(function (/* ctx */) { secure: false, }, }, + open: false, }, // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework framework: { config: { config: { - brand: { - primary: 'orange', - }, dark: 'auto', }, }, diff --git a/src/boot/axios.js b/src/boot/axios.js index c58cc2d08..e3e7289af 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -11,7 +11,7 @@ axios.defaults.baseURL = '/api/'; const onRequest = (config) => { const token = session.getToken(); - if (token.length && config.headers) { + if (token.length && !config.headers.Authorization) { config.headers.Authorization = token; } diff --git a/src/boot/defaults/qTable.js b/src/boot/defaults/qTable.js new file mode 100644 index 000000000..8902d4266 --- /dev/null +++ b/src/boot/defaults/qTable.js @@ -0,0 +1,5 @@ +import { QTable } from 'quasar'; +import setDefault from './setDefault'; + +setDefault(QTable, 'pagination', { rowsPerPage: 0 }); +setDefault(QTable, 'hidePagination', true); diff --git a/src/boot/defaults/setDefault.js b/src/boot/defaults/setDefault.js new file mode 100644 index 000000000..7d56a1a3e --- /dev/null +++ b/src/boot/defaults/setDefault.js @@ -0,0 +1,18 @@ +export default function (component, key, value) { + const prop = component.props[key]; + switch (typeof prop) { + case 'object': + prop.default = value; + break; + case 'function': + component.props[key] = { + type: prop, + default: value, + }; + break; + case 'undefined': + throw new Error('unknown prop: ' + key); + default: + throw new Error('unhandled type: ' + typeof prop); + } +} diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index 5e06497c5..bcad86745 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -1,22 +1,25 @@ -import { QForm } from 'quasar'; import { getCurrentInstance } from 'vue'; +const filterAvailableInput = (element) => + element.classList.contains('q-field__native') && !element.disabled; +const filterAvailableText = (element) => + element.__vueParentComponent.type.name === 'QInput' && + element.__vueParentComponent?.attrs?.class !== 'vn-input-date'; + export default { - inject: { QForm }, - component: { QForm }, - components: { QForm }, - extends: { QForm }, mounted: function () { const vm = getCurrentInstance(); if (vm.type.name === 'QForm') - if (this.$el?.id !== 'searchbarForm') { - let that = this; + if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) { + // AUTOFOCUS + const elementsArray = Array.from(this.$el.elements); + const firstInputElement = elementsArray + .filter(filterAvailableInput) + .find(filterAvailableText); - document.addEventListener('keyup', function (evt) { - if (evt.keyCode === 13) { - that.onSubmit(); - } - }); + if (firstInputElement) { + firstInputElement.focus(); + } } }, }; diff --git a/src/boot/quasar.defaults.js b/src/boot/quasar.defaults.js new file mode 100644 index 000000000..c792100d7 --- /dev/null +++ b/src/boot/quasar.defaults.js @@ -0,0 +1 @@ +export * from './defaults/qTable'; diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 106dbec3a..2d098beb0 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -1,5 +1,5 @@