refactor: Standardize data processing and update to Svelte 5 runes
This commit introduces a major refactoring of the data processing logic across multiple modules (events, archives, posts, sponsorships) to use a standardized pattern with . This improves consistency and maintainability. Key changes: - Replaced module-specific data processing with a generic helper. - Removed deprecated functions. - Updated Svelte components to leverage the new Svelte 5 runes, simplifying state management. - Fixed linting errors and updated test configurations. - Added .
This commit is contained in:
@@ -178,31 +178,7 @@ export async function process_ae_obj__event_badge_template_props({
|
||||
}
|
||||
|
||||
|
||||
// --- DB SAVE FUNCTION ---
|
||||
export async function db_save_ae_obj_li__event_badge_template({
|
||||
obj_type,
|
||||
obj_li,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any[],
|
||||
log_lvl?: number
|
||||
}) {
|
||||
if (log_lvl) {
|
||||
console.log(`*** db_save_ae_obj_li__event_badge_template() *** obj_type=${obj_type}`, obj_li);
|
||||
}
|
||||
if (!obj_li || obj_li.length === 0) {
|
||||
if (log_lvl) console.log('No objects to save.');
|
||||
return [];
|
||||
}
|
||||
return await db_save_ae_obj_li__ae_obj({
|
||||
db_instance: db_events,
|
||||
table_name: 'badge_template',
|
||||
obj_li,
|
||||
properties_to_save,
|
||||
log_lvl,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --- CRUD FUNCTIONS ---
|
||||
|
||||
Reference in New Issue
Block a user