diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue index f3f884316..14b69492b 100644 --- a/src/pages/Customer/Card/CustomerConsumption.vue +++ b/src/pages/Customer/Card/CustomerConsumption.vue @@ -91,6 +91,7 @@ const columns = computed(() => [ name: 'quantity', label: t('globals.quantity'), cardVisible: true, + visible: true, columnFilter: { inWhere: true, }, @@ -155,11 +156,11 @@ const updateDateParams = (value, params) => { const campaign = campaignList.value.find((c) => c.id === value); if (!campaign) return; - const { dated, previousDays, scopeDays } = campaign; - const _date = new Date(dated); - const [from, to] = dateRange(_date); - params.from = new Date(from.setDate(from.getDate() - previousDays)).toISOString(); - params.to = new Date(to.setDate(to.getDate() + scopeDays)).toISOString(); + const { dated, scopeDays } = campaign; + const from = new Date(dated); + from.setDate(from.getDate() - scopeDays); + params.from = from; + params.to = dated; return params; }; @@ -261,19 +262,18 @@ const updateDateParams = (value, params) => { :label="t('globals.campaign')" :filled="true" class="q-px-sm q-pt-none fit" - dense - option-label="code" + :option-label="(opt) => t(opt.code)" + :fields="['id', 'code', 'dated', 'scopeDays']" @update:model-value="(data) => updateDateParams(data, params)" + dense > @@ -298,7 +298,19 @@ const updateDateParams = (value, params) => { +en: + + valentinesDay: Valentine's Day + mothersDay: Mother's Day + allSaints: All Saints' Day es: Enter a new search: Introduce una nueva búsqueda Group by items: Agrupar por artículos + valentinesDay: Día de San Valentín + mothersDay: Día de la Madre + allSaints: Día de Todos los Santos + Campaign consumption: Consumo campaña + Campaign: Campaña + From: Desde + To: Hasta