From 343269fc02435cd518f9e0536662163266e14210 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 15 Feb 2024 01:02:01 -0300 Subject: [PATCH] Create roadmap summary page --- src/i18n/en/index.js | 12 ++ src/i18n/es/index.js | 12 ++ src/pages/Route/Roadmap/RoadmapCard.vue | 21 +++ src/pages/Route/Roadmap/RoadmapDescriptor.vue | 63 ++++++++ .../Route/Roadmap/RoadmapDescriptorMenu.vue | 57 ++++++++ .../Route/Roadmap/RoadmapDescriptorProxy.vue | 15 ++ src/pages/Route/Roadmap/RoadmapSummary.vue | 134 ++++++++++++++++++ .../Route/Roadmap/RoadmapSummaryDialog.vue | 29 ++++ src/pages/Route/RouteRoadmap.vue | 23 +-- src/router/modules/index.js | 2 + src/router/modules/roadmap.js | 34 +++++ src/router/routes.js | 2 + 12 files changed, 396 insertions(+), 8 deletions(-) create mode 100644 src/pages/Route/Roadmap/RoadmapCard.vue create mode 100644 src/pages/Route/Roadmap/RoadmapDescriptor.vue create mode 100644 src/pages/Route/Roadmap/RoadmapDescriptorMenu.vue create mode 100644 src/pages/Route/Roadmap/RoadmapDescriptorProxy.vue create mode 100644 src/pages/Route/Roadmap/RoadmapSummary.vue create mode 100644 src/pages/Route/Roadmap/RoadmapSummaryDialog.vue create mode 100644 src/router/modules/roadmap.js diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 000cbf5e8..5889a1728 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -880,6 +880,18 @@ export default { uncompleteTrays: 'There are incomplete trays', }, }, + 'route/roadmap': { + pageTitles: { + roadmap: 'Roadmap', + summary: 'Summary', + }, + }, + roadmap: { + pageTitles: { + roadmap: 'Roadmap', + summary: 'Summary', + }, + }, route: { pageTitles: { routes: 'Routes', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 7d43aaa7f..7fd58d82a 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -934,6 +934,18 @@ export default { uncompleteTrays: 'Hay bandejas sin completar', }, }, + 'route/roadmap': { + pageTitles: { + roadmap: 'Troncales', + summary: 'Resumen', + }, + }, + roadmap: { + pageTitles: { + roadmap: 'Troncales', + summary: 'Resumen', + }, + }, route: { pageTitles: { routes: 'Rutas', diff --git a/src/pages/Route/Roadmap/RoadmapCard.vue b/src/pages/Route/Roadmap/RoadmapCard.vue new file mode 100644 index 000000000..d6b02824b --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapCard.vue @@ -0,0 +1,21 @@ + + diff --git a/src/pages/Route/Roadmap/RoadmapDescriptor.vue b/src/pages/Route/Roadmap/RoadmapDescriptor.vue new file mode 100644 index 000000000..3396ce3f1 --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapDescriptor.vue @@ -0,0 +1,63 @@ + + + + +es: + Roadmap: Troncal + Carrier: Transportista + diff --git a/src/pages/Route/Roadmap/RoadmapDescriptorMenu.vue b/src/pages/Route/Roadmap/RoadmapDescriptorMenu.vue new file mode 100644 index 000000000..2c0099f28 --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapDescriptorMenu.vue @@ -0,0 +1,57 @@ + + + + +es: + Confirm deletion: Confirmar eliminación + Are you sure you want to delete this roadmap?: ¿Estás seguro de que quieres eliminar esta troncal? + Delete roadmap: Eliminar troncal + diff --git a/src/pages/Route/Roadmap/RoadmapDescriptorProxy.vue b/src/pages/Route/Roadmap/RoadmapDescriptorProxy.vue new file mode 100644 index 000000000..4e22ecd62 --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapDescriptorProxy.vue @@ -0,0 +1,15 @@ + + diff --git a/src/pages/Route/Roadmap/RoadmapSummary.vue b/src/pages/Route/Roadmap/RoadmapSummary.vue new file mode 100644 index 000000000..77d277666 --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapSummary.vue @@ -0,0 +1,134 @@ + + + + +es: + Carrier: Transportista + Tractor Plate: Placa tractor + Trailer Plate: Placa trailer + Phone: Teléfono + Worker: Trabajador + Observations: Observaciones + Stops: Paradas + Warehouse: Almacén + diff --git a/src/pages/Route/Roadmap/RoadmapSummaryDialog.vue b/src/pages/Route/Roadmap/RoadmapSummaryDialog.vue new file mode 100644 index 000000000..35cb5771a --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapSummaryDialog.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index fd4d52f62..c7b12a417 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -4,9 +4,7 @@ import { useStateStore } from 'stores/useStateStore'; import { useI18n } from 'vue-i18n'; import { computed, onMounted, onUnmounted, ref } from 'vue'; import { dashIfEmpty, toDateHour } from 'src/filters'; -import { useValidator } from 'composables/useValidator'; import { useQuasar } from 'quasar'; -import { useSession } from 'composables/useSession'; import toCurrency from 'filters/toCurrency'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue'; @@ -15,12 +13,11 @@ import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import axios from 'axios'; import VnInputDate from 'components/common/VnInputDate.vue'; +import RoadmapSummaryDialog from "pages/Route/Roadmap/RoadmapSummaryDialog.vue"; const stateStore = useStateStore(); const { t } = useI18n(); -const { validate } = useValidator(); const quasar = useQuasar(); -const session = useSession(); const to = Date.vnNew(); to.setDate(to.getDate() + 1); @@ -30,8 +27,6 @@ const from = Date.vnNew(); from.setDate(from.getDate()); from.setHours(0, 0, 0, 0); -const params = ref({ from, to }); - onMounted(() => (stateStore.rightDrawer = true)); onUnmounted(() => (stateStore.rightDrawer = false)); @@ -90,7 +85,6 @@ const columns = computed(() => [ const refreshKey = ref(0); const isCloneDialogOpen = ref(false); const etdDate = ref(null); -const workers = ref([]); const filter = { include: { relation: 'supplier', scope: { fields: ['nickname'] } }, @@ -128,6 +122,18 @@ function confirmRemove() { }) .onOk(() => refreshKey.value++); } + +function previewRoadmap(id) { + if (!id) { + return; + } + quasar.dialog({ + component: RoadmapSummaryDialog, + componentProps: { + id, + }, + }); +}