perf: TicketLackLit

This commit is contained in:
Javier Segarra 2024-06-12 23:06:56 +02:00
parent 4226c52fc5
commit f816cb9240
1 changed files with 25 additions and 7 deletions

View File

@ -12,6 +12,7 @@ import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOrigin
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { onBeforeMount } from 'vue';
import { dashIfEmpty, toDate, toHour } from 'src/filters';
const DEFAULT_WAREHOUSE = 'Algemesi';
const stateStore = useStateStore();
@ -32,9 +33,18 @@ const originDialogRef = ref();
const totalNegativeDialogRef = ref();
const columns = computed(() => [
{
name: 'minTimed',
name: 'Date',
label: t('negative.minTimed'),
field: ({ minTimed }) => minTimed,
field: 'timed',
format: (val) => toDate(val),
sortable: true,
},
{
name: 'timed',
label: t('negative.timed'),
field: 'timed',
format: (val) => toHour(val),
sortable: true,
},
{
@ -54,7 +64,8 @@ const columns = computed(() => [
{
name: 'producer',
label: t('negative.supplier'),
field: ({ producer }) => producer,
field: ({ producer }) => dashIfEmpty(producer),
sortable: true,
},
{
@ -72,8 +83,7 @@ const columns = computed(() => [
{
name: 'category',
label: t('negative.origen'),
field: ({ category }) => category,
align: 'left',
field: ({ category }) => dashIfEmpty(category),
sortable: true,
},
{
@ -197,8 +207,16 @@ const handleWarehouses = async (data) => {
</template>
<template #body-cell-producer="{ value }">
<QTd align="right" class="text-primary">
<QBtn flat color="blue" dense>{{ value }}</QBtn>
<QTd align="right">
<QBtn
v-if="value !== '-'"
flat
class="text-primary"
color="blue"
dense
>{{ value }}</QBtn
>
<span v-else>{{ value }}</span>
</QTd>
</template>