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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="descriptor" v-bind="$attrs">
|
<div class="descriptor">
|
||||||
<template v-if="entity && !isLoading">
|
<template v-if="entity && !isLoading">
|
||||||
<div class="header bg-primary q-pa-sm justify-between">
|
<div class="header bg-primary q-pa-sm justify-between">
|
||||||
<slot name="header-extra-action"
|
<slot name="header-extra-action"
|
||||||
|
|
|
@ -34,7 +34,7 @@ const entityId = computed(() => {
|
||||||
:url="`Roadmaps/${entityId}`"
|
:url="`Roadmaps/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="Roadmap"
|
data-key="Roadmap"
|
||||||
:summary="$props.summary"
|
:summary="summary"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
||||||
|
|
|
@ -8,7 +8,6 @@ import { useSummaryDialog } from 'composables/useSummaryDialog';
|
||||||
import toCurrency from 'filters/toCurrency';
|
import toCurrency from 'filters/toCurrency';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
||||||
|
|
|
@ -11,7 +11,6 @@ const { notify } = useNotify();
|
||||||
:url="`Vehicles/${$route.params.id}`"
|
:url="`Vehicles/${$route.params.id}`"
|
||||||
data-key="Vehicle"
|
data-key="Vehicle"
|
||||||
title="numberPlate"
|
title="numberPlate"
|
||||||
:to-module="{ name: 'VehicleList' }"
|
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<QItem
|
<QItem
|
||||||
|
|
|
@ -13,12 +13,13 @@ const props = defineProps({ id: { type: [Number, String], default: null } });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const entityId = computed(() => props.id || +route.params.id);
|
const entityId = computed(() => props.id || +route.params.id);
|
||||||
|
const baseLink = `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}`;
|
||||||
const links = {
|
const links = {
|
||||||
'basic-data': `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/basic-data`,
|
'basic-data': `${baseLink}/basic-data`,
|
||||||
notes: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/notes`,
|
notes: `${baseLink}/notes`,
|
||||||
dms: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/dms`,
|
dms: `${baseLink}/dms`,
|
||||||
'invoice-in': `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/invoice-in`,
|
'invoice-in': `${baseLink}/invoice-in`,
|
||||||
events: `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}/events`,
|
events: `${baseLink}/events`,
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue