diff --git a/src/routes/events/[event_id]/(badges)/badges/config/+page.svelte b/src/routes/events/[event_id]/(badges)/badges/config/+page.svelte new file mode 100644 index 00000000..a0f00ce8 --- /dev/null +++ b/src/routes/events/[event_id]/(badges)/badges/config/+page.svelte @@ -0,0 +1,472 @@ + + + + Badges Config + + +{#if !$ae_loc.administrator_access} +
+ +

Administrator access required.

+
+{:else} +
+ + +
+
+ + + + +

Badges Config

+
+
+ {#if save_status === 'success'} + + Saved + + {:else if save_status === 'error'} + + Error + + {/if} + +
+
+ +

+ Changes here update event.mod_badges_json and take effect on the + next page load. Field permission changes affect which badge fields each access + level may edit on the Badge Review page. +

+ + {#if !draft_initialized} +

Loading event config...

+ {:else} + + + + +
+ + {#if sections.ui} +
+ {#each [ + { field: 'badge_id_only_search' as const, label: 'Badge ID Only Search' }, + { field: 'enable_mass_print' as const, label: 'Enable Mass Print' }, + { field: 'enable_add_badge_btn' as const, label: 'Enable Add Badge Button' }, + { field: 'enable_upload_badge_li_btn' as const, label: 'Enable Upload Badge List Button' }, + { field: 'enable_search_qr' as const, label: 'Enable QR Scan Search' } + ] as item (item.field)} + + {/each} +
+ {/if} +
+ + + + +
+ + {#if sections.qr} +
+ +
+ {/if} +
+ + + + +
+ + {#if sections.passcodes} +
+ + +
+ {/if} +
+ + + + +
+ + {#if sections.auth_fields} +
+ {#each attendee_field_options as field (field.key)} + + {/each} +
+ {/if} +
+ + + + +
+ + {#if sections.trusted_fields} +
+ {#each all_staff_field_options as field (field.key)} + + {/each} +

+ Administrators always have access to all fields — not configurable here. +

+
+ {/if} +
+ + +
+ +
+ + {/if} +
+{/if} diff --git a/src/routes/events/[event_id]/settings/+page.svelte b/src/routes/events/[event_id]/settings/+page.svelte index 8645817b..e5e48564 100644 --- a/src/routes/events/[event_id]/settings/+page.svelte +++ b/src/routes/events/[event_id]/settings/+page.svelte @@ -17,7 +17,6 @@ import { ae_loc, ae_api } from '$lib/stores/ae_stores'; import AE_Comp_Editor_CodeMirror from '$lib/elements/element_editor_codemirror.svelte'; import Ae_comp_event_settings_form from './ae_comp__event_settings_form.svelte'; import Ae_comp_event_settings_basic_form from './ae_comp__event_settings_basic_form.svelte'; -import Ae_comp_event_settings_badges_form from './ae_comp__event_settings_badges_form.svelte'; import Ae_comp_event_settings_abstracts_form from './ae_comp__event_settings_abstracts_form.svelte'; import { Modal } from 'flowbite-svelte'; import Comp_badge_create_form from '../(badges)/badges/ae_comp__badge_create_form.svelte'; @@ -26,7 +25,6 @@ import Comp_badge_upload_form from '../(badges)/badges/ae_comp__badge_upload_for let event_id = page.params.event_id as string; let event_obj: Event | undefined | null = $state(null); let cfg_json_view = $state('form'); -let badges_json_view = $state('form'); let abstracts_json_view = $state('form'); // Temp string values for CodeMirror binding @@ -273,42 +271,38 @@ async function handle_save(field_name: string, data: any) {
Badges (mod_badges_json) -
-
- - -
- {#if badges_json_view === 'form'} - - handle_save('mod_badges_json', data)} /> - {:else} - - - {/if} +
+

+ Manage badge search controls, QR config, access passcodes, and + per-event field edit permissions. +

+ + Go to Badges Config → + + +
+ Raw JSON (advanced) +
+ + +
+