refactor(events, idaa): standardize on String-only IDs and remove '_random' suffix
Aligned the Events Badges, Templates, and IDAA Bulletin Board modules with Aether UI/UX v3 standards by prioritizing semantic String IDs (e.g., event_id, badge_id) over legacy '_random' variants in API helpers, Dexie processors, and UI components. - Refactored badge and template loaders to use clean ID field names. - Updated search and LiveQuery logic in badge management views. - Cleaned up unused imports and legacy code in +layout and +page components. - Standardized ID mapping in generic object processors. - Improved IDAA post creation UX with autofocus and empty title defaults.
This commit is contained in:
@@ -11,9 +11,7 @@ const ae_promises: key_val = {};
|
||||
export const properties_to_save_exhibit = [
|
||||
'id',
|
||||
'event_exhibit_id',
|
||||
// 'event_exhibit_id_random',
|
||||
'event_id',
|
||||
// 'event_id_random',
|
||||
'code',
|
||||
'name',
|
||||
'description',
|
||||
@@ -74,7 +72,7 @@ async function _process_generic_props<T extends Record<string, any>>({
|
||||
// 2. Primary Key Mapping (Dexie compatible)
|
||||
const randomIdKey = `${obj_type}_id_random`;
|
||||
const baseIdKey = `${obj_type}_id`;
|
||||
|
||||
|
||||
// Prioritize the base ID field as the primary source of truth
|
||||
if (processed_obj[baseIdKey]) {
|
||||
(processed_obj as any).id = String(processed_obj[baseIdKey]);
|
||||
|
||||
Reference in New Issue
Block a user