Skip to content

feat: include driver/conductor person_id in currentOperation#117

Open
Jayanth-Parthsarathy wants to merge 13 commits into
master-gimsfrom
feat/login-return-role
Open

feat: include driver/conductor person_id in currentOperation#117
Jayanth-Parthsarathy wants to merge 13 commits into
master-gimsfrom
feat/login-return-role

Conversation

@Jayanth-Parthsarathy

Copy link
Copy Markdown
Collaborator

Summary

  • Adds driver_person_id and conductor_person_id (both Option<i64>) to CurrentOperationResponse
  • Looks up emp_id from employees_internal for each non-empty token; null when the token is missing/empty or no matching row exists
  • Empty-string tokens (DB stores "" rather than NULL in places) are treated the same as missing

Test plan

  • POST /internal/fleet-operator/{gtfs_id}/currentOperation with driver_token returns driver_person_id, conductor_person_id: null
  • Same with conductor_token returns conductor_person_id, driver_person_id: null
  • Anchor by vehicle_number: both person ids populated if waybill has both tokens, null otherwise
  • Unknown token (no employee row) → person_id stays null, request still succeeds

🤖 Generated with Claude Code

@pranavs6
pranavs6 force-pushed the master-gims branch 2 times, most recently from dbe91fa to 00df999 Compare June 2, 2026 18:09
@pranavs6
pranavs6 force-pushed the master-gims branch 2 times, most recently from 5ec6967 to 63978da Compare July 6, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants