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