0
0
Fork 0

Merge pull request 'fix: refs #7524 dynamic fetch' (!767) from 7524-dynamicFetch into dev

Reviewed-on: verdnatura/salix-front#767
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-10-03 10:06:57 +00:00
commit c78e816f0c
1 changed files with 6 additions and 17 deletions

View File

@ -30,18 +30,9 @@ const router = useRouter();
const state = useState();
const { notify } = useNotify();
const thermographFilter = {
fields: ['id', 'thermographFk'],
where: {
or: [{ travelFk: null }, { travelFk: route.params.id }],
},
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([]);
@ -172,13 +163,6 @@ const onThermographCreated = async (data) => {
auto-load
url="Temperatures"
/>
<FetchData
ref="fetchTravelThermographsRef"
url="TravelThermographs"
@on-fetch="(data) => (thermographsOptions = data)"
:filter="thermographFilter"
auto-load
/>
<QPage class="column items-center full-width">
<QForm
model="travel"
@ -214,7 +198,12 @@ const onThermographCreated = async (data) => {
<VnSelectDialog
:label="t('travel.thermographs.thermograph')"
v-model="thermographForm.travelThermographFk"
:options="thermographsOptions"
url="TravelThermographs"
:fields="['id', 'thermographFk']"
:where="{
or: [{ travelFk: null }, { travelFk: $route.params.id }],
}"
sort-by="thermographFk ASC"
option-label="thermographFk"
:disable="viewAction === 'edit'"
:tooltip="t('New thermograph')"