admin and Claude Sonnet 4.6
0389d6091a
fix(config): phase 7 follow-up — fix remaining /ims/ occurrences in sw.js, notifications, components
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-07-23 22:32:11 +08:00
admin and Claude Sonnet 4.6
9d047e168f
feat(config): phase 7 — drop /ims basePath, update all hardcoded paths, refresh env spec
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-07-23 22:27:46 +08:00
admin and Claude Sonnet 4.6
690485f74e
feat: delete + deactivate for sites, zones, and trucks; harden incident API error handling
...
- zones: add active column (migration 20260713000005)
- sites/zones API: PATCH (toggle active) + DELETE (blocked when incidents reference it)
- trucks API: PATCH + DELETE with same pattern
- admin page: select active for sites + zones
- site-zone-manager + truck-manager: deactivate toggle + delete button per row with busyId
- incidents API: reject reports on deactivated zone/site; wrap handler in top-level try-catch so unhandled errors return JSON (not HTML)
- report-form: parse JSON separately so HTTP status code surfaces instead of generic "Something went wrong"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
2026-07-13 16:05:36 +08:00
admin and Claude Sonnet 4.6
370b985375
feat(admin): truck report link + pre-fill form via ?truck_id=
...
Scanning truck QR opens /ims/report?truck_id=<id>, which pre-selects
incident_type=transport and the truck in the form. TruckManager shows
"Report link / QR target" per truck, mirroring zones.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
2026-07-13 11:49:56 +08:00
admin and Claude Sonnet 4.6
f90bf4ed03
feat: transport incidents with truck number support
...
- DB: trucks table + incidents.truck_id FK + transport enum value
- Validation: transport type requires truck_id
- Create API: validates truck exists/active, persists truck_id
- Report form: truck dropdown shown when type=transport (required)
- Admin: TruckManager CRUD + /api/admin/trucks route
- Detail: trucks join surfaced in incident-detail + detail page query
- Inbox (HSE + supervisor): truck filter, transport in TYPE_OPTIONS,
fixed stale enum values (dropped dangerous_occurrence/mhe_asset/occupational_disease)
- List: transport label + truck number badge in rows
- i18n: transport + truckLabel/truckPlaceholder in en/ms/zh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
2026-07-13 10:56:07 +08:00