MEGAINFRA-WEBAPP/src/components
DEls 610426776a fix(plant-hours): document-first import with honest status
The plant-hours import route used to create its audit row with
status "processed" hardcoded before a single insert ran. Production
ended up with 19 such batches, 18 of which created zero rows while
claiming success.

Cut the route over to plant_hours_sheets (Task 6/7): the document is
created `pending` with the source file attached before any parsing,
and the real outcome is computed from actual insert counts via
resolveDocumentOutcome() (Task 8) and written back before the
response returns. A sheet whose vehicles match nothing now comes back
`failed` with rows_created: 0, not `processed`.

Also renames plant_hours_log's `batch_reference` writes to the new
`plant_hours_sheet` relation (src/lib/plant-hours-import.ts), and
renames the exception-report route folder from [batchId] to [sheetId]
to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 13:56:11 +02:00
..
layout feat(chat): sidebar link, editable-while-waiting, sticky footer, limit warning 2026-08-30 23:51:45 +02:00
ui feat(dashboard): add job start date to site records and enhance site management 2026-08-25 19:01:56 +02:00
add-plant-button.tsx feat(vehicles): implement DELETE endpoint for vehicle removal 2026-09-02 11:52:39 +02:00
auth-gate.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
edit-mode-bar.tsx feat(fuel-view): enhance inline editing and UI components 2026-08-26 08:54:57 +02:00
fixed-cost-dialog.tsx refactor(fixed-cost-dialog): drop defaultType prop, use field-message lookup, local-date default 2026-08-28 13:22:07 +02:00
import-fuel-logs-button.tsx feat(delivery-notes): enhance delivery note upload and processing 2026-08-26 15:33:30 +02:00
import-plant-hours-button.tsx fix(plant-hours): document-first import with honest status 2026-09-11 13:56:11 +02:00
import-timesheets-button.tsx feat(delivery-notes): enhance delivery note upload and processing 2026-08-26 15:33:30 +02:00
logo.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
needs-review-dns.tsx feat(purchasing): add searchable picker for PO assignment 2026-09-07 14:20:16 +02:00
pwa-register.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
rain-outlook-card.tsx feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
site-form-dialog.tsx feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
slip-preview.tsx fix(purchasing): proxy PB files so PDFs render in the slip iframe 2026-09-07 14:53:22 +02:00
theme-toggle.tsx Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
upload-delivery-note-button.tsx feat(delivery-notes): dedup by SHA-256 at upload time 2026-09-07 14:49:33 +02:00
upload-purchase-order-button.tsx feat(purchasing): shorten upload button labels (Upload PO / Upload DN) 2026-08-26 23:59:21 +02:00
vehicle-unit-type-cell.tsx fix(components): keep UnitTypePill text on a single line 2026-08-31 14:18:19 +02:00