From 2537e58ff3839f7ab901ca6c31bd0de7a617892e Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 20 Sep 2024 09:56:04 +0200 Subject: [PATCH 1/3] fix: refs #7524 dynamic fetch --- .../Travel/Card/TravelThermographsForm.vue | 35 +++++-------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue index 7f40873b1..c61e8c46f 100644 --- a/src/pages/Travel/Card/TravelThermographsForm.vue +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -28,18 +28,8 @@ const route = useRoute(); const router = useRouter(); const state = useState(); const { notify } = useNotify(); - -const thermographFilter = { - fields: ['thermographFk'], - where: { - travelFk: null, - }, - order: 'thermographFk ASC', -}; -const fetchTravelThermographsRef = ref(null); const allowedContentTypes = ref(''); const user = state.getUser(); -const thermographsOptions = ref([]); const dmsTypesOptions = ref([]); const companiesOptions = ref([]); const warehousesOptions = ref([]); @@ -166,26 +156,13 @@ const updateThermograph = async () => { console.error('Error creating thermograph'); } }; - -const onThermographCreated = async (data) => { - await fetchTravelThermographsRef.value.fetch(); - thermographForm.thermographId = data.thermographId; -}; - - es: Select files: Selecciona ficheros From 3b709c20cf13389c85880a7165d240f9eb45a1e0 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 20 Sep 2024 10:05:28 +0200 Subject: [PATCH 2/3] fix: refs #7524 use id --- src/pages/Travel/Card/TravelThermographsForm.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue index c61e8c46f..d8dc6edc8 100644 --- a/src/pages/Travel/Card/TravelThermographsForm.vue +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -228,9 +228,7 @@ const updateThermograph = async () => { From b2cc74d890770aa0aa1c204bf36cdee06d828ca5 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 20 Sep 2024 10:27:24 +0200 Subject: [PATCH 3/3] fix: refs #7524 use id --- src/pages/Travel/Card/TravelThermographsForm.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue index d8dc6edc8..4f16b0a49 100644 --- a/src/pages/Travel/Card/TravelThermographsForm.vue +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -156,6 +156,10 @@ const updateThermograph = async () => { console.error('Error creating thermograph'); } }; + +const onThermographCreated = async (data) => { + thermographForm.thermographId = data.id; +};