feat: standardize OrderBy types and fix data model mismatches

- Update ae_types.ts with joined fields for deep layout loading
- Fix OrderBy vs OrderBy[] type mismatch in API v2/v3 and generic CRUD
- Apply 'as const' to order_by_li defaults in core/event libraries
- Resolve type errors in reports_presenters and reports_files Svelte components
This commit is contained in:
Scott Idem
2026-01-15 19:03:26 -05:00
parent 31f18b8723
commit ab1c207c86
20 changed files with 83 additions and 39 deletions

View File

@@ -13,7 +13,7 @@ export async function load_ae_obj_li__country({
hidden = 'not_hidden',
limit = 299,
offset = 0,
order_by_li = { sort: 'DESC', english_short_name: 'ASC', alpha_2_code: 'ASC' },
order_by_li = { sort: 'DESC', english_short_name: 'ASC', alpha_2_code: 'ASC' } as const,
params = {},
try_cache = true,
log_lvl = 0

View File

@@ -13,7 +13,7 @@ export async function load_ae_obj_li__country_subdivision({
hidden = 'not_hidden',
limit = 399,
offset = 0,
order_by_li = { sort: 'DESC', name: 'ASC', code: 'ASC' },
order_by_li = { sort: 'DESC', name: 'ASC', code: 'ASC' } as const,
params = {},
try_cache = true,
log_lvl = 0

View File

@@ -42,7 +42,7 @@ export interface GenericCrudArgs {
hidden?: 'not_hidden' | 'hidden' | 'all';
limit?: number;
offset?: number;
order_by_li?: key_val;
order_by_li?: Record<string, 'ASC' | 'DESC'> | Record<string, 'ASC' | 'DESC'>[] | null;
params?: key_val;
try_cache?: boolean;
log_lvl?: number;

View File

@@ -63,7 +63,12 @@ export async function load_ae_obj_li__hosted_file({
hidden = 'not_hidden',
limit = 99,
offset = 0,
order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' },
order_by_li = {
priority: 'DESC',
sort: 'DESC',
updated_on: 'DESC',
created_on: 'DESC'
} as const,
params = {},
try_cache = true,
log_lvl = 0

View File

@@ -14,7 +14,7 @@ export async function load_ae_obj_li__time_zone({
limit = 99,
offset = 0,
// order_by_li = {'priority': 'DESC', 'group': 'ASC', 'sort': 'DESC', 'name': 'ASC'},
order_by_li = { priority: 'DESC', sort: 'DESC', name: 'ASC' },
order_by_li = { priority: 'DESC', sort: 'DESC', name: 'ASC' } as const,
params = {},
try_cache = true,
log_lvl = 0