Standardize Event DB/Types and fix critical UI type mismatches across Badges, Journals, and Locations modules
This commit is contained in:
@@ -253,14 +253,53 @@ export async function update_ae_obj__event_presenter({
|
||||
|
||||
// Updated 2026-01-21 to Restore Full Aether Search Logic
|
||||
export async function search__event_presenter({
|
||||
api_cfg, event_id, fulltext_search_qry_str = '', like_search_qry_str = '', agree = null, biography = null, enabled = 'enabled', hidden = 'not_hidden', view = 'default', limit = 25, offset = 0, order_by_li = [{ sort: 'ASC' }, { given_name: 'ASC' }, { family_name: 'ASC' }], try_cache = true, log_lvl = 0
|
||||
api_cfg,
|
||||
event_id,
|
||||
fulltext_search_qry_str = '',
|
||||
ft_presenter_search_qry_str = null,
|
||||
like_search_qry_str = '',
|
||||
like_presentation_search_qry_str = '',
|
||||
like_presenter_search_qry_str = '',
|
||||
agree = null,
|
||||
biography = null,
|
||||
enabled = 'enabled',
|
||||
hidden = 'not_hidden',
|
||||
view = 'default',
|
||||
limit = 25,
|
||||
offset = 0,
|
||||
order_by_li = [{ sort: 'ASC' }, { given_name: 'ASC' }, { family_name: 'ASC' }],
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any; event_id: string; fulltext_search_qry_str?: string; like_search_qry_str?: string; agree?: null | boolean; biography?: null | boolean; enabled?: 'enabled' | 'all' | 'not_enabled'; hidden?: 'hidden' | 'all' | 'not_hidden'; view?: string; limit?: number; offset?: number; order_by_li?: any; try_cache?: boolean; log_lvl?: number;
|
||||
api_cfg: any;
|
||||
event_id: string;
|
||||
fulltext_search_qry_str?: string;
|
||||
ft_presenter_search_qry_str?: string | null;
|
||||
like_search_qry_str?: string;
|
||||
like_presentation_search_qry_str?: string;
|
||||
like_presenter_search_qry_str?: string;
|
||||
agree?: null | boolean;
|
||||
biography?: null | boolean;
|
||||
enabled?: 'enabled' | 'all' | 'not_enabled';
|
||||
hidden?: 'hidden' | 'all' | 'not_hidden';
|
||||
view?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
order_by_li?: any;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}): Promise<ae_EventPresenter[]> {
|
||||
const search_query: any = { q: '', and: [{ field: 'event_id', op: 'eq', value: event_id }] };
|
||||
const params: key_val = {};
|
||||
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) params['ft_qry'] = { 'default_qry_str': fulltext_search_qry_str };
|
||||
if (like_search_qry_str) params['lk_qry'] = { 'default_qry_str': like_search_qry_str };
|
||||
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2)
|
||||
params['ft_qry'] = { default_qry_str: fulltext_search_qry_str };
|
||||
if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2)
|
||||
params['ft_qry'] = { ...params['ft_qry'], event_presenter_li_qry_str: ft_presenter_search_qry_str };
|
||||
if (like_search_qry_str) params['lk_qry'] = { default_qry_str: like_search_qry_str };
|
||||
if (like_presentation_search_qry_str)
|
||||
params['lk_qry'] = { ...params['lk_qry'], event_presentation_li_qry_str: like_presentation_search_qry_str };
|
||||
if (like_presenter_search_qry_str)
|
||||
params['lk_qry'] = { ...params['lk_qry'], event_presenter_li_qry_str: like_presenter_search_qry_str };
|
||||
if (agree !== null) search_query.and.push({ field: 'agree', op: 'eq', value: agree ? 1 : 0 });
|
||||
if (biography === true) search_query.and.push({ field: 'biography', op: 'ne', value: '' });
|
||||
if (enabled === 'enabled') search_query.and.push({ field: 'enable', op: 'eq', value: 1 });
|
||||
@@ -279,6 +318,54 @@ export async function search__event_presenter({
|
||||
return [];
|
||||
}
|
||||
|
||||
export const qry__event_presenter = search__event_presenter;
|
||||
|
||||
export async function email_sign_in__event_presenter({
|
||||
api_cfg,
|
||||
to_email,
|
||||
to_name,
|
||||
base_url,
|
||||
person_id,
|
||||
person_passcode,
|
||||
event_id,
|
||||
event_session_id,
|
||||
event_presentation_id,
|
||||
event_presenter_id,
|
||||
session_name,
|
||||
presentation_name
|
||||
}: {
|
||||
api_cfg: any;
|
||||
to_email?: string | null;
|
||||
to_name?: string | null;
|
||||
base_url?: string | null;
|
||||
person_id?: string | null;
|
||||
person_passcode?: string | null;
|
||||
event_id?: string | null;
|
||||
event_session_id?: string | null;
|
||||
event_presentation_id?: string | null;
|
||||
event_presenter_id?: string | null;
|
||||
session_name?: string | null;
|
||||
presentation_name?: string | null;
|
||||
}) {
|
||||
if (!to_email || !person_id || !person_passcode || !event_id || !event_presenter_id) {
|
||||
console.error('Missing required parameters for email_sign_in__event_presenter');
|
||||
return null;
|
||||
}
|
||||
const subject = `Pres Mgmt Hub Sign In Link for Presenter: ${to_name ?? 'Presenter'}`;
|
||||
const sign_in_url = encodeURI(
|
||||
`${base_url}/events/${event_id}/presenter/${event_presenter_id}?person_id=${person_id}&person_pass=${person_passcode}`
|
||||
);
|
||||
const body_html = `<div>${to_name},<p>Your sign-in link for ${presentation_name ?? 'Presentation'} (Session: ${session_name ?? 'Session'}): <a href="${sign_in_url}">${sign_in_url}</a></p></div>`;
|
||||
return await api.send_email({
|
||||
api_cfg,
|
||||
from_email: 'noreply+presmgmt@oneskyit.com',
|
||||
from_name: 'Aether Pres Mgmt',
|
||||
to_email,
|
||||
subject,
|
||||
body_html
|
||||
});
|
||||
}
|
||||
|
||||
export const properties_to_save = [
|
||||
'id', 'event_presenter_id', 'event_presenter_id_random', 'external_id', 'code', 'event_id', 'event_session_id', 'event_presentation_id', 'event_person_id', 'person_id', 'person_profile_id', 'person_id_random', 'person_profile_id_random', 'pronouns', 'informal_name', 'title_names', 'given_name', 'middle_name', 'family_name', 'designations', 'professional_title', 'full_name', 'affiliations', 'email', 'biography', 'agree', 'comments', 'passcode', 'hide_event_launcher', 'data_json', 'enable', 'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on', 'tmp_sort_1', 'tmp_sort_2', 'file_count', 'event_session_code', 'event_session_name', 'event_session_start_datetime', 'event_presentation_code', 'event_presentation_name', 'event_presentation_start_datetime', 'person_external_id', 'person_external_sys_id', 'person_given_name', 'person_family_name', 'person_full_name', 'person_professional_title', 'person_affiliations', 'person_primary_email', 'person_passcode'
|
||||
];
|
||||
|
||||
@@ -5,7 +5,13 @@ import type { key_val } from '$lib/stores/ae_stores';
|
||||
// li = list
|
||||
// kv = key value list
|
||||
|
||||
// Updated 2024-10-16
|
||||
/**
|
||||
* Event - A core Aether event
|
||||
* Related Files:
|
||||
* - src/lib/ae_events/ae_events__event.ts (API)
|
||||
* - src/routes/events/[event_id]/+page.svelte (View)
|
||||
* - src/routes/events/[event_id]/settings/+page.svelte (Admin Settings)
|
||||
*/
|
||||
export interface Event {
|
||||
id: string;
|
||||
// id_random: string;
|
||||
@@ -47,13 +53,13 @@ export interface Event {
|
||||
mod_pres_mgmt_json?: null | key_val;
|
||||
cfg_json?: null | key_val;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -169,13 +175,13 @@ export interface Badge {
|
||||
|
||||
alert?: null | boolean;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -246,13 +252,13 @@ export interface Badge_template {
|
||||
layout?: null | string;
|
||||
style_filename?: null | string;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -310,13 +316,13 @@ export interface Device {
|
||||
meta_json?: null | string;
|
||||
other_json?: null | string;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -353,14 +359,14 @@ export interface Exhibit {
|
||||
license_li_json: null | string;
|
||||
cfg_json: string;
|
||||
|
||||
enable: null | boolean;
|
||||
hide: null | boolean;
|
||||
priority: null | boolean;
|
||||
sort: null | number;
|
||||
group: null | string;
|
||||
notes: null | string;
|
||||
created_on: Date;
|
||||
updated_on: null | Date;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
// tmp_sort_1?: null|string;
|
||||
@@ -410,14 +416,14 @@ export interface Exhibit_tracking {
|
||||
|
||||
event_badge_country: null | string;
|
||||
|
||||
enable: null | boolean;
|
||||
hide: null | boolean;
|
||||
priority: null | boolean;
|
||||
sort: null | number;
|
||||
group: null | string;
|
||||
notes: null | string;
|
||||
created_on: Date;
|
||||
updated_on: null | Date;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
// tmp_sort_1?: null|string;
|
||||
@@ -458,13 +464,13 @@ export interface File {
|
||||
lu_event_file_purpose_name: string;
|
||||
file_purpose: string;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -523,13 +529,13 @@ export interface Location {
|
||||
|
||||
data_json?: null | string;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -585,13 +591,13 @@ export interface Presentation {
|
||||
|
||||
hide_event_launcher?: null | boolean;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -660,13 +666,13 @@ export interface Presenter {
|
||||
|
||||
data_json?: null | string;
|
||||
|
||||
enable: null | boolean;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on?: Date;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
@@ -704,7 +710,13 @@ export interface Registration {
|
||||
// Nothing here yet
|
||||
}
|
||||
|
||||
// Updated 2024-06-19
|
||||
/**
|
||||
* Session - An event session
|
||||
* Related Files:
|
||||
* - src/lib/ae_events/ae_events__event_session.ts (API)
|
||||
* - src/routes/events/[event_id]/(pres_mgmt)/session/[session_id]/+page.svelte (View)
|
||||
* - src/routes/events/[event_id]/(launcher)/menu_session_list.svelte (Launcher)
|
||||
*/
|
||||
export interface Session {
|
||||
id: string;
|
||||
// id_random: string;
|
||||
@@ -749,14 +761,14 @@ export interface Session {
|
||||
// colloquium - Specialists present on related topics with questions
|
||||
// symposium - A discussion, less formal
|
||||
|
||||
enable: null | boolean;
|
||||
hide: null | boolean;
|
||||
priority: null | boolean;
|
||||
sort: null | number;
|
||||
group: null | string;
|
||||
notes: null | string;
|
||||
created_on: Date;
|
||||
updated_on: null | Date;
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
sort?: null | number;
|
||||
group?: null | string;
|
||||
notes?: null | string;
|
||||
created_on?: Date | null;
|
||||
updated_on?: null | Date;
|
||||
|
||||
// Generated fields for sorting locally only
|
||||
tmp_sort_1?: null | string;
|
||||
|
||||
Reference in New Issue
Block a user