Migrate Event logistics modules to unified type system
- Added ae_EventLocation, ae_EventSession, ae_EventPresenter, and ae_EventTrack to ae_types.ts. - Replaced local interfaces in logistics logic files with unified imports. - Standardized Promise return types for all core data loading, creation, search, and update functions. - Integrated triple-ID patterns for Dexie and V3 API parity across locations, sessions, and presenters.
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_EventLocation } from '$lib/types/ae_types';
|
||||
|
||||
import { load_ae_obj_li__event_device } from '$lib/ae_events/ae_events__event_device';
|
||||
import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file';
|
||||
@@ -25,7 +26,7 @@ export async function load_ae_obj_id__event_location({
|
||||
inc_session_li?: boolean;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`
|
||||
@@ -175,11 +176,10 @@ export async function load_ae_obj_li__event_location({
|
||||
hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden
|
||||
limit?: number; // 99
|
||||
offset?: number; // 0
|
||||
order_by_li?: key_val;
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation[]> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** load_ae_obj_li__event_location() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`
|
||||
@@ -362,7 +362,7 @@ export async function create_ae_obj__event_location({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** create_ae_obj__event_location() *** event_id=${event_id}`);
|
||||
}
|
||||
@@ -499,7 +499,7 @@ export async function update_ae_obj__event_location({
|
||||
params?: key_val;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation | null> {
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`*** update_ae_obj__event_location() *** event_location_id=${event_location_id}`,
|
||||
@@ -589,7 +589,7 @@ export async function search__event_location({
|
||||
params?: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
}): Promise<ae_EventLocation[] | false> {
|
||||
if (log_lvl) {
|
||||
console.log(`*** search__event_location() *** event_id=${event_id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user