forked from verdnatura/salix-front
fix: refs #7524 use dynamic load
This commit is contained in:
parent
6108a26e93
commit
cfe95df9e8
|
@ -27,7 +27,6 @@ const initialFormState = reactive({
|
||||||
warehouseId: user.value.warehouseFk,
|
warehouseId: user.value.warehouseFk,
|
||||||
landed: null,
|
landed: null,
|
||||||
});
|
});
|
||||||
const clientOptions = ref([]);
|
|
||||||
const agenciesOptions = ref([]);
|
const agenciesOptions = ref([]);
|
||||||
const addressesOptions = ref([]);
|
const addressesOptions = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
|
@ -111,12 +110,6 @@ const redirectToTicketList = (_, { id }) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
url="Clients"
|
|
||||||
@on-fetch="(data) => (clientOptions = data)"
|
|
||||||
:filter="{ fields: ['id', 'name', 'defaultAddressFk'], order: 'id' }"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Warehouses"
|
url="Warehouses"
|
||||||
@on-fetch="(data) => (warehousesOptions = data)"
|
@on-fetch="(data) => (warehousesOptions = data)"
|
||||||
|
@ -137,7 +130,9 @@ const redirectToTicketList = (_, { id }) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('ticket.create.client')"
|
:label="t('ticket.create.client')"
|
||||||
v-model="data.clientId"
|
v-model="data.clientId"
|
||||||
:options="clientOptions"
|
url="Clients"
|
||||||
|
:fields="['id', 'name', 'defaultAddressFk']"
|
||||||
|
sort-by="id"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
|
Loading…
Reference in New Issue