refactor: refs #7010 added function to get item packaging type
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-10-02 11:52:16 +02:00
parent 0650380b7b
commit 0b76d0d556
1 changed files with 10 additions and 8 deletions

View File

@ -149,6 +149,15 @@ const setShippedColor = (date) => {
if (difference == 0) return 'warning';
if (difference < 0) return 'success';
};
const getItemPackagingType = (row) => {
const packagingType = row?.ticketSales
.map((sale) => sale.item?.itemPackingTypeFk || '-')
.filter((value) => value !== '-')
.join(', ');
return dashIfEmpty(packagingType);
};
</script>
<template>
@ -221,14 +230,7 @@ const setShippedColor = (date) => {
</template>
<template #column-itemPackingTypeFk="{ row }">
<span>
{{
dashIfEmpty(
row?.ticketSales
.map((sale) => sale.item?.itemPackingTypeFk || '-')
.filter((value) => value !== '-')
.join(', ')
)
}}
{{ getItemPackagingType(row) }}
</span>
</template>
</VnTable>