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