fix(pos-selfpay): always show print button in ReceiptModal, hide email/return in selfpay
This commit is contained in:
@@ -188,19 +188,18 @@ export default function ReceiptModal({
|
||||
</div>
|
||||
|
||||
{/* Actions - hidden when printing */}
|
||||
{showActions && (
|
||||
<div className="no-print mt-6 space-y-3 border-t pt-5">
|
||||
<p className="text-center text-sm text-gray-600">
|
||||
Imprime o envía el ticket para preparar la siguiente venta.
|
||||
{showActions ? 'Imprime o envía el ticket para preparar la siguiente venta.' : 'Pulsa Imprimir para terminar.'}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={printReceipt}
|
||||
className="no-print min-h-14 w-full rounded-xl bg-[#2D6A4F] font-bold text-white"
|
||||
>
|
||||
🖨️ Imprimir ticket
|
||||
🖨️ Imprimir y cerrar
|
||||
</button>
|
||||
{onReturn && !receipt.isReturn && (
|
||||
{showActions && onReturn && !receipt.isReturn && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onReturn(receipt.orderId, receipt)}
|
||||
@@ -209,6 +208,7 @@ export default function ReceiptModal({
|
||||
↺ Devolver artículos
|
||||
</button>
|
||||
)}
|
||||
{showActions && (
|
||||
<form onSubmit={emailReceipt} className="flex gap-2 no-print">
|
||||
<label className="sr-only" htmlFor="receipt-email">
|
||||
Email del ticket
|
||||
@@ -229,13 +229,13 @@ export default function ReceiptModal({
|
||||
{sending ? 'Enviando…' : '✉ Enviar'}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
{error && (
|
||||
<p className="no-print text-sm font-medium text-red-600" aria-live="polite">
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Print-only styles */}
|
||||
|
||||
Reference in New Issue
Block a user