From f1df969fa697a2e60ceaf5d99fec9162d02c10f9 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 4 Jun 2024 10:52:00 +0200 Subject: [PATCH] feat: refs #560 refactor descriptor --- .../Route/Roadmap/RoadmapAddStopForm.vue | 37 ++++++++++++++----- src/pages/Route/Roadmap/RoadmapCard.vue | 30 +++++++-------- src/pages/Route/Roadmap/RoadmapSummary.vue | 15 ++++++-- src/pages/Route/RouteRoadmap.vue | 4 +- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/src/pages/Route/Roadmap/RoadmapAddStopForm.vue b/src/pages/Route/Roadmap/RoadmapAddStopForm.vue index 736280e99..6cc21fd4d 100644 --- a/src/pages/Route/Roadmap/RoadmapAddStopForm.vue +++ b/src/pages/Route/Roadmap/RoadmapAddStopForm.vue @@ -23,28 +23,43 @@ const props = defineProps({ }); const { t } = useI18n(); -const warehouseList = ref([]); +const addressList = ref([]); const form = computed(() => props.formData); const isDialog = computed(() => props.layout === 'dialog'); +const onFetch = (data) => { + addressList.value = data.map((roadmap) => ({ + id: roadmap.addressFk, + nickname: roadmap.address ? roadmap.address.nickname : '', + })); +}; + + + es: - Warehouse: Almacén + Address: Dirección ETA date: Fecha ETA ETA hour: Hora ETA Description: Descripción diff --git a/src/pages/Route/Roadmap/RoadmapCard.vue b/src/pages/Route/Roadmap/RoadmapCard.vue index d6b02824b..4e8f8dd50 100644 --- a/src/pages/Route/Roadmap/RoadmapCard.vue +++ b/src/pages/Route/Roadmap/RoadmapCard.vue @@ -1,21 +1,17 @@ diff --git a/src/pages/Route/Roadmap/RoadmapSummary.vue b/src/pages/Route/Roadmap/RoadmapSummary.vue index 8604cc30a..e9969c2f7 100644 --- a/src/pages/Route/Roadmap/RoadmapSummary.vue +++ b/src/pages/Route/Roadmap/RoadmapSummary.vue @@ -55,7 +55,16 @@ const filter = { { relation: 'worker' }, { relation: 'roadmapStop', - scope: { include: [{ relation: 'address' }] }, + scope: { + include: [ + { + relation: 'address', + scope: { + fields: ['nickname'], + }, + }, + ], + }, }, ], }; @@ -154,8 +163,6 @@ const openAddStopDialog = () => { :rows="entity?.roadmapStop" :rows-per-page-options="[0]" row-key="id" - flat - hide-pagination /> @@ -171,7 +178,7 @@ es: Worker: Trabajador Observations: Observaciones Stops: Paradas - Warehouse: Almacén + Address: Dirección Go to stops: Ir a paradas Add stop: Añadir parada diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index 2ed8b6a9a..06c632ad4 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -284,9 +284,9 @@ function navigateToRoadmapSummary(event, row) { es: Search roadmaps: Buscar troncales - You can search by roadmap reference: Puedes buscar por referencia de la troncal + You can search by roadmap reference: Puedes buscar por referencia del troncal Delete roadmap(s): Eliminar troncal(es) - Selected roadmaps will be removed: Las troncales seleccionadas serán eliminadas + Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados Are you sure you want to continue?: ¿Seguro que quieres continuar? The date can't be empty: La fecha no puede estar vacía Clone Selected Routes: Clonar rutas seleccionadas