// Today's paid orders at the counter (plan step 3.3e): the cashier's own shift or everyone's // (picked on the left), newest payment first, each with what was paid, how, by whom and what // was already given back. A tap shows the order on the right (ReceiptPanel) to refund it. import { Banknote, CreditCard, Undo2 } from 'lucide-react' import { useFormat, useTranslation } from '@xenia/i18n' import { EmptyState, Spinner } from '@xenia/ui' export default function ReceiptsView({ data, scope, picked, onPick }) { const { t } = useTranslation('terminal') if (!data) return
if (!data.orders.length) { return (
) } return (
{data.orders.map(o => onPick(o.id)} />)}
) } function ReceiptCard({ order, picked, onPick }) { const { t } = useTranslation('terminal') const { formatMoney, formatTime } = useFormat() const refunded = order.refunded > 0 return ( ) }