Migrate Event Exhibit and Tracking modules to unified type system
- Added ae_EventExhibit and ae_EventExhibitTracking interfaces to ae_types.ts. - Replaced local interfaces in ae_events__exhibit.ts with unified imports. - Standardized Promise return types for all core data loading, creation, and update functions in Exhibit and Tracking logic. - Integrated triple-ID patterns for lead retrieval and booth management components.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
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_EventExhibit, ae_EventExhibitTracking } from '$lib/types/ae_types';
|
||||
|
||||
const ae_promises: key_val = {};
|
||||
|
||||
@@ -206,7 +208,7 @@ export async function load_ae_obj_id__exhibit({
|
||||
exhibit_id: string;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibit | null> {
|
||||
console.log(`*** load_ae_obj_id__exhibit() *** exhibit_id=${exhibit_id}`);
|
||||
|
||||
const params = {};
|
||||
@@ -274,7 +276,7 @@ export async function load_ae_obj_li__exhibit({
|
||||
params: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibit[]> {
|
||||
console.log(`*** load_ae_obj_li__exhibit() *** event_id=${event_id}`);
|
||||
|
||||
const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled
|
||||
@@ -380,9 +382,10 @@ export async function load_ae_obj_id__exhibit_tracking({
|
||||
}: {
|
||||
api_cfg: any;
|
||||
exhibit_tracking_id: string;
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibitTracking | null> {
|
||||
console.log(
|
||||
`*** load_ae_obj_id__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`
|
||||
);
|
||||
@@ -452,7 +455,7 @@ export async function load_ae_obj_li__exhibit_tracking({
|
||||
params: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibitTracking[]> {
|
||||
console.log(`*** load_ae_obj_li__exhibit_tracking() *** exhibit_id=${exhibit_id}`);
|
||||
|
||||
const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled
|
||||
@@ -545,7 +548,7 @@ export async function create_ae_obj__exhibit_tracking({
|
||||
external_person_id: string;
|
||||
params: key_val;
|
||||
log_lvl: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibitTracking | null> {
|
||||
console.log(
|
||||
`*** handle_create_ae_obj__exhibit_tracking() *** exhibit_id=${exhibit_id}, event_badge_id=${event_badge_id}`
|
||||
);
|
||||
@@ -631,7 +634,7 @@ export async function update_ae_obj__exhibit_tracking({
|
||||
data: any;
|
||||
params: key_val;
|
||||
log_lvl: number;
|
||||
}) {
|
||||
}): Promise<ae_EventExhibitTracking | null> {
|
||||
console.log(
|
||||
`*** handle_update_ae_obj__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user