cal-itp/graas

Build web app front end for patrol mode

Closed this issue · 2 comments

In patrol mode, someone in the agency office will assign vehicles to trips, so that drivers don't need to. Update the web app so that when a patrol-mode-agency driver opens the GRaaS app, they will only be asked for vehicle ID (rather than trip name). And remember the vehicle ID for some minimum amount of time.

  1. In agency-config.json, add a field called patrol-mode, and set it to true for agencies that use the feature. The field can be false or absent for other agencies.
  2. In graas.js, ensure that the first step after QR auth is to check agency-config.json, and update the flow and configmatrix to no longer require trip-names be filled out, and hide the field. This can be handled very similarly to how driver-names is already handled.

Additional items:

  • Consider adding a patrol-mode flag to location updates
  • Consider creating cache logic that remembers the vehicle ID and auto-selects it (with an option to change) within a certain time window.

I like the patrol-mode flag to distinguish patrol updates from corrupt ones.

Unless I'm misunderstanding, the description sounds like drivers would still need to press start and stop for trips. That is basically the same amount of work as also assigning the trip ID. I would really like a see an approach where the driver (or dispatcher) interacts with the web app once a day, assuming normal operations.

They would need to press start, but after that it would just run all day, unless stopped.

Once it's stopped, I think we should give them an "out" in case the tablet does change vehicles, but we should make it very easy to just hit start again (ie by pre-selecting the vehicle number)