0
0
Fork 0

fix: refs #7524 use dynamic load

This commit is contained in:
Jorge Penadés 2024-10-10 09:46:07 +02:00
parent 6108a26e93
commit cfe95df9e8
1 changed files with 3 additions and 8 deletions

View File

@ -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