fix(standardization): apply safe sort padding across all remaining modules

- Hardened 'JournalEntry' and 'Sponsorship' object processors to handle null sort values.
- Disabled aggressive pre-loading of archive content in main archives list to improve performance.
This commit is contained in:
Scott Idem
2026-02-05 12:33:35 -05:00
parent 2306f2d0c4
commit 22e05ec095
3 changed files with 11 additions and 8 deletions

View File

@@ -975,14 +975,15 @@ export async function process_ae_obj__journal_entry_props({
obj.history_md_html = history_md_html; obj.history_md_html = history_md_html;
// Journal entry-specific computed sort fields, overriding generic ones if needed // Journal entry-specific computed sort fields, overriding generic ones if needed
const sort_val = (obj.sort ?? 0).toString().padStart(3, '0');
obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.updated_on ?? obj.created_on}`; }_${obj.updated_on ?? obj.created_on}`;
obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.name ?? ''}_${obj.updated_on ?? obj.created_on}`; }_${obj.name ?? ''}_${obj.updated_on ?? obj.created_on}`;
obj.tmp_sort_3 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_3 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.name ?? ''}_${obj.updated_on ?? obj.created_on}`; }_${obj.name ?? ''}_${obj.updated_on ?? obj.created_on}`;
return obj; return obj;

View File

@@ -44,11 +44,12 @@ export async function process_ae_obj__sponsorship_cfg_props({
log_lvl, log_lvl,
specific_processor: (obj) => { specific_processor: (obj) => {
// Sponsorship Cfg-specific computed sort fields // Sponsorship Cfg-specific computed sort fields
const sort_val = (obj.sort ?? 0).toString().padStart(3, '0');
obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.updated_on ?? obj.created_on}`; }_${obj.updated_on ?? obj.created_on}`;
obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.updated_on}_${obj.created_on}`; }_${obj.updated_on}_${obj.created_on}`;
return obj; return obj;
@@ -110,11 +111,12 @@ export async function process_ae_obj__sponsorship_props({
log_lvl, log_lvl,
specific_processor: (obj) => { specific_processor: (obj) => {
// Sponsorship-specific computed sort fields // Sponsorship-specific computed sort fields
const sort_val = (obj.sort ?? 0).toString().padStart(3, '0');
obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.updated_on ?? obj.created_on}`; }_${obj.updated_on ?? obj.created_on}`;
obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
obj.sort?.toString().padStart(3, '0') ?? '' sort_val
}_${obj.updated_on}_${obj.created_on}`; }_${obj.updated_on}_${obj.created_on}`;
return obj; return obj;

View File

@@ -40,7 +40,7 @@ export async function load({ fetch, params, parent }) {
api_cfg: ae_acct.api, api_cfg: ae_acct.api,
for_obj_type: 'account', for_obj_type: 'account',
for_obj_id: account_id, for_obj_id: account_id,
inc_content_li: true, inc_content_li: false,
enabled: 'enabled', enabled: 'enabled',
hidden: 'not_hidden', hidden: 'not_hidden',
limit: 29, limit: 29,