Commit Graph
3 Commits
Author SHA1 Message Date
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