Send platform operators to the platform console after sign-in #9

Merged
denis_ireri merged 1 commits from fix/operator-landing into main 2026-10-13 15:06:37 +00:00
Contributor

Sign-in sent the platform operator to the wrong page. The operator account is the owner of a placeholder business ("Digital Chances (Platform)"), and every owner landed on their business dashboard. For the operator that meant an empty dashboard with a "Create your first branch" prompt, which looked like a plain owner account.

What changes

  • Sign-in (/api/auth/login → redirectTo) and the home address (/) send a platform operator to /platform. Owners and managers still go to the dashboard, and cashiers to the till.
  • The dashboard header shows "· Platform operator" after the operator's name. The dashboard can still be reached from the console's "Your business dashboard" link.
  • The "Create your first branch" prompt is hidden on the operator's own business.

Testing

  • npm test: 92 tests pass. A new test in tests/account.test.ts checks where sign-in lands for an owner (dashboard), a cashier (till) and the platform operator (platform console).
  • Type check and production build pass.

No migration. Deploy with the usual /opt/aquaflow/deploy.sh.

🤖 Generated with Claude Code

Sign-in sent the platform operator to the wrong page. The operator account is the owner of a placeholder business ("Digital Chances (Platform)"), and every owner landed on their business dashboard. For the operator that meant an empty dashboard with a "Create your first branch" prompt, which looked like a plain owner account. ## What changes - **Sign-in** (`/api/auth/login` → `redirectTo`) and the **home address** (`/`) send a platform operator to `/platform`. Owners and managers still go to the dashboard, and cashiers to the till. - The **dashboard header** shows "· Platform operator" after the operator's name. The dashboard can still be reached from the console's "Your business dashboard" link. - The **"Create your first branch" prompt** is hidden on the operator's own business. ## Testing - `npm test`: 92 tests pass. A new test in `tests/account.test.ts` checks where sign-in lands for an owner (dashboard), a cashier (till) and the platform operator (platform console). - Type check and production build pass. No migration. Deploy with the usual `/opt/aquaflow/deploy.sh`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
denis_ireri added 1 commit 2026-10-13 15:06:10 +00:00
The operator account is the owner of a placeholder business, so sign-in
landed it on that business's empty dashboard with a "Create your first
branch" nudge. Operators now land on /platform (sign-in and the root page),
the dashboard header says "Platform operator", and the nudge is hidden on
the operator's own business.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
denis_ireri merged commit 34ea64c4d4 into main 2026-10-13 15:06:37 +00:00
denis_ireri deleted branch fix/operator-landing 2026-10-13 15:06:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Ezekiel_Nyangweso/ERP#9