setup wizard - BevvyTech/BrewskiDocs GitHub Wiki

Setup Wizard

Overview

  • Onboarding modal that opens after team creation or via the “Setup wizard” action in the app header.
  • Guides owners/admins through the minimal configuration required before using the wider admin surface.
  • Displays section status (complete, warning, incomplete) and highlights missing fields per section.

Sections & Actions

  • Account operating mode — New entry step that mirrors the settings display card. Shows three radio options (Strict, Hybrid, Shop-only) with descriptive copy, persists via settingsService.updateOperatingMode, and blocks completion until a mode is chosen (teams default to none).
  • Info — Collects team name/slug, town, country, currency symbol, default locale, and the obscureBatchCode / obscureOrderNumber toggles (both default to enabled for new teams). Saves through settingsService.updateWizardInfo so slug validation doesn’t interfere with other steps.
  • Logo — Uploads or removes the primary logo and icon using teamsService.uploadLogo / teamsService.deleteLogo. Updates the active membership cache so logo changes appear immediately across the UI.
  • Shop — Manages the storefront profile: toggles publicSite.enabled, enforces the 650-character public description and contact email, captures optional telephone/website and sold-by disclaimer copy, validates social links (Twitter/Facebook/Instagram/YouTube/TikTok/Threads) as https:// URLs, and requires the AWRS number plus off-licence shipping/approval toggles before saving via settingsService.updateWizardShop.
  • Invoicing — Captures billing name/address, VAT number, payment instructions, and invoice footer copy for document generation through settingsService.updateWizardInvoicing.
  • Terms — Sets default payment term amount and unit used when creating clients and orders, persisted through settingsService.updateWizardTerms.

Key Behaviours

  • /requires-setup marks the operating mode section as incomplete while team.operatingMode === 'none', ensuring the wizard re-opens until an explicit choice is saved.
  • Language options mirror the settings page (settings-language-option-* translations) so locale labels stay consistent across the app.
  • Country select limits choices to supported fulfilment territories while preserving the user’s previous selection when re-opening the wizard.
  • Removing the logo clears both full-size and icon variants to avoid stale thumbnails.
  • The header shows the standard close icon while a mode has been chosen; the control hides entirely when operating mode is still blocking so first-run teams can’t bypass the wizard.
  • Locale picker is now a compact chip-style button centered in the sidebar footer, reducing its vertical footprint while still exposing the flag and language name.
  • Owners and admins retain access to launch the wizard from the Settings header even when testing lower-permission views via the View as simulator.
  • AWRS validation happens exclusively in the Shop step—the other wizard endpoints no longer block saves when the team hasn’t provided a number yet.
⚠️ **GitHub.com Fallback** ⚠️