From ba9839bc4e4061123a7f8a58b392307a10f23750 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Wed, 24 Jan 2024 07:51:52 -0300 Subject: [PATCH 01/83] Implement routes report --- src/pages/Route/RouteList.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 0b4aa6795..c4ae6c8b6 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -2,7 +2,6 @@ import VnPaginate from 'components/ui/VnPaginate.vue'; import { useStateStore } from 'stores/useStateStore'; import { useI18n } from 'vue-i18n'; -import { useQuasar } from 'quasar'; import { computed, onMounted, onUnmounted, ref } from 'vue'; import { dashIfEmpty, toDate, toHour } from 'src/filters'; import VnSelectFilter from 'components/common/VnSelectFilter.vue'; From c013c9054f1dd478305d1d4a163402afade9db91 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Wed, 24 Jan 2024 11:48:37 -0300 Subject: [PATCH 02/83] Implement routes tickets dialog --- .../Route/Card/RouteListTicketsDialog.vue | 244 ++++++++++++++++++ src/pages/Route/RouteList.vue | 30 ++- 2 files changed, 268 insertions(+), 6 deletions(-) create mode 100644 src/pages/Route/Card/RouteListTicketsDialog.vue diff --git a/src/pages/Route/Card/RouteListTicketsDialog.vue b/src/pages/Route/Card/RouteListTicketsDialog.vue new file mode 100644 index 000000000..9e3aad76d --- /dev/null +++ b/src/pages/Route/Card/RouteListTicketsDialog.vue @@ -0,0 +1,244 @@ + + + + + + +en: + Unlink zone: Unlink zone {zone} from agency {agency} +es: + Tickets to add: Tickets a añadir + Client: Cliente + Province: Provincia + Population: Población + PC: CP + Address: Dirección + Zone: Zona + Unlink zone: Desvincular zona {zone} de agencia {agency} + Unlink: Desvincular + diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index c4ae6c8b6..59803abbc 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -15,12 +15,15 @@ import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; import RouteSummary from 'pages/Route/Card/RouteSummary.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; -import {useSession} from "composables/useSession"; +import { useSession } from 'composables/useSession'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; +import RouteListTicketsDialog from 'pages/Route/Card/RouteListTicketsDialog.vue'; +import { useQuasar } from 'quasar'; const stateStore = useStateStore(); const { t } = useI18n(); const { validate } = useValidator(); +const quasar = useQuasar(); const session = useSession(); const { viewSummary } = useSummaryDialog(); @@ -143,8 +146,8 @@ const cloneRoutes = () => { }; const showRouteReport = () => { - const ids = selectedRows.value.map(row => row?.id) - const idString = ids.join(',') + const ids = selectedRows.value.map((row) => row?.id); + const idString = ids.join(','); let url; if (selectedRows.value.length <= 1) { @@ -152,12 +155,12 @@ const showRouteReport = () => { } else { const params = new URLSearchParams({ access_token: session.getToken(), - id: idString - }) + id: idString, + }); url = `api/Routes/downloadZip?${params.toString()}`; } window.open(url, '_blank'); -} +}; const markAsServed = () => { selectedRows.value.forEach((row) => { @@ -168,6 +171,20 @@ const markAsServed = () => { refreshKey.value++; startingDate.value = null; }; + +const openTicketsDialog = (id) => { + if (!id) { + return; + } + quasar + .dialog({ + component: RouteListTicketsDialog, + componentProps: { + id, + }, + }) + .onOk(() => refreshKey.value++); +};