#7524 dynamic fetch #1339

Merged
jorgep merged 2 commits from 7524-hotfix-removeLimit into master 2025-02-06 09:32:45 +00:00
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"

Son los por defecto, no hace falta ponerlos

Son los por defecto, no hace falta ponerlos
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"