feat: add financial panel, compact services list, add Syncthing

- New /financial page with sales/expenses cards, monthly bar chart and
  expense distribution pie chart (Recharts)
- New API endpoint GET /api/financial with queries on tblinvoices and
  tblexpenses
- Compact services grid (2-col dots layout) in Monitor page
- Add Syncthing to critical services monitoring
- Add Financeiro nav link to Dashboard, Monitor and Financial headers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 22:50:12 +00:00
parent 86ad4a64be
commit 12e1552d02
7 changed files with 478 additions and 5 deletions

22
api/routes/financial.ts Normal file
View File

@@ -0,0 +1,22 @@
/**
* Financial API Route
* GET /api/financial
* @author Descomplicar® | @link descomplicar.pt | @copyright 2026
*/
import { Router } from 'express'
import type { Request, Response } from 'express'
import { getFinancialData } from '../services/financial.js'
const router = Router()
router.get('/', async (_req: Request, res: Response) => {
try {
const data = await getFinancialData()
res.json(data)
} catch (error) {
console.error('Financial API error:', error)
res.status(500).json({ error: 'Internal server error' })
}
})
export default router