fix: refs #7524 use limit entry Section wip
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-08-27 09:54:21 +02:00
parent 717c52fc02
commit 4d7a4be2c0
2 changed files with 5 additions and 28 deletions

View File

@ -19,8 +19,6 @@ const { t } = useI18n();
const { hasAny } = useRole(); const { hasAny } = useRole();
const isAdministrative = () => hasAny(['administrative']); const isAdministrative = () => hasAny(['administrative']);
const suppliersOptions = ref([]);
const travelsOptions = ref([]);
const companiesOptions = ref([]); const companiesOptions = ref([]);
const currenciesOptions = ref([]); const currenciesOptions = ref([]);
@ -29,20 +27,6 @@ const onFilterTravelSelected = (formData, id) => {
}; };
</script> </script>
<template> <template>
<FetchData
url="Suppliers"
:filter="{ fields: ['id', 'nickname'] }"
order="nickname"
@on-fetch="(data) => (suppliersOptions = data)"
auto-load
/>
<FetchData
url="Travels/filter"
:filter="{ fields: ['id', 'warehouseInName'] }"
order="id"
@on-fetch="(data) => (travelsOptions = data)"
auto-load
/>
<FetchData <FetchData
ref="companiesRef" ref="companiesRef"
url="Companies" url="Companies"
@ -71,9 +55,10 @@ const onFilterTravelSelected = (formData, id) => {
<VnSelect <VnSelect
:label="t('entry.basicData.supplier')" :label="t('entry.basicData.supplier')"
v-model="data.supplierFk" v-model="data.supplierFk"
:options="suppliersOptions" url="Suppliers"
option-value="id" option-value="id"
option-label="nickname" option-label="nickname"
:fields="['id', 'nickname']"
hide-selected hide-selected
:required="true" :required="true"
map-options map-options
@ -92,7 +77,8 @@ const onFilterTravelSelected = (formData, id) => {
<VnSelectDialog <VnSelectDialog
:label="t('entry.basicData.travel')" :label="t('entry.basicData.travel')"
v-model="data.travelFk" v-model="data.travelFk"
:options="travelsOptions" url="Travels/filter"
:fields="['id', 'warehouseInName']"
option-value="id" option-value="id"
option-label="warehouseInName" option-label="warehouseInName"
map-options map-options

View File

@ -20,7 +20,6 @@ const props = defineProps({
const currenciesOptions = ref([]); const currenciesOptions = ref([]);
const companiesOptions = ref([]); const companiesOptions = ref([]);
const suppliersOptions = ref([]);
const stateStore = useStateStore(); const stateStore = useStateStore();
onMounted(async () => { onMounted(async () => {
@ -45,14 +44,6 @@ onMounted(async () => {
@on-fetch="(data) => (currenciesOptions = data)" @on-fetch="(data) => (currenciesOptions = data)"
auto-load auto-load
/> />
<FetchData
url="Suppliers"
:filter="{ fields: ['id', 'nickname', 'name'] }"
order="nickname"
@on-fetch="(data) => (suppliersOptions = data)"
auto-load
/>
<VnFilterPanel :data-key="props.dataKey" :search-button="true"> <VnFilterPanel :data-key="props.dataKey" :search-button="true">
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
@ -135,7 +126,7 @@ onMounted(async () => {
:label="t('params.supplierFk')" :label="t('params.supplierFk')"
v-model="params.supplierFk" v-model="params.supplierFk"
@update:model-value="searchFn()" @update:model-value="searchFn()"
:options="suppliersOptions" url="Suppliers"
option-value="id" option-value="id"
option-label="name" option-label="name"
hide-selected hide-selected