From 86900d7750e2b1212699d2d8f0e0a07780d790a7 Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Thu, 20 Nov 2025 01:50:41 +0200 Subject: [PATCH] fix: Standardize Trial Balance table styling and add export functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Refactor table columns from grouped (Debit+Credit vertical) to separate columns for better scannability - Replace custom HTML buttons with PrimeVue Button components (icon + label) - Move filter action buttons to separate row below filters (matches InvoicesView pattern) - Add Excel and PDF export functionality that fetches ALL data (not just current page) - Update CSS_PATTERNS.md with unified table column structure and filter button patterns - Update CLAUDE.md with table styling requirements and anti-patterns This ensures visual consistency across all table views in the application. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CLAUDE.md | 12 + docs/CSS_PATTERNS.md | 152 ++++++++++ .../frontend/src/views/TrialBalanceView.vue | 281 ++++++++++++++---- 3 files changed, 386 insertions(+), 59 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0e1b3f5..30e7c88 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -189,6 +189,18 @@ ttl_your_data: int = int(os.getenv('CACHE_TTL_YOUR_DATA', '600')) # 10 min defa - ❌ Never use `:deep()` in components (use `src/assets/css/vendor/` for PrimeVue overrides) - ❌ Never duplicate CSS (write once, use everywhere) +**Tables - Unified Column Structure & Filter Buttons**: +- ✅ **ALWAYS use separate columns** for related data (Debit | Credit, not Debit+Credit stacked) +- ✅ **Use PrimeVue DataTable** with one value per `` component +- ✅ **Add filter/action buttons** (clear, export Excel, export PDF, refresh) **on separate row below filters** +- ✅ **PrimeVue Button** components with **icon + label** (not icon-only!) +- ✅ **Export ALL data** from backend (page_size: 999999), not just current page +- ❌ **Never group multiple values** vertically in a single column +- ❌ **Never use HTML `