forked from verdnatura/salix-front
Fix autonomous route
This commit is contained in:
parent
616d8519fa
commit
75733fd530
|
@ -4,22 +4,22 @@ import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
||||||
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
||||||
import RouteSummaryDialog from 'pages/Route/Card/RouteSummaryDialog.vue';
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
|
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
|
||||||
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
|
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
|
||||||
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
import { useQuasar } from 'quasar';
|
|
||||||
import useNotify from 'composables/useNotify';
|
import useNotify from 'composables/useNotify';
|
||||||
import RouteAutonomousFilter from 'pages/Route/Card/RouteAutonomousFilter.vue';
|
import RouteAutonomousFilter from 'pages/Route/Card/RouteAutonomousFilter.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import RouteSummary from "pages/Route/Card/RouteSummary.vue";
|
||||||
|
import {useSummaryDialog} from "composables/useSummaryDialog";
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
|
||||||
onMounted(() => (stateStore.rightDrawer = true));
|
onMounted(() => (stateStore.rightDrawer = true));
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
|
@ -131,18 +131,6 @@ const openCreateInvoiceIn = () => {
|
||||||
|
|
||||||
router.push({ name: 'RouteAutonomousCreateInvoiceIn', query: { q: params } });
|
router.push({ name: 'RouteAutonomousCreateInvoiceIn', query: { q: params } });
|
||||||
};
|
};
|
||||||
|
|
||||||
function previewRoute(id) {
|
|
||||||
if (!id) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
quasar.dialog({
|
|
||||||
component: RouteSummaryDialog,
|
|
||||||
componentProps: {
|
|
||||||
id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -245,7 +233,7 @@ function previewRoute(id) {
|
||||||
name="preview"
|
name="preview"
|
||||||
size="xs"
|
size="xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="previewRoute(props?.row?.routeFk)"
|
@click="viewSummary(props?.row?.routeFk, RouteSummary)"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Preview') }}</QTooltip>
|
<QTooltip>{{ t('Preview') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
|
@ -29,24 +29,6 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Route/RouteList.vue'),
|
component: () => import('src/pages/Route/RouteList.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'roadmap',
|
|
||||||
name: 'RouteRoadmap',
|
|
||||||
meta: {
|
|
||||||
title: 'RouteRoadmap',
|
|
||||||
icon: 'vn:troncales',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'roadmap/create',
|
|
||||||
name: 'RouteRoadmapCreate',
|
|
||||||
meta: {
|
|
||||||
title: 'RouteRoadmapCreate',
|
|
||||||
icon: 'vn:troncales',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
|
@ -72,6 +54,24 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Route/RouteAutonomousCreateInvoiceIn.vue'),
|
component: () => import('src/pages/Route/RouteAutonomousCreateInvoiceIn.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'roadmap',
|
||||||
|
name: 'RouteRoadmap',
|
||||||
|
meta: {
|
||||||
|
title: 'RouteRoadmap',
|
||||||
|
icon: 'vn:troncales',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'roadmap/create',
|
||||||
|
name: 'RouteRoadmapCreate',
|
||||||
|
meta: {
|
||||||
|
title: 'RouteRoadmapCreate',
|
||||||
|
icon: 'vn:troncales',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'cmr',
|
path: 'cmr',
|
||||||
name: 'CmrList',
|
name: 'CmrList',
|
||||||
|
|
Loading…
Reference in New Issue