From 82b65f6eb3d44b1101954654b058769a8982df43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Castillo?= Date: Thu, 16 Oct 2025 20:32:57 -0300 Subject: [PATCH 1/2] fix: add new filter for no promo code tickets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Castillo --- src/actions/ticket-actions.js | 4 ++++ src/i18n/en.json | 1 + src/pages/tickets/ticket-list-page.js | 30 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/src/actions/ticket-actions.js b/src/actions/ticket-actions.js index 1beb5d08c..cba5a2afd 100644 --- a/src/actions/ticket-actions.js +++ b/src/actions/ticket-actions.js @@ -183,6 +183,10 @@ const parseFilters = (filters, term = null) => { filter.push("exclude_is_printable_free_unassigned==1"); } + if (filters?.noPromocodeFilter) { + filter.push("not_promo_code_id==1"); + } + if (filters?.hasOwnerFilter) { if (filters.hasOwnerFilter === "HAS_OWNER") filter.push("has_owner==1"); if (filters.hasOwnerFilter === "HAS_NO_OWNER") filter.push("has_owner==0"); diff --git a/src/i18n/en.json b/src/i18n/en.json index d612b0206..67bedf3c9 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1613,6 +1613,7 @@ "show_printable": "Show Printable Tickets", "show_printable_info": "Active assigned ticket with the access level of IN_PERSON", "exclude_free_unassigned": "Exclude ALL free unassigned tickets?", + "no_promo_code": "Exclude ALL tickets with promo codes?", "items_qty": "Selected {qty} Tickets", "select_view_2_print": "Select a View Type to Print", "select_fields": "Show Columns", diff --git a/src/pages/tickets/ticket-list-page.js b/src/pages/tickets/ticket-list-page.js index 2c573fd3e..e8f06346f 100644 --- a/src/pages/tickets/ticket-list-page.js +++ b/src/pages/tickets/ticket-list-page.js @@ -131,6 +131,7 @@ const defaultFilters = { isActiveFilter: null, showOnlyPrintable: false, excludeFreeUnassigned: false, + noPromocodeFilter: false, promocodesFilter: [], promocodeTagsFilter: [], accessLevelFilter: [], @@ -412,6 +413,7 @@ class TicketListPage extends React.Component { isActiveFilter: null, showOnlyPrintable: false, excludeFreeUnassigned: false, + noPromocodeFilter: false, promocodesFilter: [], promocodeTagsFilter: [], badgeTypesFilter: [], @@ -732,6 +734,10 @@ class TicketListPage extends React.Component { label: T.translate("ticket_list.exclude_free_unassigned"), value: "excludeFreeUnassigned" }, + { + label: T.translate("ticket_list.no_promo_code"), + value: "noPromocodeFilter" + }, { label: T.translate("ticket_list.badge_type"), value: "badgeTypesFilter" @@ -1259,6 +1265,30 @@ class TicketListPage extends React.Component { )} + {enabledFilters.includes("noPromocodeFilter") && ( +
+
+ + this.handleFilterChange( + "noPromocodeFilter", + ev.target.checked + ) + } + className="form-check-input" + /> + +
+
+ )} {enabledFilters.includes("badgeTypesFilter") && (