0
0
Fork 0

Fix route table navigation

This commit is contained in:
Kevin Martinez 2024-02-23 15:30:45 -03:00
parent 6ad2e9aafe
commit 929a094132
2 changed files with 13 additions and 2 deletions

View File

@ -131,6 +131,10 @@ const openCreateInvoiceIn = () => {
router.push({ name: 'RouteAutonomousCreateInvoiceIn', query: { q: params } });
};
function navigateToRouteSummary(event, row) {
router.push({ name: 'RouteSummary', params: { id: row.routeFk } })
}
</script>
<template>
@ -195,6 +199,7 @@ const openCreateInvoiceIn = () => {
selection="multiple"
:rows-per-page-options="[0]"
hide-pagination
@row-click="navigateToRouteSummary"
>
<template #body-cell-ID="props">
<QTd :props="props">
@ -233,7 +238,7 @@ const openCreateInvoiceIn = () => {
name="preview"
size="xs"
color="primary"
@click="viewSummary(props?.row?.routeFk, RouteSummary)"
@click.stop="viewSummary(props?.row?.routeFk, RouteSummary)"
>
<QTooltip>{{ t('Preview') }}</QTooltip>
</QIcon>

View File

@ -15,10 +15,12 @@ import axios from 'axios';
import VnInputDate from 'components/common/VnInputDate.vue';
import {useSummaryDialog} from "composables/useSummaryDialog";
import RoadmapSummary from "pages/Route/Roadmap/RoadmapSummary.vue";
import {useRouter} from "vue-router";
const stateStore = useStateStore();
const { t } = useI18n();
const quasar = useQuasar();
const router = useRouter();
const { viewSummary } = useSummaryDialog();
const to = Date.vnNew();
@ -124,6 +126,10 @@ function confirmRemove() {
})
.onOk(() => refreshKey.value++);
}
function navigateToRoadmapSummary(event, row) {
router.push({ name: 'RoadmapSummary', params: { id: row.id } })
}
</script>
<template>
@ -219,7 +225,7 @@ function confirmRemove() {
:rows-per-page-options="[0]"
hide-pagination
:pagination="{ sortBy: 'ID', descending: true }"
:on-row-click="(evt, row) => console.log(evt, row)"
@row-click="navigateToRoadmapSummary"
>
<template #body-cell-carrier="props">
<QTd :props="props">