diff --git a/CHANGELOG.md b/CHANGELOG.md index 555b4f0ba..c97c4181f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +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). +## [2418.01] + ## [2416.01] - 2024-04-18 ### Added +### Fixed + +- (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro + ## [2414.01] - 2024-04-04 ### Added diff --git a/cypress.config.js b/cypress.config.js index 1934f833e..e2046d6c4 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -3,6 +3,7 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:9000/', + experimentalStudio: true, fixturesFolder: 'test/cypress/fixtures', screenshotsFolder: 'test/cypress/screenshots', supportFile: 'test/cypress/support/index.js', diff --git a/package.json b/package.json index 82f21efe6..8398eb3f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.16.0", + "version": "24.18.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -32,6 +32,7 @@ "@intlify/unplugin-vue-i18n": "^0.8.1", "@pinia/testing": "^0.1.2", "@quasar/app-vite": "^1.7.3", + "@quasar/quasar-app-extension-qcalendar": "4.0.0-beta.15", "@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0", "@vue/test-utils": "^2.4.4", "autoprefixer": "^10.4.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3fe7df55..bdff559cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,6 +49,9 @@ devDependencies: '@quasar/app-vite': specifier: ^1.7.3 version: 1.7.3(eslint@8.56.0)(pinia@2.1.7)(quasar@2.14.5)(vue-router@4.2.5)(vue@3.4.19) + '@quasar/quasar-app-extension-qcalendar': + specifier: 4.0.0-beta.15 + version: 4.0.0-beta.15 '@quasar/quasar-app-extension-testing-unit-vitest': specifier: ^0.4.0 version: 0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19) @@ -912,6 +915,13 @@ packages: resolution: {integrity: sha512-SlOhwzXyPQHWgQIS2ncyDdYdksCJvUYNtgsDQqzAKEG3r3d/ejOxvThle79HTK3Q6HB+gQWFG21Ux00Osr5XSw==} dev: false + /@quasar/quasar-app-extension-qcalendar@4.0.0-beta.15: + resolution: {integrity: sha512-i6hQkcP70LXLfVMPZMKQjSg3681gjZmASV3vq6ULzc0LhtBiPneLdVNNtH2itkWxAmaUj+1heQDI5Pa0F7VKLQ==} + engines: {node: '>= 10.0.0', npm: '>= 5.6.0', yarn: '>= 1.6.0'} + dependencies: + '@quasar/quasar-ui-qcalendar': 4.0.0-beta.19 + dev: true + /@quasar/quasar-app-extension-testing-unit-vitest@0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19): resolution: {integrity: sha512-eyzdUdmZiCueNS+5nedjMmzdbpCetSrtdGIwW6KplW1dTzRbLiNvYUjpBOxQGmJCgEhWy9zuswJ7MZ/bTql24Q==} engines: {node: '>= 12.22.1', npm: '>= 6.14.12', yarn: '>= 1.17.3'} @@ -939,6 +949,10 @@ packages: - vite dev: true + /@quasar/quasar-ui-qcalendar@4.0.0-beta.19: + resolution: {integrity: sha512-BT0G2JjgKl1bqNrY5utcYeoy8gK+U9k3Pz1YDi1OB265W/jHU6nFoWMEUdY3JdvMccwkXTL2DLVyl3eqAUyLyg==} + dev: true + /@quasar/render-ssr-error@1.0.3: resolution: {integrity: sha512-A8RF99q6/sOSe1Ighnh5syEIbliD3qUYEJd2HyfFyBPSMF+WYGXon5dmzg4nUoK662NgOggInevkDyBDJcZugg==} engines: {node: '>= 16'} diff --git a/quasar.config.js b/quasar.config.js index 5ce46667c..dd7a91002 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -93,13 +93,11 @@ module.exports = configure(function (/* ctx */) { [ VueI18nPlugin({ runtimeOnly: false, + include: [ + path.resolve(__dirname, './src/i18n/locale/**'), + path.resolve(__dirname, './src/pages/**/locale/**'), + ], }), - { - // 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/quasar.extensions.json b/quasar.extensions.json index e5c5cbfaa..867769090 100644 --- a/quasar.extensions.json +++ b/quasar.extensions.json @@ -1,7 +1,6 @@ { - "@quasar/testing-unit-vitest": { - "options": [ - "scripts" - ] - } -} \ No newline at end of file + "@quasar/testing-unit-vitest": { + "options": ["scripts"] + }, + "@quasar/qcalendar": {} +} diff --git a/src/App.vue b/src/App.vue index d0d8c9358..27cc34c38 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,7 +16,7 @@ onMounted(() => { if (availableLocales.includes(userLang)) { locale.value = userLang; } else { - locale.value = fallbackLocale; + locale.value = fallbackLocale.value; } }); diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 47836c05b..02e84849c 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -28,8 +28,23 @@ const countriesOptions = ref([]); const provincesOptions = ref([]); const townsLocationOptions = ref([]); -const onDataSaved = (dataSaved) => { - emit('onDataSaved', dataSaved); +const onDataSaved = (formData) => { + const newPostcode = { + ...formData + }; + const townObject = townsLocationOptions.value.find( + ({id}) => id === formData.townFk + ); + newPostcode.town = townObject?.name; + const provinceObject = provincesOptions.value.find( + ({id}) => id === formData.provinceFk + ); + newPostcode.province = provinceObject?.name; + const countryObject = countriesOptions.value.find( + ({id}) => id === formData.countryFk + ); + newPostcode.country = countryObject?.country; + emit('onDataSaved', newPostcode); }; const onCityCreated = async ({ name, provinceFk }, formData) => { @@ -73,7 +88,7 @@ const onProvinceCreated = async ({ name }, formData) => { :title="t('New postcode')" :subtitle="t('Please, ensure you put the correct data!')" :form-initial-data="postcodeFormData" - @on-data-saved="onDataSaved($event)" + @on-data-saved="onDataSaved" > diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index cb2e8d98e..1a3a087c0 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -63,7 +63,6 @@ const props = defineProps({ }); const emit = defineEmits(['onFetch', 'onPaginate']); -defineExpose({ fetch }); const isLoading = ref(false); const pagination = ref({ sortBy: props.order, @@ -80,6 +79,7 @@ const arrayData = useArrayData(props.dataKey, { userParams: props.userParams, exprBuilder: props.exprBuilder, }); +const hasMoreData = ref(); const store = arrayData.store; onMounted(() => { @@ -96,6 +96,10 @@ watch( () => route.params.id, () => arrayData.reloadRoute() ); +const addFilter = async (filter, params) => { + await arrayData.addFilter({ filter, params }); +}; + async function fetch() { await arrayData.fetch({ append: false }); if (!arrayData.hasMoreData.value) { @@ -111,11 +115,10 @@ async function paginate() { isLoading.value = true; await arrayData.loadMore(); - if (!arrayData.hasMoreData.value) { if (store.userParamsChanged) arrayData.hasMoreData.value = true; store.userParamsChanged = false; - isLoading.value = false; + endPagination(); return; } @@ -125,12 +128,15 @@ async function paginate() { pagination.value.sortBy = sortBy; pagination.value.descending = descending; - isLoading.value = false; + endPagination(); +} +function endPagination() { + hasMoreData.value = arrayData.hasMoreData.value; + isLoading.value = false; emit('onFetch', store.data); emit('onPaginate'); } - async function onLoad(index, done) { if (!store.data) { return done(); @@ -145,6 +151,8 @@ async function onLoad(index, done) { if (store.userParamsChanged) isDone = !arrayData.hasMoreData.value; done(isDone); } + +defineExpose({ fetch, addFilter }); es: diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue index 8f8213f1c..0e53fbed7 100644 --- a/src/pages/InvoiceIn/InvoiceInFilter.vue +++ b/src/pages/InvoiceIn/InvoiceInFilter.vue @@ -29,6 +29,7 @@ const suppliersRef = ref(); order="nickname" limit="30" @on-fetch="(data) => (suppliers = data)" + auto-load /> diff --git a/src/pages/Item/ItemCreate.vue b/src/pages/Item/ItemCreate.vue new file mode 100644 index 000000000..18e7522cb --- /dev/null +++ b/src/pages/Item/ItemCreate.vue @@ -0,0 +1,170 @@ + + + diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index 49a5dbb64..3e399e29f 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -1 +1,577 @@ - + + + + + +es: + New item: Nuevo artículo + All it's properties will be copied: Todas sus propiedades serán copiadas + Do you want to clone this item?: ¿Desea clonar este artículo? + Clone: Clonar + Preview: Vista previa + diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue index f920854c6..fcde51edf 100644 --- a/src/pages/Login/LoginMain.vue +++ b/src/pages/Login/LoginMain.vue @@ -55,7 +55,7 @@ async function onSubmit() { if (res.response?.data?.error?.code === 'REQUIRES_2FA') { Notify.create({ message: t('login.twoFactorRequired'), - icon: 'phonelink_lock', + icon: 'phoneLink_lock', type: 'warning', }); params.keepLogin = keepLogin.value; diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue index 1c770194a..60e86d04e 100644 --- a/src/pages/Order/Card/OrderDescriptor.vue +++ b/src/pages/Order/Card/OrderDescriptor.vue @@ -61,7 +61,7 @@ const data = ref(useCardDescription()); const setData = (entity) => { if (!entity) return; data.value = useCardDescription(entity.client.name, entity.id); - state.set('ClaimDescriptor', entity); + state.set('OrderDescriptor', entity); }; const getConfirmationValue = (isConfirmed) => { diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index b1d5d4159..4053b57c7 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -277,7 +277,6 @@ function navigateToRoadmapSummary(event, row) { .route-list { width: 100%; } - .table-actions { gap: 12px; } diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue index 9d00ba8f7..4cd1f46f5 100644 --- a/src/pages/Supplier/Card/SupplierSummary.vue +++ b/src/pages/Supplier/Card/SupplierSummary.vue @@ -1,10 +1,9 @@