feat: Refactor event modules for Svelte 5 and new routing structure
- Moved legacy event modules (`events_badges`, `events_leads`) to `src/routes/legacy/` and renamed them to `events_badges_v2` and `events_leads_v2` respectively.
- Created new directory structures for Svelte 5 and SvelteKit-based event modules under `src/routes/events/[event_id]/`:
- `(launcher)`
- `(badges)`
- `(leads)`
- Updated `src/routes/events_leads/README.md` (now `src/routes/legacy/events_leads_v2/README.md`) with comprehensive documentation for the legacy lead retrieval module, reflecting its features, data model, routing, components, and technical implementation details, incorporating project conventions.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# Events Badges Module (v3)
|
||||
|
||||
This module manages badge-related features for events.
|
||||
|
||||
# Event Badges Module (v3)
|
||||
|
||||
This directory contains the Svelte components and pages for the "v3" Badge Printing module for a specific event.
|
||||
@@ -13,4 +17,4 @@ This directory contains the Svelte components and pages for the "v3" Badge Print
|
||||
|
||||
- This module is built using Svelte 5 (runes) and Flowbite-Svelte for UI components.
|
||||
- It relies on the `events_func` and `ae_events__event_badge.ts` for its business logic and API communication.
|
||||
- The search functionality was recently debugged to resolve a series of build and runtime errors related to CSS conflicts, Svelte 5 reactivity, and API query parameter issues.
|
||||
- The search functionality was recently debugged to resolve a series of build and runtime errors related to CSS conflicts, Svelte 5 reactivity, and API query parameter issues.
|
||||
3
src/routes/events/[event_id]/(launcher)/README.md
Normal file
3
src/routes/events/[event_id]/(launcher)/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Events Launcher Module (v3)
|
||||
|
||||
This module provides launcher functionalities for events and must be used in conjunction with the Events Presentation Management module.
|
||||
3
src/routes/events/[event_id]/(leads)/README.md
Normal file
3
src/routes/events/[event_id]/(leads)/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Events Leads Module (v3)
|
||||
|
||||
This module handles exhibitor lead retrieval and attendee tracking for events, and must be used in conjunction with the Events Badges module.
|
||||
3
src/routes/events/[event_id]/README.md
Normal file
3
src/routes/events/[event_id]/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Events Presentation Management Module (v3)
|
||||
|
||||
This module handles the presentation management features for events.
|
||||
@@ -1,18 +0,0 @@
|
||||
# Event Lead Retrieval Module
|
||||
|
||||
This directory contains the Svelte components and pages for the exhibitor Lead Retrieval module.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Exhibitor Login:** Allows exhibitors to log in using a shared passcode or an individual license key (email).
|
||||
- **Lead Capture:** Provides an interface for adding new leads, either by scanning a badge QR code or by manual entry.
|
||||
- **Lead Management:** A list view for exhibitors to see all the leads they have collected.
|
||||
- **Lead Qualification:** Exhibitors can rank leads (sort) and mark them as priority (star).
|
||||
- **Data Export:** Functionality to export collected leads to an Excel file.
|
||||
|
||||
## Technical Notes
|
||||
|
||||
- This is considered a legacy module but is still in active use and was recently updated to fix styling issues.
|
||||
- The UI was previously dependent on Skeleton UI classes. Recent fixes have replaced these with standard Tailwind CSS to resolve critical rendering errors caused by the removal of global Skeleton CSS.
|
||||
- The main entry point is `/events_leads`, which lists available exhibits.
|
||||
- Individual exhibitor functionality is handled under the `/events_leads/exhibit/[slug]` dynamic route.
|
||||
62
src/routes/legacy/events_leads_v2/README.md
Normal file
62
src/routes/legacy/events_leads_v2/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Aether (AE) Event Lead Retrieval Module
|
||||
|
||||
## Overview
|
||||
This module provides a comprehensive solution for event exhibitors to capture and manage leads. It supports exhibitor login, badge scanning for lead capture, manual lead entry, lead qualification (ranking/priority), and data export functionalities. It integrates with the Aether API for data synchronization and utilizes local caching for performance and offline capabilities.
|
||||
|
||||
## Key Features
|
||||
- **Exhibitor Login:** Secure access for exhibitors using a shared passcode or individual license keys (email-based).
|
||||
- **Lead Capture:** Efficiently add new leads by scanning attendee badge QR codes or through manual data entry.
|
||||
- **Lead Management:** A dedicated interface for exhibitors to view, sort, and manage their collected leads.
|
||||
- **Lead Qualification:** Tools to rank and prioritize leads (e.g., sort, star/favorite) for follow-up.
|
||||
- **Data Export:** Functionality to export collected lead data, typically to an Excel-compatible format.
|
||||
- **Real-time Synchronization:** Data is synchronized with the backend Aether API.
|
||||
- **Local Caching:** Utilizes IndexedDB (Dexie.js) for robust local data storage, enabling offline use and faster load times.
|
||||
|
||||
## Data Model
|
||||
|
||||
The core data structures managed by this module are `Exhibit` and `Exhibit_tracking`. These are defined in `src/lib/ae_events/db_events.ts`.
|
||||
|
||||
### Exhibit
|
||||
Represents an exhibitor's presence at an event. It contains configuration for lead retrieval, such as:
|
||||
- `event_exhibit_id_random`: Unique identifier for the exhibit (primary key).
|
||||
- `code`, `name`, `description`: Basic information about the exhibit.
|
||||
- `staff_passcode`: For staff login.
|
||||
- `leads_api_access`: Boolean indicating if lead retrieval API access is enabled.
|
||||
- `leads_custom_questions_json`: Configuration for custom questions asked during lead capture.
|
||||
- `license_max`, `license_li_json`: Details regarding lead retrieval licenses.
|
||||
|
||||
### Exhibit_tracking
|
||||
Represents a single lead captured by an exhibitor. It links an exhibitor to an attendee (badge) and stores details about the interaction:
|
||||
- `event_exhibit_tracking_id_random`: Unique identifier for the captured lead (primary key).
|
||||
- `event_exhibit_id_random`: Links to the `Exhibit` that captured the lead.
|
||||
- `event_badge_id_random`: Links to the attendee's `Badge` information.
|
||||
- `exhibitor_notes`: Notes added by the exhibitor about the lead.
|
||||
- `responses_json`: Responses to custom questions.
|
||||
- Contains duplicated badge information for convenience (e.g., `event_badge_full_name`, `event_badge_email`, `event_badge_professional_title`, `event_badge_affiliations`) to denormalize data for faster display.
|
||||
|
||||
## Routing and Components
|
||||
|
||||
### Routes
|
||||
- `/events_leads`: The main entry point, typically displays a list of available exhibits.
|
||||
- `+page.svelte`: Renders the list of exhibits.
|
||||
- `+page.ts`: Loads the data for available exhibits using `events_func.handle_load_ae_obj_li__exhibit`.
|
||||
- `+layout.svelte`/`+layout.ts`: Provides a common layout and data for the module, including a submenu.
|
||||
- `/events_leads/exhibit/[slug]`: Dynamic route for managing leads for a specific exhibit. The `[slug]` corresponds to `event_exhibit_id_random`.
|
||||
- `+page.svelte`: The primary interface for an exhibitor, orchestrating lead capture and management components.
|
||||
- `+page.ts`: Loads specific `Exhibit` data and associated `Exhibit_tracking` (leads) using `events_func.handle_load_ae_obj_id__exhibit` and `events_func.handle_load_ae_obj_li__exhibit_tracking`.
|
||||
|
||||
### Core Components (within `src/routes/events_leads/exhibit/[slug]/`)
|
||||
- `leads_add_scan.svelte`: Handles the process of adding new leads, either by scanning QR codes (badge) or manual entry.
|
||||
- `leads_list.svelte`: Displays a sortable and filterable list of captured leads for the current exhibitor.
|
||||
- `leads_manage.svelte`: Provides functionalities for managing individual leads, potentially including editing notes or qualification status.
|
||||
- `leads_payment.svelte`: (If applicable) Component related to handling payment or license activation for lead retrieval features.
|
||||
- `leads_view_lead.svelte`: Displays detailed information for a selected lead.
|
||||
|
||||
## Technical Implementation
|
||||
|
||||
- **Svelte v5 with Runes:** The module adheres to Svelte v5's reactivity model, utilizing `$state` and `$derived` for reactive state management.
|
||||
- **ID Convention (`id_random`):** All frontend operations, including routing and data fetching, consistently use the string-based `event_exhibit_id_random` and `event_exhibit_tracking_id_random` as primary identifiers, rather than numeric `id` values.
|
||||
- **API Interaction:** Data is fetched and synchronized with the backend FastAPI application through functions exposed in `src/lib/ae_events_functions.ts`.
|
||||
- **Local Database (Dexie.js):** Data for `Exhibit` and `Exhibit_tracking` is cached in the browser's IndexedDB using Dexie.js, defined in `src/lib/ae_events/db_events.ts`. This ensures data persistence and fast retrieval, especially for offline scenarios.
|
||||
- **Styling:** The UI is primarily styled using Tailwind CSS, having migrated from Skeleton UI to resolve previous rendering issues.
|
||||
- **Legacy Status:** While considered a legacy module, it has been updated to align with current project standards, particularly regarding UI styling and Svelte v5 reactivity.
|
||||
Reference in New Issue
Block a user