refactor: refs #8616 simplify template bindings and improve link generation in VehicleSummary
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
485ef71f4a
commit
9e36ddfd8f
|
@ -129,7 +129,7 @@ const toModule = computed(() =>
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="descriptor" v-bind="$attrs">
|
||||
<div class="descriptor">
|
||||
<template v-if="entity && !isLoading">
|
||||
<div class="header bg-primary q-pa-sm justify-between">
|
||||
<slot name="header-extra-action"
|
||||
|
|
|
@ -34,7 +34,7 @@ const entityId = computed(() => {
|
|||
:url="`Roadmaps/${entityId}`"
|
||||
:filter="filter"
|
||||
data-key="Roadmap"
|
||||
:summary="$props.summary"
|
||||
:summary="summary"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
||||
|
|
|
@ -8,7 +8,6 @@ import { useSummaryDialog } from 'composables/useSummaryDialog';
|
|||
import toCurrency from 'filters/toCurrency';
|
||||
import axios from 'axios';
|
||||
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
||||
|
|
|
@ -11,7 +11,6 @@ const { notify } = useNotify();
|
|||
:url="`Vehicles/${$route.params.id}`"
|
||||
data-key="Vehicle"
|
||||
title="numberPlate"
|
||||
:to-module="{ name: 'VehicleList' }"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<QItem
|
||||
|
|
|
@ -13,12 +13,13 @@ const props = defineProps({ id: { type: [Number, String], default: null } });
|
|||
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => props.id || +route.params.id);
|
||||
const baseLink = `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}`;
|
||||
const links = {
|
||||
'basic-data': `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/basic-data`,
|
||||
notes: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/notes`,
|
||||
dms: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/dms`,
|
||||
'invoice-in': `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/invoice-in`,
|
||||
events: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/events`,
|
||||
'basic-data': `${baseLink}/basic-data`,
|
||||
notes: `${baseLink}/notes`,
|
||||
dms: `${baseLink}/dms`,
|
||||
'invoice-in': `${baseLink}/invoice-in`,
|
||||
events: `${baseLink}/events`,
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue