-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
This issue covers introducing multi-tenancy (Business entity), moving all hardcoded lodge content into the database with a WYSIWYG CMS, managing guest stays with driver/tracker assignments, and wiring driver/tracker into the game drive flow.
Phase 1: Business Model + Multi-tenancy
-
Businessmodel added to Prisma schema (id, name, slug) -
Usermodel updated withbusinessIdrelation -
Lodgemodel updated withbusinessIdrelation -
PointOfInterestmodel updated withlodgeIdrelation - Auth session includes
businessId(with JWT fallback for existing tokens) - Seed creates "Klaserie Private Camps" business
- Dundee Camp removed entirely from seed and database
- All existing users and lodges backfilled with
businessId - Registration derives
businessIdfrom selected lodge - Lodge and POI routers scoped to business
Phase 2: Lodge Content CMS
- Lodge schema expanded:
slug,tagline,description,highlights,capacity,detailedLocation,heroImages,brandName,brandLogoUrl,brandLogoLight,brandAccentColour,brandWebsiteUrl,mapOverlayUrl,mapOverlayBounds - Old
brand/logoUrlfields removed - Hardcoded
lodge-data.tsdeleted — all content now in database -
lodge.bySlugquery (public, for lodge detail page) -
lodge.showcasequery (public, for lodge listing page) -
lodge.updatemutation (admin, for editing lodge content) - Lodge listing page (
/lodges) rewritten to fetch from DB - Lodge detail page (
/lodges/[slug]) rewritten to fetch from DB with Markdown rendering - Admin lodge content editor (
/admin/lodges) with WYSIWYG Markdown editor (@uiw/react-md-editor) - Map overlay now dynamic (removed hardcoded Dundee overlay)
- Seed populates all lodge content fields for Nzumba and Last Word Kitara
Phase 3: Stay Model
-
Staymodel added to Prisma schema with lodge relation, date range, label, driver name, tracker name - Stay router:
list,active,create,update,delete - Admin stays page (
/admin/stays) with full CRUD - Active stay indicator (green badge) on stays list
- Multiple overlapping stays per lodge supported
Phase 4: Driver/Tracker on Drives
-
DriveSessionschema updated with optionaldriverNameandtrackerNamefields - Drive start flow prompts for driver and tracker (crew selection modal)
- Pre-filled from active stay if available, with option to override or skip
- Driver and tracker names saved on each drive session
- Driver and tracker shown on drive detail page
- Driver and tracker shown on drive history list
-
updateCrewDetailsmutation for editing crew after drive starts
Phase 5: Nav & UX Improvements
- Admin nav items grouped under "Admin" dropdown (desktop) / section header (mobile)
- Verify admin dropdown renders correctly after cache clear
- Offline support for driver/tracker (stored locally, synced when online)
Dependencies
Phase 1 (Business + Session)
├──> Phase 2 (Lodge Content CMS) ─┐
└──> Phase 3 (Stay Model) ─┼──> Phase 4 (Driver/Tracker)
─┘
Phase 5 (Nav/UX) — independent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels