From b5028ada52e544dfca9cc3ac8ad88a4e7b59d354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 15 Oct 2025 13:36:41 +0200 Subject: [PATCH 1/3] fix: update QR code print layout to show payedAmount instead of yearMonth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove billYear and billMonth from second column, add payedAmount as last value. - Update PrintBarcodeData interface to replace yearMonth with payedAmount - Modify fetchBarcodeDataForPrint to include bill.payedAmount - Update PrintPreview display to show payedAmount (formatted from cents) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/lib/actions/printActions.ts | 6 +++--- app/ui/PrintPreview.tsx | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/lib/actions/printActions.ts b/app/lib/actions/printActions.ts index 4007e71..45616b2 100644 --- a/app/lib/actions/printActions.ts +++ b/app/lib/actions/printActions.ts @@ -10,7 +10,7 @@ export interface PrintBarcodeData { locationName: string; billName: string; barcodeImage: string; - yearMonth: string; + payedAmount?: number | null; } /** @@ -38,7 +38,7 @@ export const fetchBarcodeDataForPrint = withUser(async (user: AuthenticatedUser, // Extract and flatten barcode data const printData: PrintBarcodeData[] = []; - + for (const location of locations) { for (const bill of location.bills) { if (bill.barcodeImage && bill.barcodeImage.trim() !== "") { @@ -46,7 +46,7 @@ export const fetchBarcodeDataForPrint = withUser(async (user: AuthenticatedUser, locationName: location.name, billName: bill.name, barcodeImage: bill.barcodeImage, - yearMonth: yearMonth + payedAmount: bill.payedAmount }); } } diff --git a/app/ui/PrintPreview.tsx b/app/ui/PrintPreview.tsx index 55a9576..903ff7e 100644 --- a/app/ui/PrintPreview.tsx +++ b/app/ui/PrintPreview.tsx @@ -117,15 +117,17 @@ export const PrintPreview: React.FC = ({ data, year, month, t
-
- 📅 {item.yearMonth} -
🏠 {item.locationName}
📋 {item.billName}
+ {item.payedAmount && ( +
+ 💰 {(item.payedAmount / 100).toFixed(2)} +
+ )}
From 05b8d38a1748ac3005cfdcc96eeaef228d70caf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 15 Oct 2025 13:36:50 +0200 Subject: [PATCH 2/3] chore: remove obsolete .mcp copy.json configuration file --- .mcp copy.json | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .mcp copy.json diff --git a/.mcp copy.json b/.mcp copy.json deleted file mode 100644 index 88ff178..0000000 --- a/.mcp copy.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "mcpServers": { - "serena": { - "command": "uvx", - "args": [ - "--from", - "git+https://github.com/oraios/serena", - "serena", - "start-mcp-server", - "--enable-web-dashboard", - "false" - ] - }, - "context7": { - "type": "http", - "url": "https://mcp.context7.com/mcp" - } - } -} \ No newline at end of file From cd3b2ef16db14ca202a8659350993fa48c9f7293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 15 Oct 2025 13:45:55 +0200 Subject: [PATCH 3/3] fix: expand cell padding in print layout to fit 6 bills per A4 page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase padding and spacing to fit exactly 6 bills per page (down from 8). - Increase table cell padding (th: 8px 12px, td: 16px 12px) - Set barcode image max-height to 85px - Increase text spacing to 0.5rem in print mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/ui/PrintPreview.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/ui/PrintPreview.tsx b/app/ui/PrintPreview.tsx index 903ff7e..dd17e7c 100644 --- a/app/ui/PrintPreview.tsx +++ b/app/ui/PrintPreview.tsx @@ -40,7 +40,7 @@ export const PrintPreview: React.FC = ({ data, year, month, t width: 69.6mm !important; max-width: 69.6mm !important; height: auto !important; - max-height: none !important; + max-height: 85px !important; } .print-table { @@ -70,9 +70,21 @@ export const PrintPreview: React.FC = ({ data, year, month, t background: white !important; } + .print-table th { + padding: 8px 12px !important; + } + + .print-table td { + padding: 16px 12px !important; + } + .print-table thead tr { background: #f5f5f5 !important; } + + .print-table .space-y-1 > * + * { + margin-top: 0.5rem !important; + } } `}