Commit graph

31 commits

Author SHA1 Message Date
DEls
e82754ee38 docs(plan): agent tool layer + read-only MCP server (phase 2B)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 20:13:39 +02:00
DEls
15206fa650 docs(plan): fuel attention extraction plan (phase 2A)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 20:04:51 +02:00
DEls
2d36e9b1cd fix(vehicles): handle empty unit_type during updates
Updated the vehicles API to allow PATCH requests with an empty unit_type. This change ensures that existing records with unit_type='' can be updated without validation errors, while maintaining the default value of 'fuel' for new inserts. This adjustment resolves issues with updating pre-existing vehicle records that lack a unit_type field.
2026-08-29 19:17:14 +02:00
DEls
71eb1c00cc docs(plan): fix byDateDesc to return 0 on equal dates 2026-08-28 12:54:02 +02:00
DEls
dc966086bd docs(plan): mark backfill migration as required after schema deploy 2026-08-28 12:47:02 +02:00
DEls
45e2cd7827 docs(plan): clarify Burn by category stays monthly-only 2026-08-28 12:37:53 +02:00
DEls
574df58011 docs(plan): site overhead monthly + one-off implementation plan 2026-08-28 12:37:29 +02:00
DEls
ccaeee6896 docs(spec): clarify card subtitle covers monthly + one-off 2026-08-28 12:33:53 +02:00
DEls
2fac85e79d docs(spec): site overhead monthly vs one-off design 2026-08-28 12:33:39 +02:00
DEls
2204989a3c docs(plan): plant hours weekly log implementation plan
Bite-sized TDD task decomposition covering 13 tasks:
1. PocketBase schema (vehicles.unit_type + plant_hours_log)
2. Type updates (UnitType, PlantHoursLogRecord, BatchType)
3. Shared import-parse helpers + parseTime
4. Per-row validator + derived fields
5. Template generator + seed script
6. GET /api/plant-hours/template
7. Exception-report CSV builder + route
8. POST /api/plant-hours/import
9. DELETE /api/plant-hours/[id]
10. PATCH /api/vehicles/[id] accepts unit_type
11. ImportPlantHoursButton component
12. /dashboard/plant page extension
13. End-to-end smoke test

Each task has files, failing tests, implementation code, run commands,
and commit step. Follows the approved design spec.
2026-08-28 12:26:35 +02:00
DEls
c5230190d0 docs(plan): fuel attention dismissal implementation plan
7-task TDD plan: PB migration, API route + tests, isAlertAcknowledged
helper + tests, server mapper + filter, Dismiss button + optimistic
overlay, Dismissed pill + Restore on detail page, full verification
with Agent Browser. Steps use checkbox syntax for subagent-driven
or inline execution.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-28 12:24:14 +02:00
DEls
cc0abfdc2c docs(plant-hours): weekly log import + exception report design
Adds a design doc for capturing weekly plant-equipment hours via an Excel
template against the existing /dashboard/plant page. One new
plant_hours_log collection, one vehicles.unit_type field, three new
routes (import, template download, exception report CSV), and an
extension to PlantView.

