diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 5723e2f0d..f06249de6 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -9,6 +9,7 @@ import VnTable from 'components/VnTable/VnTable.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import VnSection from 'src/components/common/VnSection.vue'; import VnSelectWorker from 'src/components/common/VnSelectWorker.vue'; +import RouteTickets from './RouteTickets.vue'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); @@ -24,6 +25,12 @@ const routeFilter = { }, ], }; + +function redirectToTickets(id) { + const url = `#/route/${id}/tickets`; + window.open(url, '_blank'); +} + const columns = computed(() => [ { align: 'right', @@ -130,6 +137,12 @@ const columns = computed(() => [ align: 'right', name: 'tableActions', actions: [ + { + title: t('globals.pageTitles.tickets'), + icon: 'vn:ticket', + action: (row) => redirectToTickets(row?.id), + isPrimary: true, + }, { title: t('components.smartCard.viewSummary'), icon: 'preview', diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue index adc7dfdaa..b17fb543f 100644 --- a/src/pages/Route/RouteTickets.vue +++ b/src/pages/Route/RouteTickets.vue @@ -37,9 +37,9 @@ const columns = computed(() => [ align: 'left', }, { - name: 'city', - label: t('City'), - field: (row) => row?.city, + name: 'client', + label: t('Client'), + field: (row) => row?.nickname, sortable: false, align: 'left', }, @@ -51,9 +51,9 @@ const columns = computed(() => [ align: 'center', }, { - name: 'client', - label: t('Client'), - field: (row) => row?.nickname, + name: 'city', + label: t('City'), + field: (row) => row?.city, sortable: false, align: 'left', },