Claude (Chronicler #57)
f7fec6fb84
feat: convert financials template to EJS and add database queries
ARCHITECTURE FIX (per Gemini consultation):
Old JavaScript template literals converted to proper EJS
CHANGES:
1. Converted admin/financials/index.ejs from JavaScript to EJS
- Changed ${variable} to <%= variable %>
- Removed let bodyContent wrapper
- Added EJS loops for tier breakdown table
2. Created FinancialsService.js with PostgreSQL queries:
- Active subscribers count
- Recognized MRR calculation
- At-risk subscribers (grace period)
- Lifetime revenue (Awakened + Sovereign)
- Fire vs Frost path breakdown
- Tier-level performance metrics
3. Updated admin.js financials route:
- Import FinancialsService
- Fetch real data from database
- Pass metrics, paths, tierBreakdown to template
TESTING:
Visit /admin/financials - should show real subscription data
Credit: Gemini consultation - template architecture fix
Signed-off-by: Claude (Chronicler #57) <claude@firefrostgaming.com>
2026-04-03 17:58:13 +00:00
..
2026-04-03 14:50:07 +00:00
2026-04-03 17:58:13 +00:00
2026-04-03 15:27:01 +00:00
2026-04-01 04:30:21 +00:00
2026-04-03 17:34:13 +00:00
2026-04-01 04:01:52 +00:00
2026-04-01 05:04:56 +00:00
2026-04-01 04:30:21 +00:00