diff --git a/backlog/features.json b/backlog/features.json index 38db08b..a56b7d0 100644 --- a/backlog/features.json +++ b/backlog/features.json @@ -8002,14 +8002,16 @@ "description": "In selfpay mode show only 'Pagar' and 'Limpiar ticket'. On pay, ask optional email, then show payment methods. Cash prints the ticket and sends customer to cashier; if email was provided, also send the receipt by email. Keep card/other methods ready for future posnet integration.", "priority": "high", "risk": "high", - "status": "pending", + "status": "done", "created_at": "2026-08-26", "gates": { - "reviewer": false, - "security": false, - "qa": false + "reviewer": true, + "security": true, + "qa": true, + "close": true }, - "phase": "pos" + "phase": "pos", + "completed_at": "2026-08-26T18:40:43Z" }, { "id": "CLUB-001", diff --git a/project/apps/pos/src/app/(terminal)/page.tsx b/project/apps/pos/src/app/(terminal)/page.tsx index 337dc63..534eb18 100644 --- a/project/apps/pos/src/app/(terminal)/page.tsx +++ b/project/apps/pos/src/app/(terminal)/page.tsx @@ -140,6 +140,9 @@ export default function RegisterPage() { // POS-FIX-4: toast notification when product added to cart const [addedToast, setAddedToast] = useState(null); + // POS-SELFPAY-FLOW: optional email for receipt before payment + const [showSelfpayEmail, setShowSelfpayEmail] = useState(false); + const [selfpayEmail, setSelfpayEmail] = useState(''); let toastTimer: ReturnType | undefined; const showAddedToast = (name: string) => { clearTimeout(toastTimer); @@ -1645,19 +1648,22 @@ export default function RegisterPage() { {error}

)} -
- {config.paymentMethods.map((method) => ( - - ))} -
+ {/* POS-SELFPAY-FLOW: in selfpay mode, hide payment methods until email is captured */} + {(!isSelfpayMode || selfpayEmail !== undefined) && ( +
+ {config.paymentMethods.map((method) => ( + + ))} +
+ )}
{!isSelfpayMode && (
+ +
{ + e.preventDefault(); + setShowSelfpayEmail(false); + }} + className="space-y-4" + > +
+ + setSelfpayEmail(e.target.value)} + placeholder="tu@email.com" + className="w-full rounded-xl border border-gray-300 px-4 py-3 text-sm outline-none focus:border-[#2D6A4F]" + /> +
+ + +
+ + + )} + {paymentMethod && (