diff --git a/CHANGELOG.md b/CHANGELOG.md index e34523545..fd8a900b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- (Worker) => Se crea la sección Taquilla + ### Fixed - (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index b18433d4e..2c2acb61c 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -156,9 +156,12 @@ const startFormWatcher = () => { async function fetch() { try { - const { data } = await axios.get($props.url, { + let { data } = await axios.get($props.url, { params: { filter: JSON.stringify($props.filter) }, }); + + if (Array.isArray(data)) data = data[0] ?? {}; + state.set($props.model, data); originalData.value = data && JSON.parse(JSON.stringify(data)); diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 6d0badffb..a062e4d80 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -1,5 +1,5 @@