0
0
Fork 0

refs #6820 fix BasicData Tickets

This commit is contained in:
Carlos Satorres 2024-05-20 12:40:47 +02:00
parent 2c41c31b6f
commit 9f517eb59d
2 changed files with 13 additions and 12 deletions

View File

@ -28,7 +28,7 @@ const defaultInitialData = {
workerFk: null,
isOk: false,
};
const maxDistance = ref(null);
const workerList = ref([]);
const agencyList = ref([]);
const vehicleList = ref([]);
@ -82,11 +82,6 @@ const onSave = (data, response) => {
</script>
<template>
<VnSubToolbar />
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<RouteSearchbar />
</Teleport>
</template>
<FetchData
url="Workers/search"
:filter="{ fields: ['id', 'nickname'] }"
@ -111,6 +106,12 @@ const onSave = (data, response) => {
@on-fetch="(data) => (vehicleList = data)"
auto-load
/>
<FetchData
url="RouteConfigs"
@on-fetch="(data) => (maxDistance = data.kmMax)"
auto-load
:where="{ id: 1 }"
/>
<FormModel
:url="isNew ? null : `Routes/${route.params?.id}`"
:url-create="isNew ? 'Routes' : null"
@ -174,7 +175,12 @@ const onSave = (data, response) => {
<template v-if="!isNew">
<VnRow class="row q-gutter-md q-mb-md">
<VnInput v-model="data.kmStart" :label="t('Km Start')" clearable />
<VnInput v-model="data.kmEnd" :label="t('Km End')" clearable />
<VnInput
v-model.number="data.kmEnd"
:label="t('Km End')"
max="maxDistance"
clearable
/>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md">
<VnInputTime

View File

@ -222,11 +222,6 @@ const openSmsDialog = async () => {
</script>
<template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<RouteSearchbar />
</Teleport>
</template>
<FetchData
@on-fetch="(data) => (routeEntity = data)"
auto-load