forked from verdnatura/salix-front
feat: #7130 added "served" field to RouteList table and added to the filter too.
This commit is contained in:
parent
7072dc783b
commit
6df1d0cf99
|
@ -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
|
- (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
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -197,6 +197,15 @@ const warehouseList = ref([]);
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<QCheckbox
|
||||||
|
v-model="params.isOk"
|
||||||
|
:label="t('Served')"
|
||||||
|
toggle-indeterminate
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
@ -212,6 +221,8 @@ en:
|
||||||
workerFk: Worker
|
workerFk: Worker
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
|
Served: Served
|
||||||
|
no: No
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
|
@ -222,6 +233,7 @@ es:
|
||||||
workerFk: Trabajador
|
workerFk: Trabajador
|
||||||
from: Desde
|
from: Desde
|
||||||
to: Hasta
|
to: Hasta
|
||||||
|
yes: Sí
|
||||||
Warehouse: Almacén
|
Warehouse: Almacén
|
||||||
Description: Descripción
|
Description: Descripción
|
||||||
Vehicle: Vehículo
|
Vehicle: Vehículo
|
||||||
|
@ -229,4 +241,5 @@ es:
|
||||||
Worker: Trabajador
|
Worker: Trabajador
|
||||||
From: Desde
|
From: Desde
|
||||||
To: Hasta
|
To: Hasta
|
||||||
|
Served: Servida
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -11,8 +11,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||||
import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue";
|
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||||
import {useStateStore} from "stores/useStateStore";
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -26,6 +26,7 @@ const defaultInitialData = {
|
||||||
description: '',
|
description: '',
|
||||||
vehicleFk: null,
|
vehicleFk: null,
|
||||||
workerFk: null,
|
workerFk: null,
|
||||||
|
isOk: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const workerList = ref([]);
|
const workerList = ref([]);
|
||||||
|
@ -211,6 +212,7 @@ const onSave = (data, response) => {
|
||||||
size="sm"
|
size="sm"
|
||||||
v-model="data.isOk"
|
v-model="data.isOk"
|
||||||
:label="t('Is served')"
|
:label="t('Is served')"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
|
@ -95,6 +95,13 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'isServed',
|
||||||
|
label: t('Served'),
|
||||||
|
field: (row) => (row.isOk ? 'Yes' : 'No'),
|
||||||
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'actions',
|
name: 'actions',
|
||||||
label: '',
|
label: '',
|
||||||
|
@ -397,6 +404,25 @@ const openTicketsDialog = (id) => {
|
||||||
/>
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</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">
|
<template #body-cell-actions="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
<div class="flex items-center no-wrap table-actions">
|
<div class="flex items-center no-wrap table-actions">
|
||||||
|
@ -466,6 +492,11 @@ const openTicketsDialog = (id) => {
|
||||||
.table-actions {
|
.table-actions {
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lock-icon-cell {
|
||||||
|
text-align: center;
|
||||||
|
margin-left: -20%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
|
@ -479,6 +510,7 @@ es:
|
||||||
Description: Descripción
|
Description: Descripción
|
||||||
Hour started: Hora inicio
|
Hour started: Hora inicio
|
||||||
Hour finished: Hora fin
|
Hour finished: Hora fin
|
||||||
|
Served: Servida
|
||||||
newRoute: Nueva Ruta
|
newRoute: Nueva Ruta
|
||||||
Clone Selected Routes: Clonar rutas seleccionadas
|
Clone Selected Routes: Clonar rutas seleccionadas
|
||||||
Select the starting date: Seleccione la fecha de inicio
|
Select the starting date: Seleccione la fecha de inicio
|
||||||
|
@ -490,4 +522,6 @@ es:
|
||||||
Add ticket: Añadir tickets
|
Add ticket: Añadir tickets
|
||||||
Preview: Vista previa
|
Preview: Vista previa
|
||||||
Summary: Resumen
|
Summary: Resumen
|
||||||
|
Route is closed: La ruta está cerrada
|
||||||
|
Route is not served: La ruta no está servida
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue