leads: event-level payment config + Stripe key migration
- New /events/[event_id]/leads/config page: administrator UI for mod_exhibits_json. Controls leads_require_payment toggle and Stripe keys (publishable key + buy button IDs per license tier). - leads_require_payment (mod_exhibits_json) now gates all billing UI: header CreditCard button in exhibit +page.svelte and Licenses & Billing accordion in ae_tab__manage.svelte. Default false (client covers costs). - Stripe keys migrated from site_cfg_json to mod_exhibits_json (per-event). ae_comp__exhibit_payment accepts them as optional props; falls back to site_cfg_json for events not yet migrated. - Fixed "My Leads" bug for shared-passcode users: search_params now maps licensee_email 'my' → 'shared_passcode' literal (not kv.key passcode string) so filters correctly match stored external_person_id values. - Event settings: Exhibits section replaced with config link + raw JSON fallback, matching pres_mgmt/badges pattern. - Docs updated: README.md, MODULE__AE_Events_Exhibitor_Leads.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -383,24 +383,38 @@ async function handle_save(field_name: string, data: any) {
|
||||
</details>
|
||||
|
||||
<details class="details">
|
||||
<summary class="summary">Exhibits (mod_exhibits_json)</summary>
|
||||
<div class="p-4">
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={tmp_exhibits_json_str}
|
||||
bind:new_content={tmp_exhibits_json_str}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" />
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
onclick={() => {
|
||||
handle_save(
|
||||
'mod_exhibits_json',
|
||||
tmp_exhibits_json_str
|
||||
);
|
||||
}}>Save</button>
|
||||
<summary class="summary">Exhibits / Leads (mod_exhibits_json)</summary>
|
||||
<div class="p-4 space-y-3">
|
||||
<p class="text-sm text-surface-500">
|
||||
Configure Leads payment visibility and Stripe keys for this event.
|
||||
</p>
|
||||
<a
|
||||
href="/events/{event_id}/leads/config"
|
||||
class="btn preset-tonal-primary">
|
||||
Go to Leads Config →
|
||||
</a>
|
||||
<!-- Raw JSON fallback for debugging / emergency edits -->
|
||||
<details class="mt-2">
|
||||
<summary class="cursor-pointer text-xs text-surface-400">Raw JSON (advanced)</summary>
|
||||
<div class="mt-2 space-y-2">
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
readonly={false}
|
||||
content={tmp_exhibits_json_str}
|
||||
bind:new_content={tmp_exhibits_json_str}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" />
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
onclick={() => {
|
||||
handle_save(
|
||||
'mod_exhibits_json',
|
||||
tmp_exhibits_json_str
|
||||
);
|
||||
}}>Save Raw JSON</button>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user