Commit Graph

26 Commits

Author SHA1 Message Date
Scott Idem
a8f3c29b9f Last round of prettier: npx prettier --write src/ 2026-03-24 13:27:40 -04:00
Scott Idem
94849137f0 I think pretty much all references to v1 and v2 have been removed. All files have been renamed from _v3 to just the function/var name with out the appended version. Assume no _vX is the current version. 2026-03-24 11:32:06 -04:00
Scott Idem
d27ec58fe9 More code clean up 2026-03-24 10:56:31 -04:00
Scott Idem
42358efe7d More code clean up 2026-03-24 10:54:40 -04:00
Scott Idem
8e61bd0ba1 More and more code removal and clean up 2026-03-24 10:42:40 -04:00
Scott Idem
0bc71391fc Cleaning up and removing old legacy code and files 2026-03-24 10:28:54 -04:00
Scott Idem
6e22639e6e fix(api): pass real account_id for lookup requests instead of bypass header
The x-no-account-id bypass was hardcoded to resolve account_id=1 on the
backend, causing account-scoped lookup overrides (e.g. custom country names)
to leak to all callers regardless of their account.

Removing the bypass lets get_object auto-promote the real account_id from
api_cfg, so the backend's existing account filter works correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 20:00:28 -04:00
Scott Idem
f3ab1c1050 fix(idaa/recovery_meetings): fix weekday chips, recurring fields, and timezone lookup
- Weekday chips: replace bind:checked (unreliable with dynamic bracket notation in
  {#each}) with explicit onchange handlers + class: directives; read weekdays from
  state in submit handler instead of FormData
- Recurring pattern/times: bind select and time inputs to working copy
  so values display and edit correctly
- Times clearing: map empty string to null so times can be cleared once set
- liveQuery guard: skip event_obj sync while edit form is open to prevent
  background refresh from overwriting in-progress user changes
- Timezone lookup: forward order_by_li, limit, offset through the full call chain
  so priority sort and result count params are actually sent to the API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:05:16 -04:00
Scott Idem
37e7a93617 fix(api): suppress send_email() in test/Playwright environments
Add a guard at the top of send_email() that checks globalThis.__ae_test_mode.
If truthy, logs a suppression message and returns null immediately so no HTTP
request is made. This prevents real emails being sent when Playwright tests
exercise components that call send_staff_notification_email() after a successful
save. Activate by setting window.__ae_test_mode = true in addInitScript.
2026-03-09 17:53:45 -04:00
Scott Idem
2dfc8a5034 Implemented 'only_priority' filtering for V3 Lookups.
- Updated V3 lookup API and core timezone loader to support the 'only_priority' flag.
- Enabled high-priority timezone filtering in IDAA Recovery Meeting and Archive editors to streamline selection lists.
2026-02-20 17:17:09 -05:00
Scott Idem
52c9e765a0 Implemented Aether API V3 Lookup integration for standardized tables.
- Created 'src/lib/ae_api/api_get__lookup_v3.ts' to handle the new '/v3/lookup/{lu_type}/list' endpoint.
- Refactored 'get_ae_obj_li_for_lu' in 'api.ts' to prioritize the V3 system for countries, subdivisions, and time zones, with V2 fallback for legacy types.
- Ensured lookups use the 'x-no-account-id' bypass for unauthenticated site bootstrapping.
- Updated core country, subdivision, and time zone loaders to use the refined API interface.
2026-02-20 16:12:06 -05:00
Scott Idem
f62bd9fb79 security(api): harden V3 authentication and unify CRUD endpoint patterns
Implemented critical security and architectural fixes to align the frontend with the Aether API V3 standard and resolve 403 Forbidden race conditions.

- Unified CRUD Helpers: Updated get, create, update, and delete helpers to use the standard /v3/crud/{obj_type}/{id} paths, ensuring correct backend isolation context.
- Auth Scavenging: Implemented direct localStorage scavenging for 'x-account-id' in core fetch helpers to prevent hydration race conditions in Svelte 5.
- Header Cleanup: Purged redundant 'x-aether-api-token' and fixed misplaced protocol headers in global stores.
- Reliability: Fixed 'Content-Type' typos and standardized kebab-case header normalization.
2026-02-13 19:10:32 -05:00
Scott Idem
281972cb5d fix(journals): add type='button' to prevent form submission and migrate to V3 Action API for file downloads 2026-02-03 22:14:22 -05:00
Scott Idem
6a132af2ae Saving changes that seem to be safe and working. 2026-01-29 11:08:34 -05:00
Scott Idem
3221e5830e Fix(Core): Restore system lookups and enhance reference data view
- API: Correctly exported 'get_ae_obj_li_for_lu' and reverted to stable V2 endpoints (/v2/crud/lu/.../list) to resolve V3 500 errors.
- Auth: Injected 'x-no-account-id' bypass header for unauthenticated global lookup access.
- UI: Updated lookups page to support 'english_short_name' fallback for countries and added Country Subdivisions card.
- Debug: Added transient console logging for verification.
2026-01-20 19:13:14 -05:00
Scott Idem
ea0d57658f Standardize JWT authentication and finalize Activity Log V3 migration 2026-01-07 17:43:23 -05:00
Scott Idem
c6476cd767 Implement V3 PATCH/DELETE wrappers and migrate Journals module to full V3 CRUD.
- Added update_ae_obj_v3, update_nested_obj_v3, delete_ae_obj_v3, and delete_nested_ae_obj_v3.
- Refactored Journals and Journal Entries modules to utilize the new V3 API wrappers.
- Standardized data processing and IDB caching for all CRUD operations in Journals.
- Updated testing page with comprehensive V3 CUD test buttons.
2026-01-05 19:30:12 -05:00
Scott Idem
d066da9047 The ability to use V3 Create Nested works. 2026-01-05 19:10:07 -05:00
Scott Idem
45f7393ee3 Now with a working V# GET ID and GET nested ID. 2026-01-05 18:52:11 -05:00
Scott Idem
6eb601f56d Saving changes to the Journals and API CRUD V3 fixes. 2026-01-02 19:30:33 -05:00
Scott Idem
2c7ed476af Adding new API CRUD v3 functionality. 2026-01-02 18:11:07 -05:00
Scott Idem
0987cd6ad9 style: Apply Prettier formatting with 4-space indentation
Applied consistent code formatting across the project using Prettier, now configured to use 4-space indentation instead of tabs.
2025-11-18 18:40:50 -05:00
Scott Idem
7e1eaba3bc feat: Migrate ESLint to flat config and resolve initial linting errors
Migrated the ESLint configuration to the new flat config format ()
and addressed several initial linting errors.

Key changes include:
- Updated ESLint configuration to treat  as warnings instead of errors.
- Fixed  errors in  by declaring  and .
- Corrected  error in  by using  instead of an out-of-scope .
- Resolved  error in  by replacing the undefined  directive with the  component.
- Addressed  errors in  by replacing  with  and  with .
- Fixed  errors in  by importing necessary modules (, , ) and adding missing props (, , , , ).
2025-11-17 18:46:54 -05:00
Scott Idem
3104304fdb Updates to common enabled and hidden properties. 2025-11-13 20:16:22 -05:00
Scott Idem
e9a8f7df00 This was a lot... things are mostly working again. The changing of id_random properties caused some problems. The hosted_file_hash_sha256 is not working? There are other issues as well... This will take some time. 2025-11-13 18:38:00 -05:00
Scott Idem
94832c2471 Refactor: Organize src/lib into subdirectories and move files accordingly. 2025-11-13 16:09:03 -05:00