feat: tickets backlog + TPV toggle sidebar

This commit is contained in:
chattie
2026-08-24 15:46:18 +02:00
parent 0dcb0f63a0
commit ba376dbab0
5 changed files with 15568 additions and 3 deletions

View File

@@ -114,6 +114,7 @@ export default function RegisterPage() {
const [todaySales, setTodaySales] = useState<PosPendingSale[]>([]);
const [loadingPending, setLoadingPending] = useState(false);
const [salesTab, setSalesTab] = useState<'pending' | 'day'>('day');
const [showSidebar, setShowSidebar] = useState(true);
const [printingSaleId, setPrintingSaleId] = useState<string | null>(null);
const [restPaymentFor, setRestPaymentFor] = useState<PosPendingSale | null>(null);
const [processingRest, setProcessingRest] = useState(false);
@@ -902,6 +903,7 @@ export default function RegisterPage() {
return (
<div className="flex h-screen" style={{ '--color-primary': '#2D6A4F' } as React.CSSProperties}>
{showSidebar && (
<aside
className="hidden w-[380px] shrink-0 flex-col border-r bg-gray-50 p-3 lg:flex"
aria-label="Pedidos"
@@ -1163,6 +1165,7 @@ export default function RegisterPage() {
</>
)}
</aside>
)}
{/* POS-FIX-4: product added toast */}
{addedToast && (
<div className="pointer-events-none fixed top-6 right-6 z-50 animate-in slide-in-from-top-2 fade-in duration-200">
@@ -1182,6 +1185,14 @@ export default function RegisterPage() {
<span className="rounded-full bg-green-100 px-2 py-0.5 text-xs text-green-700">
Caja abierta
</span>
<button
type="button"
onClick={() => setShowSidebar((v) => !v)}
title={showSidebar ? 'Ocultar panel' : 'Mostrar panel'}
className="ml-2 rounded-lg border border-gray-300 bg-white px-2 py-1 text-xs font-medium text-gray-600 hover:bg-gray-50"
>
{showSidebar ? '◀' : '▶'} Panel
</button>
{!config?.terminal?.settings?.selfpayMode && (
<button
type="button"