diff --git a/CHANGELOG.md b/CHANGELOG.md index d15ad787d..9f493764a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ 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). +## [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 a35020b66..82f21efe6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.14.0", + "version": "24.16.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", 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 d1b2f5ccb..9c110d282 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -78,6 +78,7 @@ const arrayData = useArrayData(props.dataKey, { userParams: props.userParams, exprBuilder: props.exprBuilder, }); +const hasMoreData = ref(); const store = arrayData.store; onMounted(() => { @@ -106,11 +107,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; } @@ -120,12 +120,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(); @@ -188,6 +191,9 @@ async function onLoad(index, done) { +
+ +
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 />