#7130 - addFieldInRoutes #259

Merged
jon merged 6 commits from 7130-addFieldInRoutes into dev 2024-04-18 09:34:32 +00:00
4 changed files with 53 additions and 2 deletions
Showing only changes of commit 6df1d0cf99 - Show all commits

View File

@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (Tickets) => Se añade la opción de clonar ticket. #6951
- (Rutas) => Se añade el campo "servida" a la tabla y se añade también a los filtros. #7130
### Changed
### Fixed

View File

@ -197,6 +197,15 @@ const warehouseList = ref([]);
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<QCheckbox
v-model="params.isOk"
:label="t('Served')"
toggle-indeterminate
/>
</QItemSection>
</QItem>
</template>
</VnFilterPanel>
</template>
@ -212,6 +221,8 @@ en:
workerFk: Worker
from: From
to: To
Served: Served
no: No
es:
params:
warehouseFk: Almacén
@ -222,6 +233,7 @@ es:
workerFk: Trabajador
from: Desde
to: Hasta
yes:
Warehouse: Almacén
Description: Descripción
Vehicle: Vehículo
@ -229,4 +241,5 @@ es:
Worker: Trabajador
From: Desde
To: Hasta
Served: Servida
</i18n>

View File

@ -11,8 +11,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInput from 'components/common/VnInput.vue';
import axios from 'axios';
import VnInputTime from 'components/common/VnInputTime.vue';
import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue";
import {useStateStore} from "stores/useStateStore";
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
import { useStateStore } from 'stores/useStateStore';
const { t } = useI18n();
const route = useRoute();
@ -26,6 +26,7 @@ const defaultInitialData = {
description: '',
vehicleFk: null,
workerFk: null,
isOk: false,
};
const workerList = ref([]);
@ -211,6 +212,7 @@ const onSave = (data, response) => {
size="sm"
v-model="data.isOk"
:label="t('Is served')"
clearable
/>
</div>
</VnRow>

View File

@ -95,6 +95,13 @@ const columns = computed(() => [
sortable: true,
align: 'left',
},
{
name: 'isServed',
label: t('Served'),
field: (row) => (row.isOk ? 'Yes' : 'No'),
sortable: true,
align: 'left',
},
{
name: 'actions',
label: '',
@ -397,6 +404,25 @@ const openTicketsDialog = (id) => {
/>
</QTd>
</template>
<template #body-cell-isServed="{ row }">
<QTd>
<div class="lock-icon-cell">
<QIcon
:name="'lock'"
size="xs"
:color="row.isOk ? 'color-spacer' : 'primary'"
>
<QTooltip>
{{
row.isOk
? t('Route is closed')
: t('Route is not served')
}}
</QTooltip>
</QIcon>
</div>
</QTd>
</template>
<template #body-cell-actions="props">
<QTd :props="props">
<div class="flex items-center no-wrap table-actions">
@ -466,6 +492,11 @@ const openTicketsDialog = (id) => {
.table-actions {
gap: 12px;
}
.lock-icon-cell {
text-align: center;
margin-left: -20%;
}
</style>
<i18n>
en:
@ -479,6 +510,7 @@ es:
Description: Descripción
Hour started: Hora inicio
Hour finished: Hora fin
Served: Servida
newRoute: Nueva Ruta
Clone Selected Routes: Clonar rutas seleccionadas
Select the starting date: Seleccione la fecha de inicio
@ -490,4 +522,6 @@ es:
Add ticket: Añadir tickets
Preview: Vista previa
Summary: Resumen
Route is closed: La ruta está cerrada
Route is not served: La ruta no está servida
</i18n>