feat(TICKET-LOGO): completed feature

This commit is contained in:
chattie
2026-08-25 06:35:39 +02:00
parent 419f47ec1c
commit 7639c1ff42
16 changed files with 324 additions and 12 deletions

View File

@@ -57,6 +57,7 @@ interface ReceiptSettings {
contactPhone: string;
receiptHeader: string;
receiptFooter: string;
logoUrl: string;
prefix: string;
nextNumber: number;
padding: number;
@@ -72,6 +73,7 @@ const emptyReceipt: ReceiptSettings = {
contactPhone: '',
receiptHeader: '',
receiptFooter: '',
logoUrl: '',
prefix: 'TPV',
nextNumber: 1,
padding: 6,
@@ -823,6 +825,12 @@ export default function PosAdminPage() {
value={receipt.receiptFooter}
onChange={(value) => setReceipt({ ...receipt, receiptFooter: value })}
/>
<Field
label="URL del logo"
value={receipt.logoUrl}
onChange={(value) => setReceipt({ ...receipt, logoUrl: value })}
placeholder="https://ejemplo.com/logo.png"
/>
<Field
label="Prefijo de ticket"
value={receipt.prefix}

View File

@@ -72,7 +72,7 @@ export default function ReceiptModal({
{/* Logo */}
<div className="mb-3 flex justify-center">
<img
src="/images/logo-main.png"
src={receipt.logoUrl ?? '/images/logo-main.png'}
alt="Logo"
className="h-16 object-contain print:h-12"
/>

View File

@@ -47,6 +47,7 @@ export interface PosReceipt {
email: string | null;
phone: string | null;
};
logoUrl: string | null;
terminal: { id: string; name: string };
cashier: string;
sessionId: string;