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