Standardize Core UI forms and unify schemas for V3 API compatibility
- Implement new Svelte 5 Person, Address, and Contact form components with surgical payload logic. - Refactor core routes (People, Addresses, Contacts) to support unified Create/Edit workflows. - Update ae_types.ts, db_core.ts, and db_journals.ts to align with V3 backend object models. - Fix type safety issues in Journal history views and refine metadata display. - Migrate person core functions to the newer ae_core__person module.
This commit is contained in:
@@ -316,7 +316,7 @@ export async function update_ae_obj__event({
|
||||
return result;
|
||||
}
|
||||
|
||||
// Updated 2026-01-06
|
||||
// Updated 2026-01-09
|
||||
export async function qry_ae_obj_li__event({
|
||||
api_cfg,
|
||||
for_obj_type = 'account',
|
||||
@@ -347,11 +347,10 @@ export async function qry_ae_obj_li__event({
|
||||
const search_query: any = { and: [] };
|
||||
if (qry_str) search_query.q = qry_str;
|
||||
|
||||
if (qry_person_id) {
|
||||
search_query.and.push({ field: 'external_person_id', op: 'eq', value: qry_person_id });
|
||||
}
|
||||
// Note: V3 does not support searching by person_id directly on the event object yet.
|
||||
// We will filter client-side instead.
|
||||
|
||||
return await api.search_ae_obj_v3({
|
||||
const result_li = await api.search_ae_obj_v3({
|
||||
api_cfg,
|
||||
obj_type: 'event',
|
||||
for_obj_type,
|
||||
@@ -360,11 +359,25 @@ export async function qry_ae_obj_li__event({
|
||||
enabled,
|
||||
hidden,
|
||||
view,
|
||||
limit,
|
||||
limit: qry_person_id ? 500 : limit, // Increase limit if filtering client-side
|
||||
offset,
|
||||
order_by_li,
|
||||
log_lvl
|
||||
});
|
||||
|
||||
if (qry_person_id && result_li) {
|
||||
return result_li.filter((ev: any) => {
|
||||
return (
|
||||
ev.external_person_id === qry_person_id ||
|
||||
ev.poc_person_id === qry_person_id ||
|
||||
ev.poc_person_id_random === qry_person_id ||
|
||||
ev.poc_event_person_id === qry_person_id ||
|
||||
ev.poc_event_person_id_random === qry_person_id
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return result_li;
|
||||
}
|
||||
|
||||
// Updated 2025-05-09
|
||||
|
||||
Reference in New Issue
Block a user