Spec covers: lenient import with per-row errors, downloadable exception
report for fix-and-retry, snapshot of vehicle.unit_type on each row,
over-budget flag against a per-week budget, and a symmetric attention
panel on /dashboard/plant for type mismatches.
2026-08-28 12:20:58 +02:00
DEls
0e13720fa7 docs(spec): fuel attention dismissal design
Per-vehicle 'I've seen this' control on the Fuel dashboard. Stamps
attention_dismissed_at on the vehicles collection; auto-undismisses when
a flagged fuel log with date_logged > dismissal arrives. Timestamp only,
no reason field. Tiny POST/DELETE route + filter line in page mapper +
Dismiss button on alert rows + Dismissed/Restore pill on vehicle detail.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-28 12:19:59 +02:00
DEls
58f2ca6a7b docs(plan): PO supplier edit + DN collapse implementation
5 tasks: API route (TDD), SupplierEditor component, wire into
PoDetailView with state, wrap received items in <details>,
final verification with Agent Browser.
2026-08-27 00:50:44 +02:00
DEls
6c00676343 docs(spec): PO detail supplier edit + DN items collapse
Two scoped follow-ups to the supplier-unknown flag (9897f47):
- Edit supplier on detail page when flagged as unknown
- Collapse received items per delivery note by default
2026-08-27 00:49:42 +02:00
DEls
a8e67faf3d docs(plans): purchasing UI tweaks — 4 small tasks with TDD-friendly bite-sized steps 2026-08-26 23:58:30 +02:00
DEls
7020449853 docs(specs): purchasing UI tweaks — shorter upload labels, unlinked-DN styling, view PO PDF, fulfillment bug 2026-08-26 23:56:34 +02:00
DEls
417723628f docs(specs): fix stale URL example, 'above' wording, and add recordId notes 2026-08-26 23:34:10 +02:00
DEls
0c95243ecf docs(specs): screenshot of compact needs-review modal with working PDF 2026-08-26 23:33:33 +02:00
DEls
aded006b9f docs(plans): PDF URL fix + modal compact 2026-08-26 23:21:26 +02:00
DEls
5e86fadc38 docs(specs): PDF URL fix + compact needs-review modal 2026-08-26 23:20:08 +02:00
DEls
6df78d8ccd docs(plans): needs-review modal resize + inline PDF viewer 2026-08-26 23:00:10 +02:00
DEls
988ffc6377 docs(specs): needs-review modal resize + inline PDF viewer 2026-08-26 22:58:11 +02:00
DEls
8dbf393446 feat(delivery-notes): enhance delivery note upload and processing
- Updated the delivery note upload API to include site ID for better project association.
- Modified the delivery note schema to support additional fields such as processing status, OCR confidence, and received by name.
- Enhanced the UI components for uploading delivery notes to allow file drop functionality and improved user feedback during file selection.
- Refactored purchasing page to integrate delivery notes that require review, providing better visibility and management of pending items.
- Added new KPIs to track active purchase orders and fulfillment percentages, improving overall dashboard insights.
2026-08-26 15:33:30 +02:00
DEls
84ff4c25b2 docs: add PO import queue spec/plan, ignore cooler.env, rewrite n8n ingest impl
Captures the async-queue redesign of the PO/DN import pipeline (see
spec + plan) and rewrites the n8n implementation doc to match the
new cron-driven architecture (workflow 005iI4jX5mq9DsTR). Also
gitignores cooler.env so the local-only deployment reference is no
longer tracked.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 22:03:39 +02:00
DEls
34f272f520 docs(n8n): mark old webhook-sync flow as superseded
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 20:03:11 +02:00
DEls
e45fa11c74 docs(deploy): document POCKETBASE_ADMIN_TOKEN for process-batch + n8n
Both Next.js /api/purchase-orders/process-batch and the n8n cron
workflow need a PocketBase admin token (generated via PocketBase
admin > Settings > Admins). The existing template only documented
email+password auth.

Add a new 'POCKETBASE (Next.js process-batch + n8n cron)' section
with the token variable, the generation instructions, and the
warning that Next.js env and the n8n workflow's hardcoded token
value must match.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 20:01:45 +02:00
DEls
109a6938da Enhance PO upload error handling and validation
- Implement improved error handling for the purchase order upload process, ensuring that failures from n8n are properly surfaced to the user.
- Introduce a timeout mechanism for the n8n fetch request to handle potential delays more effectively.
- Refine the validation logic for the purchase order payload to ensure stricter adherence to expected formats and values.
2026-08-19 15:03:48 +02:00
DEls
8f37f3467f Spec: clarify PO upload dialog does not auto-close
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 15:03:48 +02:00
DEls
24fc85d911 Plan: Purchase Order upload + n8n ingestion implementation
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 02:16:22 +02:00
DEls
14b63e50ab Design: Purchase Order upload + n8n ingestion
Adds design spec and n8n handoff doc for the new PO upload flow:
browser -> Next.js /api/purchase-orders/upload -> n8n OCR ->
Next.js /api/purchase-orders/ingest -> PocketBase via pbAdmin().

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 02:10:58 +02:00