Migrate Event and EventBadge modules to unified type system
- Updated ae_types.ts with ae_Event, ae_EventBadge, and ae_EventBadgeTemplate interfaces. - Standardized return types (Promise<ae_Event[]>, etc.) for all core loading and CRUD functions in Events module. - Integrated triple-ID patterns for Dexie and V3 API parity in event-related objects. - Cleaned up local interface redundancies in favor of unified imports.
This commit is contained in:
@@ -3,6 +3,7 @@ import { api } from '$lib/api/api';
|
||||
|
||||
import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import type { ae_EventBadge } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_id__event_badge_template } from '$lib/ae_events/ae_events__event_badge_template';
|
||||
|
||||
@@ -23,7 +24,7 @@ export async function load_ae_obj_id__event_badge({
|
||||
inc_template?: boolean;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_id__event_badge() *** event_badge_id=${event_badge_id}`);
|
||||
}
|
||||
@@ -114,7 +115,7 @@ export async function load_ae_obj_li__event_badge({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge[]> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_li__event_badge() *** event_id=${event_id}`);
|
||||
}
|
||||
@@ -197,7 +198,7 @@ export async function create_ae_obj__event_badge({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__event_badge() *** event_id=${event_id}`);
|
||||
}
|
||||
@@ -287,7 +288,7 @@ export async function update_ae_obj__event_badge({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** update_ae_obj__event_badge() *** event_badge_id=${event_badge_id}`);
|
||||
}
|
||||
@@ -349,7 +350,7 @@ export async function qry__event_badge({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge[]> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** qry__event_badge() *** event_id=${event_id} qry_str=${qry_str}`);
|
||||
}
|
||||
@@ -443,7 +444,7 @@ export async function search__event_badge({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventBadge[] | false> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** search__event_badge() *** event_id=${event_id} printed_status=${printed_status} affiliations=${affiliations_qry_str} order_by_li=`, order_by_li);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user