This commit is contained in:
parent
9f517eb59d
commit
506b5dd9c2
|
@ -81,7 +81,7 @@ const onSave = (data, response) => {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar />
|
||||
<VnSubToolbar v-if="isNew" />
|
||||
<FetchData
|
||||
url="Workers/search"
|
||||
:filter="{ fields: ['id', 'nickname'] }"
|
||||
|
@ -107,10 +107,10 @@ const onSave = (data, response) => {
|
|||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="RouteConfigs"
|
||||
@on-fetch="(data) => (maxDistance = data.kmMax)"
|
||||
url="RouteConfigs/findOne"
|
||||
@on-fetch="({ kmMax }) => (maxDistance = kmMax)"
|
||||
auto-load
|
||||
:where="{ id: 1 }"
|
||||
sort-by="id ASC"
|
||||
/>
|
||||
<FormModel
|
||||
:url="isNew ? null : `Routes/${route.params?.id}`"
|
||||
|
@ -175,11 +175,16 @@ 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
|
||||
<QInput
|
||||
v-model.number="data.kmEnd"
|
||||
:label="t('Km End')"
|
||||
max="maxDistance"
|
||||
:rules="[
|
||||
(val) =>
|
||||
val < maxDistance ||
|
||||
t('Distance must be lesser than 4000'),
|
||||
]"
|
||||
clearable
|
||||
type="number"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
@ -227,4 +232,5 @@ es:
|
|||
Description: Descripción
|
||||
Is served: Se ha servido
|
||||
Created: Creado
|
||||
Distance must be lesser than 4000: La distancia debe ser inferior a 4000
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue