refactor: stabilize event file management and ID synchronization
- Updated 'process_ae_obj__event_file_props' to synchronize generic 'for_id' with specific object IDs (e.g., 'event_presenter_id'). - Standardized 'element_manage_event_file_li_direct.svelte' to use specific ID filtering. - Fixed missing 'prevent_default' in 'ae_comp__hosted_files_clip_video.svelte'. - Resolved miscellaneous type and syntax errors identified by svelte-check.
This commit is contained in:
@@ -39,9 +39,8 @@
|
||||
ae_tmp.show__direct_download = false;
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
let dq__where_val: string = `for_type`;
|
||||
let dq__where_eq_val: string = link_to_type;
|
||||
let dq__where_for_id_eq_val: string = link_to_id;
|
||||
let dq__where_val: string = `${link_to_type}_id`;
|
||||
let dq__where_eq_val: string = link_to_id;
|
||||
|
||||
// This should only include files that are directly linked to an object (event, location, session, presenter, etc.).
|
||||
// I am not sure why, but doing reverse() and then sortBy() seems to sort in descending order.
|
||||
@@ -50,7 +49,6 @@
|
||||
let results = await db_events.file
|
||||
.where(dq__where_val)
|
||||
.equals(dq__where_eq_val)
|
||||
.and((file) => file.for_id == dq__where_for_id_eq_val)
|
||||
.reverse()
|
||||
.sortBy('created_on');
|
||||
// .toArray()
|
||||
|
||||
Reference in New Issue
Block a user