forked from verdnatura/salix-front
Route summary link logic improvement
This commit is contained in:
parent
fe5e448cf0
commit
b0d43edbce
|
@ -15,8 +15,8 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
summaryRouteName: {
|
||||
type: String,
|
||||
entityId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
@ -59,11 +59,11 @@ watch(props, async () => {
|
|||
<div class="summaryHeader bg-primary q-pa-md text-weight-bolder">
|
||||
<slot name="header-left">
|
||||
<router-link
|
||||
v-if="!isSummary && summaryRouteName"
|
||||
v-if="!isSummary && route.meta.moduleName"
|
||||
class="header link"
|
||||
:to="{
|
||||
name: summaryRouteName,
|
||||
params: { id: entity.id },
|
||||
name: `${route.meta.moduleName}Summary`,
|
||||
params: { id: entityId || entity.id },
|
||||
}"
|
||||
>
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
|
|
|
@ -172,6 +172,7 @@ function openDialog(dmsId) {
|
|||
<CardSummary
|
||||
ref="summary"
|
||||
:url="`Claims/${entityId}/getSummary`"
|
||||
:entity-id="entityId"
|
||||
@on-fetch="getClaimDms"
|
||||
>
|
||||
<template #header="{ entity: { claim } }">
|
||||
|
|
|
@ -147,15 +147,9 @@ const fetchEntryBuys = async () => {
|
|||
:url="`Entries/${entityId}/getEntry`"
|
||||
@on-fetch="(data) => setEntryData(data)"
|
||||
>
|
||||
<template #header-left>
|
||||
<a class="header link" :href="entryUrl">
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
</a>
|
||||
</template>
|
||||
<template #header>
|
||||
<span>{{ entry.id }} - {{ entry.supplier.nickname }}</span>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
<QCard class="vn-one">
|
||||
<a class="header link" :href="entryUrl">
|
||||
|
|
|
@ -95,7 +95,11 @@ const ticketsColumns = ref([
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<CardSummary ref="summary" :url="`InvoiceOuts/${entityId}/summary`">
|
||||
<CardSummary
|
||||
ref="summary"
|
||||
:url="`InvoiceOuts/${entityId}/summary`"
|
||||
:entity-id="entityId"
|
||||
>
|
||||
<template #header="{ entity: { invoiceOut } }">
|
||||
<div>{{ invoiceOut.ref }} - {{ invoiceOut.client?.socialName }}</div>
|
||||
</template>
|
||||
|
|
|
@ -132,12 +132,11 @@ const openBuscaman = async (route, ticket) => {
|
|||
|
||||
<template>
|
||||
<div class="q-pa-md">
|
||||
<CardSummary ref="summary" :url="`Routes/${entityId}/summary`">
|
||||
<template #header-left>
|
||||
<RouterLink :to="{ name: `RouteSummary`, params: { id: entityId } }">
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
</RouterLink>
|
||||
</template>
|
||||
<CardSummary
|
||||
ref="summary"
|
||||
:url="`Routes/${entityId}/summary`"
|
||||
:entity-id="entityId"
|
||||
>
|
||||
<template #header="{ entity }">
|
||||
<span>{{ `${entity?.route.id} - ${entity?.route?.description}` }}</span>
|
||||
</template>
|
||||
|
|
|
@ -49,7 +49,6 @@ const isAdministrative = computed(() => {
|
|||
<CardSummary
|
||||
ref="summaryRef"
|
||||
:url="`Suppliers/${entityId}/getSummary`"
|
||||
summary-route-name="SupplierSummary"
|
||||
@on-fetch="(data) => setData(data)"
|
||||
>
|
||||
<template #header>
|
||||
|
|
|
@ -236,19 +236,9 @@ async function setTravelData(travelData) {
|
|||
:url="`Travels/${entityId}/getTravel`"
|
||||
@on-fetch="(data) => setTravelData(data)"
|
||||
>
|
||||
<template #header-left>
|
||||
<router-link
|
||||
class="header link"
|
||||
:to="{ name: 'TravelSummary', params: { id: entityId } }"
|
||||
>
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
<QTooltip>{{ t('travel.pageTitles.summary') }}</QTooltip>
|
||||
</router-link>
|
||||
</template>
|
||||
<template #header>
|
||||
<span>{{ travel.ref }} - {{ travel.id }}</span>
|
||||
</template>
|
||||
|
||||
<template #header-right>
|
||||
<QBtn color="white" dense flat icon="more_vert" round size="md">
|
||||
<QTooltip>
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'suppliers',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'claims',
|
||||
icon: 'vn:claims',
|
||||
moduleName: 'Claim',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ClaimMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'customers',
|
||||
icon: 'vn:client',
|
||||
moduleName: 'Customer',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'CustomerMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'entries',
|
||||
icon: 'vn:entry',
|
||||
moduleName: 'Entry',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'EntryMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'invoiceIns',
|
||||
icon: 'vn:invoice-in',
|
||||
moduleName: 'InvoiceIn',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceInMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'invoiceOuts',
|
||||
icon: 'vn:invoice-out',
|
||||
moduleName: 'InvoiceOut',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'InvoiceOutMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'order',
|
||||
icon: 'vn:basket',
|
||||
moduleName: 'Order',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'OrderMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'routes',
|
||||
icon: 'vn:delivery',
|
||||
moduleName: 'Route',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'RouteMain' },
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
import {RouterView} from "vue-router";
|
||||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/shelving',
|
||||
name: 'Shelving',
|
||||
meta: {
|
||||
title: 'shelving',
|
||||
icon: 'vn:inventory'
|
||||
icon: 'vn:inventory',
|
||||
moduleName: 'Shelving',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'ShelvingMain' },
|
||||
menus: {
|
||||
main: ['ShelvingList'],
|
||||
card: ['ShelvingBasicData', 'ShelvingLog']
|
||||
card: ['ShelvingBasicData', 'ShelvingLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -51,8 +52,7 @@ export default {
|
|||
meta: {
|
||||
title: 'summary',
|
||||
},
|
||||
component: () =>
|
||||
import('pages/Shelving/Card/ShelvingSummary.vue'),
|
||||
component: () => import('pages/Shelving/Card/ShelvingSummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'ShelvingBasicData',
|
||||
|
@ -75,6 +75,5 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'tickets',
|
||||
icon: 'vn:ticket',
|
||||
moduleName: 'Ticket',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'TicketMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'travel',
|
||||
icon: 'local_airport',
|
||||
moduleName: 'Travel',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'TravelMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'wagons',
|
||||
icon: 'vn:trolley',
|
||||
moduleName: 'Wagon',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'WagonMain' },
|
||||
|
|
|
@ -6,6 +6,7 @@ export default {
|
|||
meta: {
|
||||
title: 'workers',
|
||||
icon: 'vn:worker',
|
||||
moduleName: 'Worker',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'WorkerMain' },
|
||||
|
|
Loading…
Reference in New Issue