forked from verdnatura/salix-front
fix: #6943 fix customerSummaryTable
This commit is contained in:
parent
5230b8f722
commit
f927e9b722
|
@ -162,7 +162,8 @@ const navigateToticketSummary = (id) => {
|
|||
params: { id },
|
||||
});
|
||||
};
|
||||
const commonColumns = (col) => ['date', 'state', 'total'].includes(col);
|
||||
const commonColumns = (col) =>
|
||||
['date', 'state', 'total', 'route', 'nickname'].includes(col);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -190,13 +191,19 @@ const commonColumns = (col) => ['date', 'state', 'total'].includes(col);
|
|||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
||||
>
|
||||
<template v-if="!commonColumns(props.col.name)">
|
||||
<span
|
||||
:class="{
|
||||
link:
|
||||
props.col.name === 'route' ||
|
||||
props.col.name === 'nickname',
|
||||
}"
|
||||
>
|
||||
<span>
|
||||
{{ props.value }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="props.col.name === 'route'">
|
||||
<span class="link" @click.stop>
|
||||
<RouteDescriptorProxy :id="props.row.routeFk" />
|
||||
{{ props.value }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="props.col.name === 'nickname'">
|
||||
<span class="link" @click.stop>
|
||||
<CustomerDescriptorProxy :id="props.row.clientFk" />
|
||||
{{ props.value }}
|
||||
</span>
|
||||
</template>
|
||||
|
@ -220,14 +227,6 @@ const commonColumns = (col) => ['date', 'state', 'total'].includes(col);
|
|||
</QBadge>
|
||||
<div v-else>{{ toCurrency(props.value) }}</div>
|
||||
</template>
|
||||
<CustomerDescriptorProxy
|
||||
:id="props.row.clientFk"
|
||||
v-if="props.col.name === 'nickname'"
|
||||
/>
|
||||
<RouteDescriptorProxy
|
||||
:id="props.row.routeFk"
|
||||
v-if="props.col.name === 'route'"
|
||||
/>
|
||||
</component>
|
||||
</QTr>
|
||||
</QTd>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
defineProps({
|
||||
id: {
|
||||
|
@ -18,7 +20,13 @@ const { viewSummary } = useSummaryDialog();
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<QIcon color="primary" name="vn:lines" size="sm">
|
||||
{{ id }}
|
||||
<QIcon
|
||||
color="primary"
|
||||
name="vn:lines"
|
||||
size="sm"
|
||||
@click.stop="router.push({ params: { id }, name: 'TicketSale' })"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to lines') }}
|
||||
</QTooltip>
|
||||
|
|
Loading…
Reference in New Issue