dev → uat: GRO-2155 route optimization endpoints (carries GRO-2163) #176
Reference in New Issue
Block a user
Delete Branch "dev-to-uat-gro-2155"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
dev → uat: GRO-2155 Route Optimization endpoints (carries GRO-2163)
Promotes
dev→uatfor QA validation.Primary change — GRO-2155 Route Optimization: Route CRUD + optimization endpoint (Phase 2.1)
GET /api/routes/daily?staffId=&date=— fetch/create draft daily route + enriched stops.POST /api/routes/optimize— Google DirectionsoptimizeWaypoints:truewhen a Maps key is configured, else offline nearest-neighbor TSP fallback (UAT has no key → heuristic). >25-stop chunking with warning. PersistsstopOrder,travelMinsFromPrev,travelDistanceKmFromPrev, routetotalTravelMins/totalDistanceKm/optimizedAt.Also carried
drizzle-kit migrate(already merged to dev).Verification
UAT Playbook
Phase 2 handoff to QA (Lint Roller).
QA review passed.
CI: Lint ✓, Tests ✓, Docker build ✓ — all green on head
d0c0b1b.Code review (TC-API-16.1…16.11):
GET /api/routes/daily: draft auto-created, idempotent re-fetch, correct staffId/date binding.POST /api/routes/optimize: transaction-based stop replace; re-optimize is clean with no duplicate stops.requireRole("manager","groomer")at middleware blocks receptionists (TC-API-16.9);resolveTargetStaffIdreturns 403 for cross-groomer access (TC-API-16.8) and 400 for missing manager staffId (TC-API-16.10).skipped[]+warnings[](TC-API-16.4).travelMinsFromPrev: null(TC-API-16.5).Approved for dev→uat merge.