8381-thermographTravel #1244

Open
jgallego wants to merge 5 commits from 8381-thermographTravel into dev
1 changed files with 3 additions and 14 deletions
Showing only changes of commit 579e675a22 - Show all commits

View File

@ -19,16 +19,8 @@ const quasar = useQuasar();
const router = useRouter(); const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify(); const { notify } = useNotify();
const { store: travelStore, fetch: fetchTravel } = useArrayData('SingleTravel', {
url: 'Travels', const travel = computed(() => useArrayData('Travel1').store.data);
limit: 1,
filter: {
fields: ['id', 'agencyModeFk'],
where: { id: route.params.id },
},
// Si quisieras guardar en la URL, podrías usar searchUrl: 'travelSearch'
});
const travelItem = computed(() => travelStore.data?.[0] ?? null);
const thermographPaginateRef = ref(); const thermographPaginateRef = ref();
const warehouses = ref([]); const warehouses = ref([]);
@ -142,7 +134,7 @@ const redirectToThermographForm = (action, id) => {
if (action === 'edit' && id) { if (action === 'edit' && id) {
routeDetails.query = { travelThermographFk: id }; routeDetails.query = { travelThermographFk: id };
} else if (action === 'create') { } else if (action === 'create') {
routeDetails.query = { agencyModeFk: travelItem.value?.agencyModeFk }; routeDetails.query = { agencyModeFk: travel.value?.agencyModeFk };
} }
router.push(routeDetails); router.push(routeDetails);
}; };
@ -152,9 +144,6 @@ const removeThermograph = async (id) => {
await thermographPaginateRef.value.fetch(); await thermographPaginateRef.value.fetch();
notify(t('Thermograph removed'), 'positive'); notify(t('Thermograph removed'), 'positive');
}; };
onMounted(() => {
fetchTravel({});
});
</script> </script>
<template> <template>