docs + fix: Leads module doc, badges onsite doc, license access fix, QR log cleanup
- Add MODULE__AE_Events_Exhibitor_Leads.md — full module reference (auth model, tabs, data model, routes, offline/PWA notes, OSIT admin notes) - Add MODULE__AE_Events_Badges_Onsite.md — onsite printing guide (browser settings, CUPS/Linux setup, Zebra ZC10L section with test results, Epson stub, troubleshooting) - Archive PROJECT__AE_Events_Exhibitor_Leads_v3*.md + Zebra test day doc → history/ - Fix leads license management access: ae_tab__manage.svelte license section now visible to administrator_access OR shared-passcode sign-in (type === 'shared'); matches spec - Add type field to LeadsLocState.auth_exhibit_kv interface (was set at runtime but missing from type) - Silence QR code console noise: entry log gated at log_lvl >= 2, data URL log removed - vite.config.ts: exclude documentation/ and tests/ from Vite HMR file watcher Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -175,10 +175,11 @@ export async function js_generate_qr_code(qr_type: string, params: key_val = {})
|
||||
key,
|
||||
val,
|
||||
js,
|
||||
str
|
||||
str,
|
||||
log_lvl = 0
|
||||
} = params;
|
||||
|
||||
console.log(`*** js_generate_qr_code() *** qr_type=${qr_type}`, params);
|
||||
if (log_lvl >= 2) console.log(`*** js_generate_qr_code() *** qr_type=${qr_type}`, params);
|
||||
|
||||
let qr_data: string | null = null;
|
||||
|
||||
@@ -251,7 +252,6 @@ export async function js_generate_qr_code(qr_type: string, params: key_val = {})
|
||||
scale: 10, // Corresponds to box_size
|
||||
type: 'image/png'
|
||||
});
|
||||
console.log('Generated QR code data URL:', data_url);
|
||||
return data_url;
|
||||
} catch (error) {
|
||||
console.error('Error generating QR code:', error);
|
||||
|
||||
@@ -29,8 +29,8 @@ export interface LeadsLocState {
|
||||
tracking__qry__sort_order: string;
|
||||
tracking__qry__licensee_email: string;
|
||||
entered_passcode: string | null;
|
||||
// Value shape: { key: string; updated_on: string } — entries expire after a configurable max age.
|
||||
auth_exhibit_kv: Record<string, { key: string; updated_on: string }>;
|
||||
// Value shape: key = passcode/email used; type = 'shared' | 'licensed'; entries expire after a configurable max age.
|
||||
auth_exhibit_kv: Record<string, { key: string; type: string; updated_on: string }>;
|
||||
edit_license_li: boolean;
|
||||
// Key = exhibit ID (random), value = last-used tab name.
|
||||
tab: Record<string, string>;
|
||||
|
||||
@@ -111,9 +111,6 @@ Two scan modes (toggled per exhibit):
|
||||
|
||||
- **Payment / Stripe** — `ae_comp__exhibit_payment.svelte` is a stub. The payment tab can be
|
||||
hidden via the "Show Payment Tab" toggle in the Manage tab's App Settings.
|
||||
- **License management access for shared-passcode users** — spec says booth staff signed in via
|
||||
the shared passcode should be able to manage licenses. Currently gated behind
|
||||
`$ae_loc.administrator_access` only (in `ae_tab__manage.svelte`).
|
||||
|
||||
## Implemented (previously listed as gaps)
|
||||
|
||||
@@ -125,6 +122,9 @@ Two scan modes (toggled per exhibit):
|
||||
`/v3/action/event_exhibit/{id}/tracking_export`. Gated on `leads_api_access === true`.
|
||||
- **PWA install prompt** — `element_pwa_install_prompt.svelte` placed on the Start tab.
|
||||
Handles Chrome/Android native install and iOS Safari manual instructions.
|
||||
- **License management access for shared-passcode users** — `ae_tab__manage.svelte` license
|
||||
section now visible to `administrator_access` OR `auth_exhibit_kv[id].type === 'shared'`.
|
||||
Also added `type` field to `LeadsLocState.auth_exhibit_kv` interface.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -225,8 +225,10 @@
|
||||
</div>
|
||||
|
||||
<div class="card p-0 divide-y divide-surface-500/10 overflow-hidden shadow-md">
|
||||
<!-- Licenses (Administrator Access Only for now) -->
|
||||
{#if $ae_loc.administrator_access}
|
||||
<!-- Licenses — visible to: Aether admins OR someone signed in with the shared exhibit passcode.
|
||||
Spec: "A client staff (Trusted Access or above) or someone signed in with an Exhibit passcode
|
||||
can add/edit/remove licenses." — PROJECT__AE_Events_Exhibitor_Leads_v3.md -->
|
||||
{#if $ae_loc.administrator_access || $events_loc.leads.auth_exhibit_kv?.[exhibit_id]?.type === 'shared'}
|
||||
<div class="p-0">
|
||||
<button
|
||||
class="w-full p-4 flex items-center justify-between hover:bg-surface-500/5 transition-colors group"
|
||||
@@ -236,7 +238,7 @@
|
||||
<div class="bg-primary-500/10 p-2 rounded-lg text-primary-500"><Users size="1.2em" /></div>
|
||||
<div class="text-left">
|
||||
<div class="font-bold text-sm">Exhibit Leads Licensees</div>
|
||||
<div class="text-xs opacity-50">Manage assigned users and codes (Admin Only)</div>
|
||||
<div class="text-xs opacity-50">Manage assigned users and codes</div>
|
||||
</div>
|
||||
</div>
|
||||
{#if show_license_mgmt}
|
||||
|
||||
Reference in New Issue
Block a user