Add OTP login flow and multi-cafe role switching
Introduce an OTP input box on login/register, surface user roles and a cafe chooser, add a dashboard switch button in the POS screen, and register OTP validators explicitly to survive Docker layer caching. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import { useTranslations, useLocale } from "next-intl";
|
||||
import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
LayoutDashboard,
|
||||
Minus,
|
||||
Package,
|
||||
Plus,
|
||||
@@ -899,6 +900,19 @@ export function PosScreen() {
|
||||
>
|
||||
{t("modePay")}
|
||||
</Button>
|
||||
|
||||
<div className="flex-1" />
|
||||
|
||||
{/* Dashboard shortcut — only visible to Owner / Manager */}
|
||||
{isManager && (
|
||||
<a
|
||||
href="/"
|
||||
className="flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
|
||||
>
|
||||
<LayoutDashboard className="size-4" />
|
||||
<span className="hidden sm:inline">{cafeName}</span>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* ── Pay mode ──────────────────────────────────────────────────────── */}
|
||||
|
||||
Reference in New Issue
Block a user