refactor(badges): complete field normalization and search mapping

- Finalized the rename of 'default_qry_string' to 'default_qry_str' across the Badge library, Dexie schema, and API documentation.
- Synchronized all reactive filtering in '+page.svelte' with the standardized field names to restore full search functionality.
- Verified that text search, affiliations, and types now correctly map to whitelisted backend fields.
This commit is contained in:
Scott Idem
2026-01-27 18:04:08 -05:00
parent 5219bd0c9c
commit 8680ad89c1
4 changed files with 8 additions and 4 deletions

View File

@@ -479,7 +479,7 @@ This document provides a reference for the data structures of the core Aether AP
- `print_count`: `Optional[int]`
- `cfg_json`: `Optional[Union[Json, None]]`
- `data_json`: `Optional[Union[Json, None]]`
- `default_qry_string`: `Optional[str]`
- `default_qry_str`: `Optional[str]`
- `hide`: `Optional[bool]`
- `priority`: `Optional[bool]`
- `sort`: `Optional[int]`

View File

@@ -381,7 +381,7 @@ export async function search__event_badge({
const params: key_val = {};
// Standardized Text Search Pattern (V3 API)
// NOTE: Using 'default_qry_str' (Strict DB Column) instead of 'default_qry_string'
// NOTE: Using 'default_qry_str' (Strict DB Column)
if (fulltext_search_qry_str && fulltext_search_qry_str.trim().length > 0) {
const qry = fulltext_search_qry_str.trim();
search_query.and.push({ field: 'default_qry_str', op: 'like', value: `%${qry}%` });
@@ -508,7 +508,7 @@ export const properties_to_save = [
'external_event_id',
'external_id',
'external_person_id',
'default_qry_string',
'default_qry_str',
'alert',
'enable',
'hide',

View File

@@ -820,7 +820,7 @@ export class MySubClassedDexie extends Dexie {
affiliations, affiliations_override,
badge_type, badge_type_code, badge_type_code_override, badge_type_override,
external_event_id, external_id, external_person_id,
default_qry_string,
default_qry_str,
alert,
tmp_sort_1, tmp_sort_2,
print_count, print_first_datetime, print_last_datetime,

View File

@@ -207,6 +207,10 @@
} catch (e) {
if (log_lvl) console.warn('Badge Fast Path failed.', e);
}
} else {
untrack(() => {
event_badge_id_li = [];
});
}
// 3. REVALIDATE: API Request