fix: refs #7524 dynamic fetching
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-09-02 10:03:01 +02:00
parent d55bf0ff75
commit 56d226b36b
3 changed files with 3 additions and 22 deletions

View File

@ -38,18 +38,6 @@ onMounted(async () => {
}"
@on-fetch="(data) => (itemBotanicals = data)"
/>
<FetchData
url="Genera"
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
@on-fetch="(data) => (itemGenusOptions = data)"
auto-load
/>
<FetchData
url="Species"
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
@on-fetch="(data) => (itemSpeciesOptions = data)"
auto-load
/>
<FormModel
url-update="ItemBotanicals"
model="entry"

View File

@ -17,9 +17,7 @@ const { t } = useI18n();
const state = useState();
const user = state.getUser();
const stateFetchDataRef = ref(null);
const statesOptions = ref([]);
const workersOptions = ref([]);
const onStateFkChange = (formData) => (formData.userFk = user.value.id);
</script>
@ -30,12 +28,6 @@ const onStateFkChange = (formData) => (formData.userFk = user.value.id);
auto-load
@on-fetch="(data) => (statesOptions = data)"
/>
<FetchData
url="Workers/search"
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
auto-load
@on-fetch="(data) => (workersOptions = data)"
/>
<FormModelPopup
:title="t('Create tracking')"
url-create="Tickets/state"
@ -57,7 +49,9 @@ const onStateFkChange = (formData) => (formData.userFk = user.value.id);
<VnSelect
:label="t('tracking.worker')"
v-model="data.userFk"
:options="workersOptions"
url="Workers/search"
fields=" ['id', 'name']"
sort-by="name ASC"
hide-selected
option-label="name"
option-value="id"

View File

@ -26,7 +26,6 @@ const saleTrackingFetchDataRef = ref(null);
const sales = ref([]);
const saleTrackings = ref([]);
const itemShelvignsSales = ref([]);
const parkingsOptions = ref([]);
const saleTrackingUrl = computed(() => `SaleTrackings/${route.params.id}/filter`);
const oldQuantity = ref(null);