Commit Graph
5 Commits
Author SHA1 Message Date
rick 90b9bc2425 Polish AccountTreeGrid: dual-value crossfade and smooth animations
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
The tree grid now matches v5 Open Ledgers behavior:

Value crossfade (v5 pattern):
- Each parent cell holds BOTH the aggregate (Σ) and own value
- Two absolutely-positioned overlapping elements at right: 0
- isCollapsed toggles opacity between them via CSS transition
- One fades out, the other fades in — pure crossfade, no value swap
- Single state change drives everything, no JavaScript animation timing

Row animation:
- AnimatedCellContent wraps each cell's content in a height-animated div
- Fixed ROW_HEIGHT (28px) for consistent layout
- overflow: hidden clips vertically without horizontal shift
- Children slide in/out simultaneously with the parent value crossfade

Column stability:
- tableLayout: fixed with colgroup for locked column widths
- All cells use identical CELL_PX padding
- DualValueCell shared between root and animated rows
- position: absolute + right: 0 ensures alignment regardless of text length

Visual polish:
- Σ prefix: 14px bold, only on collapsed non-zero aggregates
- Expanded parents with zero own-value show empty (reduce clutter)
- Chevron rotates 90° smoothly on expand
- Folder/FolderOpen icons for parents, Description for leaves

Made-with: Cursor
2026-04-09 10:51:01 +02:00
rick afde51abf2 Add AccountTreeGrid component and tree report endpoints
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has started running
New reusable AccountTreeGrid component:
- Hierarchical tree with expand/collapse per node
- Σ prefix on aggregated parent values when collapsed
- Parent nodes show sum of all descendants when collapsed
- Own-value shown when expanded (for nodes with direct amounts)
- Column totals invariant: same regardless of expand/collapse state
- Folder/document icons matching v5 visual language
- CSS transitions on hover and state changes
- CSV download support per section

New backend endpoints:
- GET /api/organizations/{orgId}/reports/balance-sheet-tree?year=N
  Returns accounts with quarterly columns: Start, Q1, Q2, Q3, Q4, Current
- GET /api/organizations/{orgId}/reports/profit-loss-tree?year=N
  Returns accounts with: Last Year, Q1, Q2, Q3, Q4, YTD

Rebuilt pages using tree grid:
- Balance Sheet: Assets and Liabilities sections with quarterly breakdown
- Profit & Loss: Revenue and Expenses sections with quarterly breakdown,
  net result chip, CSV download

Modeled after v5 Open Ledgers treegrid functionality.

Made-with: Cursor
2026-04-09 09:38:56 +02:00
rick e25e54b98a Fix dev-mode auth: auto-authenticate on /api/auth/me
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has started running
The auth/me endpoint was excluded from AuthMiddleware (as all /api/auth/
paths are), so dev-mode auto-auth never ran for it. Fixed by checking
DevMode config directly in the /me handler.

Also removed the aggressive window.location redirect from the API client
— the React router handles 401s via the RequireAuth wrapper instead.

Made-with: Cursor
2026-04-08 19:03:55 +02:00
rick 45f026b4f4 Add React frontend with live data pages (section 10)
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has started running
Full React + MUI + TypeScript SPA at frontend/:
- API client with typed interfaces for all endpoints
- AuthContext (session cookies, dev impersonation)
- OrgContext (org list, active org switcher)
- Money formatting (cents → display, satoshis → BCH)

App shell:
- Sidebar navigation with collapsible Ledgers and Financial sections
- Top bar with org switcher, language selector (EN/SV/DE), user chip
- Material UI theme with Inter font

Live data pages (connected to real migrated production data):
- Dashboard: YTD P&L cards, pending tasks, quick links
- Balance Sheet: date picker, assets/debts tables with totals
- Profit & Loss: year selector, income/costs breakdown, net result
- Chart of Accounts: grouped by type with status chips
- Crypto Treasury: total balance, address table with BCH amounts
- Expense Claims: list with amounts, VAT, status chips

Placeholder pages for: Inspect Ledgers, Budget vs Actual, Inbound/
Outbound Invoices, Payouts, End of Month, Org Settings, User Management

Vite dev server proxies /api to ASP.NET Core backend on port 5222.

Made-with: Cursor
2026-04-08 18:32:03 +02:00
rick 8aafe681b1 Scaffold v6 solution, frontend, CI, and Docker
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
Section 1 complete (tasks 1.1-1.7):
- .NET 8 solution with 8 projects (Common, Basic, Database, Logic, Api,
  Backend, Migration, Tests) and correct dependency graph
- NuGet deps: MySqlConnector, NBitcoin, Microsoft.Extensions.Hosting,
  xunit, coverlet
- Common layer: IHasIdentity, enums (Permission, FinancialAccountType,
  DocumentType, CryptoChain, ExpenseClaimStatus, InvoiceStatus,
  PayoutStatus, FinancialDependencyType)
- React + TypeScript + Vite frontend with MUI, react-router, react-i18next
- Localization: EN, SV, DE translation files
- Vite builds to src/UsingCash.Api/wwwroot for static serving
- Multi-stage Dockerfile: Node build + .NET build -> aspnet runtime
- Gitea Actions CI: build, test, lint, Docker image
- appsettings.json with read/write/admin DB credential structure

Also updates data-migration spec/design for mysqldump-based workflow.

Made-with: Cursor
2026-04-08 16:21:00 +02:00