From 50d3bac20c5de783c31da76e207b161efb8428e8 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Mon, 26 Feb 2024 22:57:51 -0300 Subject: [PATCH] Add roadmap add stop dialog --- .../Route/Roadmap/RoadmapAddStopDialog.vue | 125 ++++++++++++++++++ src/pages/Route/Roadmap/RoadmapSummary.vue | 56 ++++++-- 2 files changed, 172 insertions(+), 9 deletions(-) create mode 100644 src/pages/Route/Roadmap/RoadmapAddStopDialog.vue diff --git a/src/pages/Route/Roadmap/RoadmapAddStopDialog.vue b/src/pages/Route/Roadmap/RoadmapAddStopDialog.vue new file mode 100644 index 000000000..b3097d852 --- /dev/null +++ b/src/pages/Route/Roadmap/RoadmapAddStopDialog.vue @@ -0,0 +1,125 @@ + + + + + +es: + Warehouse: Almacén + ETA date: Fecha ETA + ETA time: Hora ETA + Description: Descripción + diff --git a/src/pages/Route/Roadmap/RoadmapSummary.vue b/src/pages/Route/Roadmap/RoadmapSummary.vue index fb756f4aa..446d381ec 100644 --- a/src/pages/Route/Roadmap/RoadmapSummary.vue +++ b/src/pages/Route/Roadmap/RoadmapSummary.vue @@ -2,12 +2,14 @@ import { computed, onMounted, onUnmounted, ref } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; -import { useStateStore } from 'stores/useStateStore'; -import CardSummary from 'components/ui/CardSummary.vue'; -import VnLv from 'components/ui/VnLv.vue'; -import { QIcon } from 'quasar'; +import { QIcon, useQuasar } from 'quasar'; import { dashIfEmpty, toDateHour } from 'src/filters'; +import { useStateStore } from 'stores/useStateStore'; +import VnLv from 'components/ui/VnLv.vue'; +import CardSummary from 'components/ui/CardSummary.vue'; import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue'; +import VnLinkPhone from 'components/ui/VnLinkPhone.vue'; +import RoadmapAddStopDialog from 'pages/Route/Roadmap/RoadmapAddStopDialog.vue'; const $props = defineProps({ id: { @@ -18,7 +20,9 @@ const $props = defineProps({ const route = useRoute(); const stateStore = useStateStore(); const { t } = useI18n(); +const quasar = useQuasar(); +const summary = ref(null); const entityId = computed(() => $props.id || route.params.id); const isDialog = Boolean($props.id); const hideRightDrawer = () => { @@ -55,6 +59,15 @@ const filter = { }, ], }; + +const openAddStopDialog = () => { + quasar + .dialog({ + component: RoadmapAddStopDialog, + componentProps: { roadmapFk: entityId.value }, + }) + .onOk(() => summary.value.fetch()); +};