forked from verdnatura/salix-front
Fix route table navigation
This commit is contained in:
parent
6ad2e9aafe
commit
929a094132
|
@ -131,6 +131,10 @@ const openCreateInvoiceIn = () => {
|
||||||
|
|
||||||
router.push({ name: 'RouteAutonomousCreateInvoiceIn', query: { q: params } });
|
router.push({ name: 'RouteAutonomousCreateInvoiceIn', query: { q: params } });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function navigateToRouteSummary(event, row) {
|
||||||
|
router.push({ name: 'RouteSummary', params: { id: row.routeFk } })
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -195,6 +199,7 @@ const openCreateInvoiceIn = () => {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
:rows-per-page-options="[0]"
|
:rows-per-page-options="[0]"
|
||||||
hide-pagination
|
hide-pagination
|
||||||
|
@row-click="navigateToRouteSummary"
|
||||||
>
|
>
|
||||||
<template #body-cell-ID="props">
|
<template #body-cell-ID="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
|
@ -233,7 +238,7 @@ const openCreateInvoiceIn = () => {
|
||||||
name="preview"
|
name="preview"
|
||||||
size="xs"
|
size="xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="viewSummary(props?.row?.routeFk, RouteSummary)"
|
@click.stop="viewSummary(props?.row?.routeFk, RouteSummary)"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Preview') }}</QTooltip>
|
<QTooltip>{{ t('Preview') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
|
@ -15,10 +15,12 @@ import axios from 'axios';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import {useSummaryDialog} from "composables/useSummaryDialog";
|
import {useSummaryDialog} from "composables/useSummaryDialog";
|
||||||
import RoadmapSummary from "pages/Route/Roadmap/RoadmapSummary.vue";
|
import RoadmapSummary from "pages/Route/Roadmap/RoadmapSummary.vue";
|
||||||
|
import {useRouter} from "vue-router";
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
const router = useRouter();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
|
||||||
const to = Date.vnNew();
|
const to = Date.vnNew();
|
||||||
|
@ -124,6 +126,10 @@ function confirmRemove() {
|
||||||
})
|
})
|
||||||
.onOk(() => refreshKey.value++);
|
.onOk(() => refreshKey.value++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function navigateToRoadmapSummary(event, row) {
|
||||||
|
router.push({ name: 'RoadmapSummary', params: { id: row.id } })
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -219,7 +225,7 @@ function confirmRemove() {
|
||||||
:rows-per-page-options="[0]"
|
:rows-per-page-options="[0]"
|
||||||
hide-pagination
|
hide-pagination
|
||||||
:pagination="{ sortBy: 'ID', descending: true }"
|
:pagination="{ sortBy: 'ID', descending: true }"
|
||||||
:on-row-click="(evt, row) => console.log(evt, row)"
|
@row-click="navigateToRoadmapSummary"
|
||||||
>
|
>
|
||||||
<template #body-cell-carrier="props">
|
<template #body-cell-carrier="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
|
|
Loading…
Reference in New Issue