Commit graph

9 commits

Author SHA1 Message Date
DEls
39d85fa8a9 fix(ask): supplier balances, payable per supplier per period, PDF fallback
- Ask's supplier loader didn't pass date_received, so supplier_balances
  and the supplier_balance dataset crashed
- supplier_balances takes a period (thisMonth, thisWeek, month1-3) and
  returns what was received from each supplier in it (payable)
- PocketBase's space-separated dates dropped deliveries on the 1st from
  period filters, including the Suppliers page's Payable KPI
- The PDF route falls back to the answer text when a saved report has
  no sections (older format), instead of a 500

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:56:40 +02:00
DEls
d81a089a86 feat(ask): rain_outlook tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 09:44:01 +02:00
DEls
e5789f3371 feat(ask): delivery_note_queue tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 09:39:38 +02:00
DEls
10eba6f270 feat(ask): supplier_balances tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 09:37:27 +02:00
DEls
30b449009b feat(ask): attendance_today tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:35:48 +02:00
DEls
e83a0d302c fix: overview counts, wrong-unit fuel limits, meter guard, en-ZA numbers, vehicle merge, docs
- Overview/Plant tiles and pages share one vehicle bucket rule (blank unit_type = fleet)
- Plant landing equipment figures were always 0; hour diffs now reject 0 baselines and >24h/day jumps
- km/L limits on plant (and L/h on vehicles) report unit-mismatch instead of false alerts
- formatPercent/formatDecimal replace display toFixed (en-ZA)
- POST /api/vehicles/[id]/merge + Merge duplicate dialog (dry run first)
- Attention links go to equipment vs vehicles by unit type; PO upload view link fixed
- Conditional hook fixed in DN document view; ESLint flat config (next lint removed in 16)
- Docs: current modules/routes/env vars; login + Ask reports plans

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:04:08 +02:00
DEls
08ed89d9c8 feat(dashboard): enhance operations dashboard with rain outlook and coordinate support
Updated the operations dashboard to include a rain outlook feature, providing users with a 7-day forecast based on site coordinates. Added latitude and longitude fields to the site form for better weather data integration. Enhanced the fuel log and site management functionalities to utilize dynamic fuel pricing based on historical data. Improved overall data handling and user experience across various dashboard components.
2026-09-06 19:59:52 +02:00
DEls
b3d27ddaae feat(agent): add worker-hours and vehicle fuel-log formatters
Both build on the same metrics pass the dashboard uses, so per-fill
variance and per-worker totals reconcile with the pages they sit next
to. No new business math — the data already existed, but no tool
exposed it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-30 08:42:00 +02:00
DEls
3884408aa7 feat(agent): add pure tool-result formatting
Every numeric field comes from @/lib/metrics. Results carry a display
block of preformatted strings so the model never formats or rounds
money itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 20:25:39 +02:00