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

View File

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