forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6942-improveInvoceIn
This commit is contained in:
commit
7685c38fb7
|
@ -28,7 +28,7 @@ const defaultInitialData = {
|
|||
workerFk: null,
|
||||
isOk: false,
|
||||
};
|
||||
|
||||
const maxDistance = ref();
|
||||
const workerList = ref([]);
|
||||
const agencyList = ref([]);
|
||||
const vehicleList = ref([]);
|
||||
|
@ -81,12 +81,7 @@ const onSave = (data, response) => {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar />
|
||||
<template v-if="stateStore.isHeaderMounted()">
|
||||
<Teleport to="#searchbar">
|
||||
<RouteSearchbar />
|
||||
</Teleport>
|
||||
</template>
|
||||
<VnSubToolbar v-if="isNew" />
|
||||
<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/findOne"
|
||||
@on-fetch="({ kmMax }) => (maxDistance = kmMax)"
|
||||
auto-load
|
||||
sort-by="id ASC"
|
||||
/>
|
||||
<FormModel
|
||||
:url="isNew ? null : `Routes/${route.params?.id}`"
|
||||
:url-create="isNew ? 'Routes' : null"
|
||||
|
@ -174,7 +175,17 @@ 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 />
|
||||
<QInput
|
||||
v-model.number="data.kmEnd"
|
||||
:label="t('Km End')"
|
||||
:rules="[
|
||||
(val) =>
|
||||
val < maxDistance ||
|
||||
t('Distance must be lesser than 4000'),
|
||||
]"
|
||||
clearable
|
||||
type="number"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<VnInputTime
|
||||
|
@ -221,4 +232,5 @@ es:
|
|||
Description: Descripción
|
||||
Is served: Se ha servido
|
||||
Created: Creado
|
||||
Distance must be lesser than {maxDistance}: La distancia debe ser inferior a {maxDistance}
|
||||
</i18n>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -170,23 +170,6 @@ watch([year, businessFk], () => refreshData());
|
|||
ref="WorkerFreelanceRef"
|
||||
auto-load
|
||||
/>
|
||||
<template v-if="stateStore.isHeaderMounted()">
|
||||
<Teleport to="#actions-append">
|
||||
<div class="row q-gutter-x-sm">
|
||||
<QBtn
|
||||
flat
|
||||
@click="stateStore.toggleRightDrawer()"
|
||||
round
|
||||
dense
|
||||
icon="menu"
|
||||
>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.collapseMenu') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||
<QScrollArea class="fit text-grey-8">
|
||||
<WorkerCalendarFilter
|
||||
|
|
|
@ -489,23 +489,6 @@ onMounted(async () => {
|
|||
</QBtnGroup>
|
||||
</div>
|
||||
</Teleport>
|
||||
<template v-if="stateStore.isHeaderMounted()">
|
||||
<Teleport to="#actions-append">
|
||||
<div class="row q-gutter-x-sm">
|
||||
<QBtn
|
||||
flat
|
||||
@click="stateStore.toggleRightDrawer()"
|
||||
round
|
||||
dense
|
||||
icon="menu"
|
||||
>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.collapseMenu') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="260" class="q-pa-md">
|
||||
<div class="q-pa-md q-mb-md" style="border: 2px solid #222">
|
||||
<QCardSection horizontal>
|
||||
|
|
Loading…
Reference in New Issue