fix(pos-selfpay): add Confirmar button after payment + print-only receipt
This commit is contained in:
@@ -1659,6 +1659,7 @@ export default function RegisterPage() {
|
||||
)}
|
||||
{/* POS-SELFPAY-FLOW: in selfpay mode, hide payment methods until email is captured */}
|
||||
{(!isSelfpayMode || selfpayPaymentReady) && (
|
||||
<>
|
||||
<div className="mt-3 grid grid-cols-2 gap-2">
|
||||
{config.paymentMethods.map((method) => (
|
||||
<button
|
||||
@@ -1672,6 +1673,18 @@ export default function RegisterPage() {
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{/* POS-SELFPAY-FLOW: confirm button after payment added in selfpay */}
|
||||
{isSelfpayMode && selfpayPaymentReady && !paymentMethod && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => void confirmSale()}
|
||||
disabled={processing || cart.length === 0 || paidCents <= 0 || paidCents > totals.total}
|
||||
className="mt-3 w-full min-h-16 rounded-xl bg-[#1B4332] text-lg font-bold text-white disabled:opacity-40"
|
||||
>
|
||||
{processing ? 'Confirmando…' : '✅ Confirmar e imprimir'}
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<div className="mt-3 grid grid-cols-2 gap-2">
|
||||
{!isSelfpayMode && (
|
||||
@@ -2119,8 +2132,13 @@ export default function RegisterPage() {
|
||||
{receipt && (
|
||||
<ReceiptModal
|
||||
receipt={receipt}
|
||||
initialEmail={customer?.email ?? receipt.customerEmail ?? ''}
|
||||
initialEmail={
|
||||
isSelfpayMode
|
||||
? selfpayEmail || undefined
|
||||
: customer?.email ?? receipt.customerEmail ?? ''
|
||||
}
|
||||
onDelivered={resetCashier}
|
||||
showActions={!isSelfpayMode}
|
||||
onReturn={
|
||||
config?.session && config?.terminal
|
||||
? (orderId, latest) => {
|
||||
|
||||
Reference in New Issue
Block a user