fix: summary
This commit is contained in:
parent
2288c527ae
commit
e45e7c519b
|
@ -135,7 +135,7 @@ const toModule = computed(() =>
|
||||||
dense
|
dense
|
||||||
size="md"
|
size="md"
|
||||||
icon="preview"
|
icon="preview"
|
||||||
color="white"
|
color="primary"
|
||||||
class="link"
|
class="link"
|
||||||
v-if="summary"
|
v-if="summary"
|
||||||
>
|
>
|
||||||
|
|
|
@ -61,7 +61,21 @@ async function fetch() {
|
||||||
|
|
||||||
const showRedirectToSummaryIcon = computed(() => {
|
const showRedirectToSummaryIcon = computed(() => {
|
||||||
const exist = existSummary(route.matched);
|
const exist = existSummary(route.matched);
|
||||||
return !isSummary.value && route.meta.moduleName && exist;
|
const isDialog = document.querySelectorAll('[role="dialog"]').length > 0;
|
||||||
|
|
||||||
|
// const isSameModule = `${route.meta.moduleName}Summary` === props.dataKey;
|
||||||
|
// if (!isSameModule) return true;
|
||||||
|
|
||||||
|
console.error(
|
||||||
|
isDialog,
|
||||||
|
'exist',
|
||||||
|
isSummary.value,
|
||||||
|
route.matched,
|
||||||
|
!isSummary.value,
|
||||||
|
route.meta.moduleName,
|
||||||
|
exist
|
||||||
|
);
|
||||||
|
return isDialog;
|
||||||
});
|
});
|
||||||
|
|
||||||
function existSummary(routes) {
|
function existSummary(routes) {
|
||||||
|
@ -91,7 +105,6 @@ function existSummary(routes) {
|
||||||
params: { id: entityId || entity.id },
|
params: { id: entityId || entity.id },
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<QIcon name="open_in_new" color="white" size="sm" />
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -67,6 +67,7 @@ const creditWarning = computed(() => {
|
||||||
ref="summary"
|
ref="summary"
|
||||||
:url="`Clients/${entityId}/summary`"
|
:url="`Clients/${entityId}/summary`"
|
||||||
data-key="CustomerSummary"
|
data-key="CustomerSummary"
|
||||||
|
module-name="Customer"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
|
|
|
@ -139,6 +139,9 @@ const setShippedColor = (date) => {
|
||||||
if (difference == 0) return 'warning';
|
if (difference == 0) return 'warning';
|
||||||
if (difference < 0) return 'success';
|
if (difference < 0) return 'success';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const rowClick = ({ id }) =>
|
||||||
|
window.open(router.resolve({ params: { id }, name: 'TicketSummary' }).href, '_blank');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -152,6 +155,7 @@ const setShippedColor = (date) => {
|
||||||
append-params="false"
|
append-params="false"
|
||||||
:without-header="true"
|
:without-header="true"
|
||||||
auto-load
|
auto-load
|
||||||
|
:row-click="rowClick"
|
||||||
order="shipped DESC, id"
|
order="shipped DESC, id"
|
||||||
:disable-option="{ card: true, table: true }"
|
:disable-option="{ card: true, table: true }"
|
||||||
class="full-width"
|
class="full-width"
|
||||||
|
|
Loading…
Reference in New Issue