diff --git a/src/actions/ticket-actions.js b/src/actions/ticket-actions.js index 1beb5d08c..8c4ab052a 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("has_promo_code==0"); + } + 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") && (