From 9dc22b39e24a2dca1264b5793cc55ccdc1e3feac Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 7 Feb 2025 23:02:17 +0100 Subject: [PATCH 1/4] feat: add more filters --- .../Customer/Card/CustomerConsumption.vue | 92 ++++++++++++++++++- src/pages/Customer/locale/en.yml | 3 + src/pages/Customer/locale/es.yml | 3 + 3 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue index f0d8dea47..cf80e42eb 100644 --- a/src/pages/Customer/Card/CustomerConsumption.vue +++ b/src/pages/Customer/Card/CustomerConsumption.vue @@ -61,6 +61,60 @@ const columns = computed(() => [ columnFilter: false, cardVisible: true, }, + { + align: 'left', + name: 'buyerId', + label: t('components.itemsFilterPanel.salesPersonFk'), + component: 'select', + attrs: { + url: 'TicketRequests/getItemTypeWorker', + optionLabel: 'nickname', + optionValue: 'id', + + fields: ['id', 'nickname'], + sortBy: ['nickname ASC'], + optionFilter: 'firstName', + }, + cardVisible: false, + visible: false, + }, + // { + // align: 'left', + // name: 'typeId', + // label: t('globals.pageTitles.itemType'), + // component: 'select', + // attrs: ({ model }) => { + // return { + // url: 'ItemTypes', + // optionLabel: 'name', + // optionValue: (row) => row.category?.name, + // optionCaption: (row) => row.category?.name, + // template: ``, + // htmlContent: ``, + // include: 'category', + // fields: ['id', 'name', 'categoryFk'], + // sortBy: ['name ASC'], + // 'phone-number': model, + // }; + // }, + // attrs: { + // }, + // cardVisible: false, + // visible: false, + // }, + // { + // align: 'left', + // name: 'categoryId', + // label: t('item.list.category'), + // component: 'select', + // attrs: { + // url: 'ItemCategories', + // fields: ['id', 'name'], + // sortBy: ['name ASC'], + // }, + // cardVisible: false, + // visible: false, + // }, { name: 'description', align: 'left', @@ -119,7 +173,7 @@ const openSendEmailDialog = async () => { openConfirmationModal( t('The consumption report will be sent'), t('Please, confirm'), - () => sendCampaignMetricsEmail({ address: arrayData.store.data.email }) + () => sendCampaignMetricsEmail({ address: arrayData.store.data.email }), ); }; const sendCampaignMetricsEmail = ({ address }) => { @@ -152,7 +206,7 @@ const updateDateParams = (value, params) => { v-if="campaignList" data-key="CustomerConsumption" url="Clients/consumption" - :order="['itemTypeFk', 'itemName', 'itemSize', 'description']" + :order="['itemTypeFk', 'itemName', 'itemSize', 'description']" :filter="{ where: { clientFk: route.params.id } }" :columns="columns" search-url="consumption" @@ -204,6 +258,40 @@ 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 From cdf600cbd0d0bf1f3793c16894f50e5c4b771c57 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 10 Feb 2025 11:04:42 +0100 Subject: [PATCH 4/4] fix: replace i18n --- src/components/ItemsFilterPanel.vue | 2 -- src/i18n/locale/es.yml | 1 - src/pages/Customer/Card/CustomerConsumption.vue | 2 +- src/pages/Customer/locale/es.yml | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 48f607a30..b6209d8e2 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -328,7 +328,6 @@ en: active: Is active visible: Is visible floramondo: Is floramondo - salesPersonFk: Buyer categoryFk: Category es: @@ -339,7 +338,6 @@ es: active: Activo visible: Visible floramondo: Floramondo - salesPersonFk: Comprador categoryFk: Categoría Plant: Planta natural Flower: Flor fresca diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index a082ca88d..4b8aca499 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -653,7 +653,6 @@ supplier: tableVisibleColumns: nif: NIF/CIF account: Cuenta - summary: responsible: Responsable verified: Verificado diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue index 14b69492b..38582384d 100644 --- a/src/pages/Customer/Card/CustomerConsumption.vue +++ b/src/pages/Customer/Card/CustomerConsumption.vue @@ -64,7 +64,7 @@ const columns = computed(() => [ { align: 'left', name: 'buyerId', - label: t('components.itemsFilterPanel.salesPersonFk'), + label: t('customer.params.buyerId'), component: 'select', attrs: { url: 'TicketRequests/getItemTypeWorker', diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml index 1cc9ff26d..f50d049da 100644 --- a/src/pages/Customer/locale/es.yml +++ b/src/pages/Customer/locale/es.yml @@ -109,7 +109,7 @@ customer: socialName: Razón social campaign: Campaña typeId: Familia - buyerId: Familia + buyerId: Comprador categoryId: Reino city: Ciudad phone: Teléfono