0
0
Fork 0

refactor: refs #7010 modified customer summary table

This commit is contained in:
Jon Elias 2024-09-26 10:20:50 +02:00
parent 56af4d3736
commit 6d5a8cba6f
1 changed files with 13 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
import { date } from 'quasar'; import { date } from 'quasar';
import { toDateFormat } from 'src/filters/date.js'; import { toDateFormat } from 'src/filters/date.js';
import { toCurrency } from 'src/filters'; import { dashIfEmpty, toCurrency } from 'src/filters';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue'; import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';
@ -101,8 +101,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'itemPackingTypeFk', name: 'itemPackingTypeFk',
label: t('ticketSale.packaging'), label: t('ticketSale.packaging'),
format: (row, dashIfEmpty) =>
dashIfEmpty(row?.ticketSales[0]?.item.itemPackingTypeFk),
}, },
{ {
align: 'right', align: 'right',
@ -221,6 +219,18 @@ const setShippedColor = (date) => {
</QBadge> </QBadge>
<span v-else> {{ toDateFormat(row.shipped) }}</span> <span v-else> {{ toDateFormat(row.shipped) }}</span>
</template> </template>
<template #column-itemPackingTypeFk="{ row }">
<span>
{{
dashIfEmpty(
row?.ticketSales
.map((sale) => sale.item?.itemPackingTypeFk || '-')
.filter((value) => value !== '-')
.join(', ')
)
}}
</span>
</template>
</VnTable> </VnTable>
</template> </template>