icefoganalytics / travel-authorization

0 stars 0 forks source link

Stops to have an arrival and departure location #14

Open dpdavids opened 9 months ago

dpdavids commented 9 months ago

On the https://travel-auth-dev.ynet.gov.yk.ca/my-travel-requests/create in the 2 Tell us about the Travel

A stop must have a departure (from) location and an arrival (to) location. Currently the app only has one.

If we can perhaps add the final destination question at the top of the region. Then we can automate the creation of the stops. I think in 90% of the cases it will be a there and back. So we can automate the inclusion of two stops. eg. if the final destination is Vancouver. the system would automate Stop 1: whitehorse to vancouver, Stop 2: Vancouver to whitehorse. I think we can get rid of the multiple destinations and one way trip questions and then they can just add another stop or delete a stop.

klondikemarlen commented 9 months ago

This seems like a data modeling problem, currently it is being solved by having stops as an ordered array, and using stop 1 as the departure and stop 2 as the arrival.

An alternate approach is to have a "trip segment" with a start location and end location; think line geometry, a line has a start point and end point. This might simplify some code and make future development easier, but changing the data model is hard to do with breaking a lot of stuff.

This might be solved by the UI implementation in https://github.com/icefoganalytics/travel-authorization/pull/12 So let's revisit this ticket after that gets reviewed.