forked from verdnatura/salix-front
fix: refs #7524 dynamic fetch
This commit is contained in:
parent
9095c579db
commit
01b62adba9
|
@ -30,18 +30,9 @@ const router = useRouter();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const thermographFilter = {
|
|
||||||
fields: ['id', 'thermographFk'],
|
|
||||||
where: {
|
|
||||||
or: [{ travelFk: null }, { travelFk: route.params.id }],
|
|
||||||
},
|
|
||||||
order: 'thermographFk ASC',
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchTravelThermographsRef = ref(null);
|
const fetchTravelThermographsRef = ref(null);
|
||||||
const allowedContentTypes = ref('');
|
const allowedContentTypes = ref('');
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const thermographsOptions = ref([]);
|
|
||||||
const dmsTypesOptions = ref([]);
|
const dmsTypesOptions = ref([]);
|
||||||
const companiesOptions = ref([]);
|
const companiesOptions = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
|
@ -172,13 +163,6 @@ const onThermographCreated = async (data) => {
|
||||||
auto-load
|
auto-load
|
||||||
url="Temperatures"
|
url="Temperatures"
|
||||||
/>
|
/>
|
||||||
<FetchData
|
|
||||||
ref="fetchTravelThermographsRef"
|
|
||||||
url="TravelThermographs"
|
|
||||||
@on-fetch="(data) => (thermographsOptions = data)"
|
|
||||||
:filter="thermographFilter"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<QPage class="column items-center full-width">
|
<QPage class="column items-center full-width">
|
||||||
<QForm
|
<QForm
|
||||||
model="travel"
|
model="travel"
|
||||||
|
@ -214,7 +198,12 @@ const onThermographCreated = async (data) => {
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
:label="t('travel.thermographs.thermograph')"
|
:label="t('travel.thermographs.thermograph')"
|
||||||
v-model="thermographForm.travelThermographFk"
|
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"
|
option-label="thermographFk"
|
||||||
:disable="viewAction === 'edit'"
|
:disable="viewAction === 'edit'"
|
||||||
:tooltip="t('New thermograph')"
|
:tooltip="t('New thermograph')"
|
||||||
|
|
Loading…
Reference in New Issue