Aether Events Exhibitor Leads v3 - Details
=======

## [root page] Leads for Exhibitors Main Landing
* Has a search for Exhibits section that allows for searching Exhibits by name or code.
* Results can be sortable. They can be sorted by name, booth number, or last created/updated.
* This is for exhibitors to find their Exhibit and sign in with the shared passcode or their assigned licensed user credentials.
* If not signed in with Administrator Access or above, then only show results for Exhibitors that have been marked as "priority" (paid). Otherwise show all Exhibitors (to admins).
* Has a list of Exhibits with basic info and link to Exhibit Leads management page for each Exhibit. Do not show results by default or if less than 3 characters in search and they are not signed in with Trusted Access or above.


## [exhibit_id page] Exhibit Leads Module
* This is minimalistic. Only the tabs and content needed.

### Header/Footer
* Overall header/footer should hide by default once signed in. Use Aether iframe mode?
* Leads module header should show the Exhibit name and booth number. It should also have a button to toggle the Add Lead tab and Lead List tab. There should also be a button to show the Manage/Config tab for the Exhibit.
Header: [Name and Booth # text] [Add Lead / Lead List toggle] [Manage/Config button]


### Tabs:
I am probably using the term "tab" loosely here. It may just be sections that show/hide based on buttons or whatever. The main thing is to keep the UI simple and not overwhelm the user with too many options at once. The main flow should be to easily add leads and then view/manage those leads. The Manage/Config tab is more for the person managing the Exhibit and should be separate from the lead capture and management interface.

1. Start - Sign In / Licenses / Payment
2. Add - Search/QR
3. Leads - List of Attendee Leads for Exhibitor
4. Manage - Leads (app and exhibit) Manage


### [tab 1] Start / Sign In / Payment
* Only shows when not signed in as Exhibit Licensed Leads User
* Show notification and or message that this is a PWA and can be installed on their device for easier access.

* Sign in with Exhibit passcode
    * This will then allow them to Manage the Exhibit License
* Sign in with Exhibit Licensed user
    * This will then allow them to Manage the Exhibit License
* Payment - Leads Payment
* Not Paid: <span class="fas fa-question text-red-500 m-1"></span> <span class="fas fa-credit-card mx-1"></span> Waiting for payment
* Paid: <span class="fas fa-check text-green-500 m-1"></span> <span class="fas fa-credit-card mx-1"></span> Marked as paid
* Need to switch to Lucide icons
* Sections:
    * Sign in with Exhibit "shared" passcode
        * This will then allow them to Manage the Exhibit License
        * Change to Sign Out once signed in
        * Once signed in, show message to the Exhibit person. Allow them to select number of Licenses, make a payment, and manage the Licenses if paid.
    * Sign in with Exhibit Licensed user
        * This will then allow them to Manage the Exhibit License
        * Change to Sign Out once signed in
        * Once signed in, show message to the Leads user. A big button should allow them to then start adding leads.
    * Payment (Stripe) - Leads Payment
        * Only show if signed in with Exhibit "shared" passcode and not marked as paid.
    * Licenses (table):
        * A client staff (Trusted Access or above) or someone signed in with an Exhibit passcode can add/edit/remove licenses.
        * License:
            * full_name
            * email
            * passcode
* Buttons and Inputs:
    * Sign in with Exhibit passcode
    * Sign in with Exhibit Licensed user
    * Payment - Leads Payment
    * Add/Edit/Remove Licenses (if signed in with Exhibit passcode or Trusted Access or above)

### [tab 2] Add - Search/QR
* Show only when signed in as Exhibit Licensed Leads User or Trusted Access or above.
* Allow for text search of Attendee Badge ID, QR code, name, email, or affiliations.
* Allow for QR code scan to add Attendee Badge as Lead.
* Once found, show basic Attendee Badge info and button to "Add as Lead".
* If already added as Lead, show message and button to "View Lead".
* Sections:
    * Text search
    * QR scan
    * Results with "Add as Lead" or "View Lead" button
* Buttons and Inputs:
    * Text input for search
    * Button to trigger search
    * Button to trigger QR scan (opens camera and scans QR code on badge)
    * Button to "Add as Lead" if Attendee Badge found and not already a Lead
    * Button to "View Lead" if Attendee Badge found and already a Lead
Functions needed:
    * Search function to find Attendee Badge by Badge ID, QR code, name, email, or affiliations.
    * QR code scan function to read QR code and find Attendee Badge.
    * Add Lead function to create Exhibit_tracking entry linking Exhibit and Attendee Badge.

### [tab 3] Leads - List of Attendee Leads for Exhibitor
* Allow for toggle between showing all per Exhibit and per licensed user based on their email address. Not perfect, but works well enough.
* Allow for easy edit or remove
* Sections:
    * List of Leads with basic info and buttons to Edit or Remove
    * Options:
        * Filter by Licensed user email address (dropdown of emails that have added leads for this Exhibit)
        * Toggle for show/hide Hidden records
        * Select options for sorting: Newest added first, Oldest added first, Alpha ascending, Alpha descending, Last updated first
* Buttons and Inputs:
    * Button to Export Data - CSV or XLSX
    * Toggle for show/hide Hidden records
    * Select options for sorting: Newest added first, Oldest added first, Alpha ascending, Alpha descending, Last updated first
    * Should it have a text search?
* NOTE: It is probably easiest for them to us the search tab to find a lead that has already been added. It will show "View Lead" button if already added.
Functions needed:
    * Load Leads function to get Exhibit_tracking entries for the Exhibit.
    * Filter function to filter by Licensed user email address.
    * Sort function to sort by selected option.
    * Export function to export displayed Leads to CSV or XLSX.

### [tab 4] Manage - Leads (app and exhibit) Manage / Config
#### Exhibit Specific
* Priority/payment toggle - Administrator Access or above
* Max licenses (number) - readonly or edit for Administrator Access or above
* Small devices (number) - readonly or edit for Administrator Access or above
* Large devices (number) - readonly or edit for Administrator Access or above
* Exhibit (shared) Passcode
* Same Exhibit Leads License list component as the Start tab's Licensed Users section

#### App Specific

* Show/Hide Payment Tab
* Additional Settings:
    * List refresh interval in seconds - default 25 seconds; 1 second to 2 minutes (120000)
    * Basic reload/refresh
    * Clear Indexed DB
    * Clear localStorage
    * Auto hide header/footer on sign in - default true
    * (?) Turn on iframe mode
    * (?) Show or hide additional details - Use "$events_loc.show_details"?

* Sections:
    * Exhibit Specific Manage/Config
    * App Specific Manage/Config
* Buttons and Inputs:
    * Exhibit Specific:
        * Priority/payment toggle - Administrator Access or above
        * Max licenses (number) - readonly or edit for Administrator Access or above
        * Small devices (number) - readonly or edit for Administrator Access or above
        * Large devices (number) - readonly or edit for Administrator Access or above
        * Exhibit (shared) Passcode
        * Same Exhibit Leads License list component as the Start tab's Licensed Users section
    * App Specific:
        * Show/Hide Payment Tab
        * Show last refresh time and counter for next refresh based on the List refresh interval setting.
        * Additional Settings:
            * List refresh interval in seconds - default 25 seconds; 1 second to 2 minutes (120000)
            * Basic reload/refresh (F5)
            * Clear Indexed DB
            * Clear localStorage
            * Auto hide header/footer on sign in - default true
            * (?) Turn on iframe mode
            * (?) Show or hide additional details - Use "$events_loc.show_details"?
* Functions:
    * Update Exhibit configuration function to update the Exhibit with the new settings.
    * Update App configuration function to update the app-wide settings for the Leads module.

