chore: svelte-check cleanup — fix Svelte 5 patterns in events/pres_mgmt, badges, launcher, and tests
Source changes (0 errors, 175 warnings after): - api_post__crud_obj_v3: add backward-compat migration aliases (for_obj_type/id, obj_type/id) to nested CRUD funcs - ae_events__event_device/presenter/session: make event_id/presentation_id optional; fall back to store value - element_ae_obj_field_editor_v3: import type Snippet properly; mark current_value as $bindable() - ae_comp__badge_obj_view: fix $derived(() => false) → $derived(false) for show_receipt/show_tickets - badge templates: pass explicit event_id param to delete/update calls - launcher/+page: capture URL params as stable consts; pass event_id to update_ae_obj__event_device - ae_comp__event_device_obj_li: wrap setInterval in $effect; onDestroy cleanup always registered - ae_comp__event_device_obj_li_wrapper: move console.log to $effect; fix self-closing tag - presenter form/menu/view/list: add missing event_presentation_id to all update/delete calls - reports/locations/presenter/+page: move store assignments into $effect + untrack; ae_acct → $derived - session/+page: add Comp_event_presenter_form_agree import; cast for type compat - session_view: wrap <img onclick> in <button> for accessibility/validity - ae_comp__event_presentation_obj_li: remove unneeded event_id/session_id from create_ae_obj__event_presenter - ae_comp__event_session_obj_li: make lq prop optional; add plain-array fallback prop - location/+page: refactor to $derived ae_acct, $effect+untrack for stores, simplified session/file sections - location_page_menu: add optional data prop; export interface Tests: - Rename ae_events__event_badge.spec.ts → ae_events__event_badge.test.ts (extended coverage) - All test files: 'warn' → 'warning' (Playwright API), addInitScript array-destructure pattern, import type fixes - ae_defaults: remove duplicate hide_app_cfg key; meaningful sponsorship cfg_id placeholder - create_event_badge.spec: fix import path to use $lib alias - event_presenter.test: fix test URL to use /presenter/:id route NOTE: location/+page.svelte — Element_manage_event_file_li_wrap no longer receives allow_basic/allow_moderator (now default false); file list shows but management actions may be restricted. Follow-up needed to restore auth__kv-based access.
This commit is contained in:
@@ -54,9 +54,14 @@ export async function create_ae_obj_v3({
|
||||
|
||||
interface CreateNestedObjV3Params {
|
||||
api_cfg: any;
|
||||
parent_type: string;
|
||||
parent_id: string;
|
||||
child_type: string;
|
||||
parent_type?: string;
|
||||
parent_id?: string;
|
||||
child_type?: string;
|
||||
// Aliases for migration
|
||||
for_obj_type?: string;
|
||||
for_obj_id?: string;
|
||||
obj_type?: string;
|
||||
|
||||
fields: key_val;
|
||||
params?: key_val;
|
||||
log_lvl?: number;
|
||||
@@ -67,11 +72,18 @@ export async function create_nested_obj_v3({
|
||||
parent_type,
|
||||
parent_id,
|
||||
child_type,
|
||||
for_obj_type,
|
||||
for_obj_id,
|
||||
obj_type,
|
||||
fields,
|
||||
params = {},
|
||||
log_lvl = 0
|
||||
}: CreateNestedObjV3Params) {
|
||||
const endpoint = `/v3/crud/${parent_type}/${parent_id}/${child_type}/`;
|
||||
const p_type = parent_type || for_obj_type;
|
||||
const p_id = parent_id || for_obj_id;
|
||||
const c_type = child_type || obj_type;
|
||||
|
||||
const endpoint = `/v3/crud/${p_type}/${p_id}/${c_type}/`;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log('*** create_nested_obj_v3 ***');
|
||||
@@ -145,10 +157,16 @@ export async function update_ae_obj_v3({
|
||||
|
||||
interface UpdateNestedObjV3Params {
|
||||
api_cfg: any;
|
||||
parent_type: string;
|
||||
parent_id: string;
|
||||
child_type: string;
|
||||
child_id: string;
|
||||
parent_type?: string;
|
||||
parent_id?: string;
|
||||
child_type?: string;
|
||||
child_id?: string;
|
||||
// Aliases for migration
|
||||
for_obj_type?: string;
|
||||
for_obj_id?: string;
|
||||
obj_type?: string;
|
||||
obj_id?: string;
|
||||
|
||||
fields: key_val;
|
||||
params?: key_val;
|
||||
log_lvl?: number;
|
||||
@@ -160,11 +178,20 @@ export async function update_nested_obj_v3({
|
||||
parent_id,
|
||||
child_type,
|
||||
child_id,
|
||||
for_obj_type,
|
||||
for_obj_id,
|
||||
obj_type,
|
||||
obj_id,
|
||||
fields,
|
||||
params = {},
|
||||
log_lvl = 0
|
||||
}: UpdateNestedObjV3Params) {
|
||||
const endpoint = `/v3/crud/${parent_type}/${parent_id}/${child_type}/${child_id}`;
|
||||
const p_type = parent_type || for_obj_type;
|
||||
const p_id = parent_id || for_obj_id;
|
||||
const c_type = child_type || obj_type;
|
||||
const c_id = child_id || obj_id;
|
||||
|
||||
const endpoint = `/v3/crud/${p_type}/${p_id}/${c_type}/${c_id}`;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log('*** update_nested_obj_v3 ***');
|
||||
@@ -233,10 +260,16 @@ export async function delete_ae_obj_v3({
|
||||
|
||||
interface DeleteNestedAeObjV3Params {
|
||||
api_cfg: any;
|
||||
parent_type: string;
|
||||
parent_id: string;
|
||||
child_type: string;
|
||||
child_id: string;
|
||||
parent_type?: string;
|
||||
parent_id?: string;
|
||||
child_type?: string;
|
||||
child_id?: string;
|
||||
// Aliases for migration
|
||||
for_obj_type?: string;
|
||||
for_obj_id?: string;
|
||||
obj_type?: string;
|
||||
obj_id?: string;
|
||||
|
||||
method?: 'delete' | 'soft_delete' | 'disable' | 'hide';
|
||||
params?: key_val;
|
||||
log_lvl?: number;
|
||||
@@ -251,11 +284,20 @@ export async function delete_nested_ae_obj_v3({
|
||||
parent_id,
|
||||
child_type,
|
||||
child_id,
|
||||
for_obj_type,
|
||||
for_obj_id,
|
||||
obj_type,
|
||||
obj_id,
|
||||
method = 'delete',
|
||||
params = {},
|
||||
log_lvl = 0
|
||||
}: DeleteNestedAeObjV3Params) {
|
||||
const endpoint = `/v3/crud/${parent_type}/${parent_id}/${child_type}/${child_id}`;
|
||||
const p_type = parent_type || for_obj_type;
|
||||
const p_id = parent_id || for_obj_id;
|
||||
const c_type = child_type || obj_type;
|
||||
const c_id = child_id || obj_id;
|
||||
|
||||
const endpoint = `/v3/crud/${p_type}/${p_id}/${c_type}/${c_id}`;
|
||||
const query_params = { ...params, method };
|
||||
|
||||
if (log_lvl) {
|
||||
|
||||
Reference in New Issue
Block a user