Skip to content

Add job evidence checkpoints, damage reports, signatures and VIN OCR driver intake#396

Merged
proforcetech merged 2 commits intomainfrom
codex/add-photo-checkpoints-to-job-lifecycle
Jan 4, 2026
Merged

Add job evidence checkpoints, damage reports, signatures and VIN OCR driver intake#396
proforcetech merged 2 commits intomainfrom
codex/add-photo-checkpoints-to-job-lifecycle

Conversation

@proforcetech
Copy link
Copy Markdown
Owner

Motivation

  • Enforce photo-based checkpoints in the workorder/job lifecycle so status transitions require pre-load, hookup, and drop-off evidence.
  • Capture VIN via OCR in the driver UI to auto-fill vehicle details and reduce manual entry errors.
  • Provide a tap-to-mark damage diagram feature for drivers to record vehicle damage tied to jobs.
  • Reuse existing e-signature patterns to capture job-level authorization/delivery signatures for audit compliance.

Description

  • Add database migration database/migrations/055_job_evidence_and_signatures.sql which creates job_checkpoint_media, job_damage_reports, and job_signatures tables.
  • New backend models JobDamageReport and JobSignature and a service WorkorderJobEvidenceService implementing checkpoint uploads, damage report creation/listing, and signature capture with audit logging.
  • Enforce checkpoint evidence in job lifecycle by updating WorkorderRepository::updateJobStatus to call assertCheckpointEvidence and adding helpers that query checkpoint counts.
  • Expose new endpoints and wiring in routes/api.php and WorkorderController: checkpoint upload (POST /api/workorders/{id}/jobs/{jobId}/checkpoints/{checkpointType}), checkpoint status (GET /api/workorders/{id}/jobs/{jobId}/checkpoints), damage reports (POST/GET /api/workorders/{id}/jobs/{jobId}/damage-reports), and job signature capture (POST /api/workorders/{id}/jobs/{jobId}/signature).
  • Frontend: add src/react/views/driver/DriverJobIntake.jsx with VIN OCR (uses tesseract.js), a tap-to-mark damage diagram, and checkpoint upload UI, and register the view in src/react/router/index.jsx.
  • Frontend service updates in src/services/workorder.service.js to support checkpoint upload, checkpoint status, damage reports, and job signature calls, and add tesseract.js to package.json/package-lock.json.

Testing

  • Installed frontend OCR dependency with npm install tesseract.js --legacy-peer-deps which completed successfully.
  • Started the frontend dev server (npm run dev) and used a Playwright script to load /cp/driver/job-intake and capture a screenshot of the new view, which rendered successfully and produced artifacts/driver-job-intake.png.
  • No automated unit or integration test suites were executed as part of this change.
  • Database migration was added but not executed in CI here; apply database/migrations/055_job_evidence_and_signatures.sql when deploying or running migrations locally.

Codex Task

@proforcetech proforcetech merged commit 4613f86 into main Jan 4, 2026
0 of 2 checks passed
@proforcetech proforcetech deleted the codex/add-photo-checkpoints-to-job-lifecycle branch January 19, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant