mega-plant/scripts
Dave 1429c8087b feat(plant): vehicle site history from Fuel Logs
/plant and /plant/map import Fuel Logs CSVs by exact QR and show each
vehicle's current and previous distinct site with the dates they were
observed.

- plant_site_observations is durable, QR-keyed history. It is never wiped
  and a previous site is never manufactured.
- An older or repeated snapshot must not move a vehicle backwards; untimed
  conflicting sites on one day are held for review.
- A manual site change shares the same history and the same lock.
- Current/previous metadata and the sticker QR are captured BEFORE the asset
  rows are deleted in the seed, so a re-seed cannot wipe them. Explicit
  empty values are preserved too: clearing a site is a deliberate manual
  observation, not permission to restore an old sheet value.
- Imports change location metadata only. They never touch income, cost or
  fuel measurements.
- A new named site is created only for a matched Plant vehicle. Missing
  coordinates mean "awaiting a pin", never a headquarters fallback.

Owner-confirmed 2026-11-04: TLB06's QR is 1089, not the old meter reading
4704. lib/plant-site-policy.json holds the confirmed aliases (Equestria
Bastion Job -> Equestria 215, Cosmo City / Lion Park -> Cosmo City); no
other identity is guessed.
2026-11-05 00:18:24 +02:00
..
audit-auth-mobile.mjs feat(clock): add standalone employee clock PWA 2026-10-21 06:39:15 +02:00
backfill-suppliers.mjs Add Suppliers list; book purchase orders and petty-cash slips against it 2026-10-22 15:43:57 +02:00
book-invoice.mjs
extract.mjs
import-plant-sites.ts feat(plant): vehicle site history from Fuel Logs 2026-11-05 00:18:24 +02:00
seed.mjs feat(plant): vehicle site history from Fuel Logs 2026-11-05 00:18:24 +02:00
setup-asset-qr.mjs Job cards oil path, Fuel tab diesel-only, Mechanic role, Plant Register QR column 2026-10-22 13:44:01 +02:00
setup-auth.mjs Clock app: vehicle-QR diesel book-out with meter photo; user access levels 2026-10-22 12:25:15 +02:00
setup-cash-float-collection.mjs Cash float card, Office role + Slips tab, job card PDF, manual close/delete 2026-10-22 15:09:57 +02:00
setup-clock.mjs Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
setup-financing-collections.mjs Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics 2026-10-09 01:06:27 +02:00
setup-insurance-collections.mjs Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics 2026-10-09 01:06:27 +02:00
setup-invoice-collections.mjs
setup-invoice-edits-collection.mjs Suppliers: replace the menu entry with the new page, flag over-invoiced POs, audited invoice amount corrections 2026-10-29 20:49:05 +02:00
setup-job-cards-collection.mjs Cash float card, Office role + Slips tab, job card PDF, manual close/delete 2026-10-22 15:09:57 +02:00
setup-mechanics-collections.mjs Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics 2026-10-09 01:06:27 +02:00
setup-oil-collections.mjs Clock app: vehicle-QR diesel book-out with meter photo; user access levels 2026-10-22 12:25:15 +02:00
setup-operators-collections.mjs Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
setup-plant-site-history.mjs feat(plant): vehicle site history from Fuel Logs 2026-11-05 00:18:24 +02:00
setup-purchase-collections.mjs Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics 2026-10-09 01:06:27 +02:00
setup-purchase-invoices-collection.mjs Purchase invoices, Suppliers 2 with payments, multi-page PO parsing 2026-10-29 20:29:08 +02:00
setup-site-assignment.mjs
setup-supplier-payments-collection.mjs Purchase invoices, Suppliers 2 with payments, multi-page PO parsing 2026-10-29 20:29:08 +02:00
setup-suppliers-collection.mjs Add Suppliers list; book purchase orders and petty-cash slips against it 2026-10-22 15:43:57 +02:00
verify-auth-routes.mjs Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
verify-clock-pwa.mjs feat(clock): add standalone employee clock PWA 2026-10-21 06:39:15 +02:00
verify-clock.mjs Add Workforce pages, Plant Clock tab bar and oil & diesel book-out 2026-10-22 11:39:18 +02:00
verify-cost-reconciliation.mjs