0
0
Fork 0

Merge pull request '#7524 dynamic fetch' (!1339) from 7524-hotfix-removeLimit into master

Reviewed-on: verdnatura/salix-front#1339
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2025-02-06 09:32:44 +00:00
commit f9ba0642e1
1 changed files with 4 additions and 23 deletions

View File

@ -1,35 +1,16 @@
<script setup>
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { ref } from 'vue';
import FetchData from 'components/FetchData.vue';
import FormModel from 'src/components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import { QCheckbox } from 'quasar';
import VnInputTime from 'src/components/common/VnInputTime.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
const route = useRoute();
const { t } = useI18n();
const agencyFilter = {
fields: ['id', 'name'],
order: 'name ASC',
limit: 30,
};
const agencyOptions = ref([]);
</script>
<template>
<FetchData
:filter="agencyFilter"
@on-fetch="(data) => (agencyOptions = data)"
auto-load
url="AgencyModes/isActive"
/>
<FormModel :url="`Zones/${route.params.id}`" auto-load model="zone">
<FormModel :url="`Zones/${$route.params.id}`" auto-load model="zone">
<template #form="{ data, validate }">
<VnRow>
<VnInput
@ -42,16 +23,16 @@ const agencyOptions = ref([]);
<VnRow>
<VnSelect
option-label="name"
option-value="id"
v-model="data.agencyModeFk"
:rules="validate('zone.agencyModeFk')"
:options="agencyOptions"
url="AgencyModes/isActive"
:fields="['id', 'name']"
:label="t('Agency')"
emit-value
map-options
use-input
hide-bottom-space
sort-by="name"
/>
<VnInput
class="mw-10"