Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/actions/ticket-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
30 changes: 30 additions & 0 deletions src/pages/tickets/ticket-list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const defaultFilters = {
isActiveFilter: null,
showOnlyPrintable: false,
excludeFreeUnassigned: false,
noPromocodeFilter: false,
promocodesFilter: [],
promocodeTagsFilter: [],
accessLevelFilter: [],
Expand Down Expand Up @@ -412,6 +413,7 @@ class TicketListPage extends React.Component {
isActiveFilter: null,
showOnlyPrintable: false,
excludeFreeUnassigned: false,
noPromocodeFilter: false,
promocodesFilter: [],
promocodeTagsFilter: [],
badgeTypesFilter: [],
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1259,6 +1265,30 @@ class TicketListPage extends React.Component {
</div>
</div>
)}
{enabledFilters.includes("noPromocodeFilter") && (
<div className="col-md-6">
<div className="form-check abc-checkbox">
<input
type="checkbox"
id="noPromocodeFilter"
checked={ticketFilters.noPromocodeFilter}
onChange={(ev) =>
this.handleFilterChange(
"noPromocodeFilter",
ev.target.checked
)
}
className="form-check-input"
/>
<label
className="form-check-label"
htmlFor="noPromocodeFilter"
>
{T.translate("ticket_list.no_promo_code")} &nbsp;
</label>
</div>
</div>
)}
{enabledFilters.includes("badgeTypesFilter") && (
<div className="col-md-6">
<Select
Expand Down