#7010 added packing type field #762

Merged
jon merged 12 commits from 7010-AddPackingField into dev 2024-10-18 07:40:38 +00:00
1 changed files with 13 additions and 3 deletions
Showing only changes of commit 6d5a8cba6f - Show all commits

View File

@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
import { date } from 'quasar';
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 TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';
@ -101,8 +101,6 @@ const columns = computed(() => [
align: 'left',
name: 'itemPackingTypeFk',
label: t('ticketSale.packaging'),
format: (row, dashIfEmpty) =>
dashIfEmpty(row?.ticketSales[0]?.item.itemPackingTypeFk),
},
{
align: 'right',
@ -221,6 +219,18 @@ const setShippedColor = (date) => {
</QBadge>
<span v-else> {{ toDateFormat(row.shipped) }}</span>
</template>
<template #column-itemPackingTypeFk="{ row }">
<span>
{{
dashIfEmpty(
row?.ticketSales
jon marked this conversation as resolved Outdated

Moveria la logica a un composable y asi si algun dia cambiamos el caracter podemos ir a la funcion y solo cambiar una variable en vez del template

Moveria la logica a un composable y asi si algun dia cambiamos el caracter podemos ir a la funcion y solo cambiar una variable en vez del template
.map((sale) => sale.item?.itemPackingTypeFk || '-')
.filter((value) => value !== '-')
.join(', ')
)
}}

Mmm...en la configuracion de columns podemos ejecutar esta funcion, no?
En format creo

Mmm...en la configuracion de columns podemos ejecutar esta funcion, no? En format creo
</span>
</template>
</VnTable>
</template>