fix(badges): update badge type list and fix filter-only search
Update badge type codes for Axonius 2026 (replaces ISHLT 2024 list). Added TODO to drive this from event templates in the future. Fix printed status and badge type filters not working without a text query. The min_chars guard was blocking all filter-only searches, causing "Printed" and "Not Printed" to always return empty results. Now bypasses min_chars when any non-default filter is active (printed status, type code, or affiliations), since selecting a filter is explicit user intent regardless of the text query. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -218,7 +218,10 @@ async function handle_search_refresh(params: any) {
|
||||
const min_chars = params.min_chars;
|
||||
|
||||
// Defense-in-depth: enforce min_chars even if the search component lets one through.
|
||||
if (qry_str.length < min_chars) {
|
||||
// Exception: if the user has set a non-default filter (printed status, type, affiliations),
|
||||
// that is an explicit intent — run the search even without a text query.
|
||||
const has_active_filters = printed_status !== 'all' || !!type_code || !!aff_str;
|
||||
if (qry_str.length < min_chars && !has_active_filters) {
|
||||
untrack(() => {
|
||||
event_badge_id_li = [];
|
||||
$events_sess.badges.search_status = 'done';
|
||||
|
||||
Reference in New Issue
Block a user