diff --git a/CHANGELOG.md b/CHANGELOG.md index 3316aa441..1a679cdfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,15 +5,26 @@ 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 +## [2400.01] - 2024-01-04 ### 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 +### Changed + +### Fixed + +## [2350.01] - 2023-12-14 + +### 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 diff --git a/package-lock.json b/package-lock.json index 9db93eff3..6a60c95c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "salix-front", - "version": "23.52.01", + "version": "24.02.01", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "salix-front", - "version": "23.52.01", + "version": "24.02.01", "dependencies": { "@quasar/cli": "^2.3.0", "@quasar/extras": "^1.16.4", diff --git a/package.json b/package.json index bfaba6f10..c4f5b828a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "23.52.01", + "version": "24.02.01", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/App.vue b/src/App.vue index 8e9bea2e4..d0d8c9358 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,11 @@ - - es: New postcode: Nuevo código postal Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos! - City: Ciudad + City: Población Province: Provincia Country: País Postcode: Código postal diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue index 3aea81596..b972db2c9 100644 --- a/src/components/CreateNewProvinceForm.vue +++ b/src/components/CreateNewProvinceForm.vue @@ -6,7 +6,7 @@ import FetchData from 'components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import VnInput from 'src/components/common/VnInput.vue'; -import FormModel from 'components/FormModel.vue'; +import FormModelPopup from './FormModelPopup.vue'; const emit = defineEmits(['onDataSaved']); @@ -17,17 +17,10 @@ const provinceFormData = reactive({ autonomyFk: null, }); -const closeButton = ref(null); -const isLoading = ref(false); const autonomiesOptions = ref([]); -const onDataSaved = () => { - emit('onDataSaved'); - closeForm(); -}; - -const closeForm = () => { - if (closeButton.value) closeButton.value.click(); +const onDataSaved = (dataSaved) => { + emit('onDataSaved', dataSaved); }; @@ -37,20 +30,15 @@ const closeForm = () => { auto-load url="Autonomies" /> - - - - es: - New postcode: Nuevo código postal + New province: Nueva provincia Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos! Name: Nombre Autonomy: Autonomía diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 75353a35a..17fc8fc4a 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -225,15 +225,19 @@ function getDifferences(obj1, obj2) { delete obj2.$index; for (let key in obj1) { - if (obj2[key] && obj1[key] !== obj2[key]) { + if (obj2[key] && JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])) { diff[key] = obj2[key]; } } for (let key in obj2) { - if (obj1[key] === undefined || obj1[key] !== obj2[key]) { + if ( + obj1[key] === undefined || + JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key]) + ) { diff[key] = obj2[key]; } } + return diff; } diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue index b8e7c2ac3..137f751db 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -30,7 +30,7 @@ const $props = defineProps({ params: { type: Object, default: null, - } + }, }); const emit = defineEmits(['onFetch']); @@ -42,9 +42,9 @@ onMounted(async () => { } }); -async function fetch() { +async function fetch(fetchFilter = {}) { try { - const filter = Object.assign({}, $props.filter); // eslint-disable-line vue/no-dupe-keys + const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys if ($props.where) filter.where = $props.where; if ($props.sortBy) filter.order = $props.sortBy; if ($props.limit) filter.limit = $props.limit; diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index e683ce735..a5560dfc0 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -97,9 +97,7 @@ const startFormWatcher = () => { watch( () => formData.value, (val) => { - if (!isResetting.value && val) { - hasChanges.value = true; - } + hasChanges.value = !isResetting.value && val; isResetting.value = false; }, { deep: true } @@ -137,12 +135,11 @@ async function save() { await axios.patch($props.urlUpdate || $props.url, body); } emit('onDataSaved', formData.value); + originalData.value = JSON.parse(JSON.stringify(formData.value)); + hasChanges.value = false; } catch (err) { notify('errors.create', 'negative'); } - - originalData.value = JSON.parse(JSON.stringify(formData.value)); - hasChanges.value = false; isLoading.value = false; } diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue new file mode 100644 index 000000000..04322a3c8 --- /dev/null +++ b/src/components/FormModelPopup.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 2368e078e..12366e174 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -24,11 +24,8 @@ const pinnedModulesRef = ref();