From 6df1d0cf99d544a5a74b63b6e4651f70d67c2bf8 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 27 Mar 2024 07:55:50 +0100 Subject: [PATCH 1/3] feat: #7130 added "served" field to RouteList table and added to the filter too. --- CHANGELOG.md | 2 ++ src/pages/Route/Card/RouteFilter.vue | 13 +++++++++++ src/pages/Route/Card/RouteForm.vue | 6 +++-- src/pages/Route/RouteList.vue | 34 ++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51dd2010c..046071abd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue index 4be1981ab..53898292f 100644 --- a/src/pages/Route/Card/RouteFilter.vue +++ b/src/pages/Route/Card/RouteFilter.vue @@ -197,6 +197,15 @@ const warehouseList = ref([]); /> + + + + + @@ -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: Sí Warehouse: Almacén Description: Descripción Vehicle: Vehículo @@ -229,4 +241,5 @@ es: Worker: Trabajador From: Desde To: Hasta + Served: Servida diff --git a/src/pages/Route/Card/RouteForm.vue b/src/pages/Route/Card/RouteForm.vue index 60693cbf1..7087037b0 100644 --- a/src/pages/Route/Card/RouteForm.vue +++ b/src/pages/Route/Card/RouteForm.vue @@ -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 /> diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 94c05ad54..78a806294 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -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) => { /> +