From 3ccbf9f4503b2cad15d85bbeb4c184300e1df9ba Mon Sep 17 00:00:00 2001
From: Deploy
Date: Wed, 26 Aug 2026 20:40:43 +0200
Subject: [PATCH] feat(pos-selfpay-flow): pOS selfpay: simplified pay flow with
optional email receipt
---
backlog/features.json | 12 +-
project/apps/pos/src/app/(terminal)/page.tsx | 122 +++++++++++++++---
work/artifacts/POS-SELFPAY-FLOW/documenter.md | 4 +
.../artifacts/POS-SELFPAY-FLOW/implementer.md | 31 +++++
.../POS-SELFPAY-FLOW/leader-close.json | 13 ++
work/artifacts/POS-SELFPAY-FLOW/qa.json | 12 ++
work/artifacts/POS-SELFPAY-FLOW/reviewer.json | 14 ++
work/artifacts/POS-SELFPAY-FLOW/security.json | 13 ++
work/runtime-status.json | 18 ++-
9 files changed, 212 insertions(+), 27 deletions(-)
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/documenter.md
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/implementer.md
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/leader-close.json
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/qa.json
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/reviewer.json
create mode 100644 work/artifacts/POS-SELFPAY-FLOW/security.json
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 && (