Fix(IDAA): Harden Recovery Meetings search and fix detail page crash

- Search Hardening: Implemented 'Inclusive OR' logic for physical/virtual filters and restored robust full-text search using 'default_qry_str' with wildcards.
- Crash Fix: Added null checks for 'contact_li_json' in meeting detail view to prevent TypeError.
- ID Stability: Enhanced 'core__idb_dexie.ts' to support 'id_random' mapping and fixed misleading save logging.
- Reliability: Both V2 and V3 search paths now consistently return processed objects with standardized IDs.
This commit is contained in:
Scott Idem
2026-01-20 17:45:35 -05:00
parent 07d7b4ec6d
commit f244526538
4 changed files with 7 additions and 158 deletions

View File

@@ -13,11 +13,11 @@ function find_object_id(
table_name: string,
log_lvl: number
): string | number | undefined {
const potential_keys = ['id', `${table_name}_id`, `${table_name}_id_random`];
const potential_keys = ['id', 'id_random', `${table_name}_id`, `${table_name}_id_random`];
for (const key of potential_keys) {
if (obj[key]) {
if (key !== 'id' && log_lvl > 0) {
if (key !== 'id' && log_lvl > 1) {
console.warn(
`Found legacy ID key "${key}" for table "${table_name}". Consider standardizing to "id".`,
obj
@@ -115,7 +115,7 @@ export async function db_save_ae_obj_li__ae_obj<T extends Record<string, any>>({
// bulkPut efficiently handles both inserts and updates.
const keys = await db_table.bulkPut(data_to_save);
if (log_lvl > 0) {
console.log(`Successfully saved ${keys.length} objects to "${table_name}".`);
console.log(`Successfully saved ${data_to_save.length} objects to "${table_name}".`);
}
return keys;
} catch (error) {