refs #6820 fix error front
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-05-22 12:24:08 +02:00
parent 9f517eb59d
commit 506b5dd9c2
1 changed files with 12 additions and 6 deletions

View File

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