-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add handling for retrieve estimates on new shuttle creation #1059
Conversation
@@ -24,6 +25,7 @@ defmodule Arrow.Shuttles.RouteStop do | |||
field :stop_sequence, :integer | |||
field :time_to_next_stop, :decimal | |||
field :display_stop_id, :string, virtual: true | |||
field :display_stop, :map, virtual: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we really need both display_stop
and display_stop_id
but it reduces the changes required across other pieces of work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's useful to have both because, in the case of an Arrow stop, the display_stop_id
is the value from the stop_id
column, not the actual database primary key. We could definitely work around that with some helper function to get the display ID for a given display_stop
, but I'm not sure how that would play along with form rendering. Anyhow, long story short I think it's fine to keep it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's the minor thing about the type on display_stop
, but otherwise looks good to me! 👍
95d142b
to
3437f93
Compare
cca5c23
to
cac89f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…play_stop before db commit
cac89f1
to
3d0a0bf
Compare
Summary of changes
Asana Ticket: Follow up on "🏹 Implement "Create/Edit Shuttle Route Definition" - Time to Next Stop"
Part of this is similar to what the Map component does (Ecto.assoc_loaded? & calling
preload
) but if those values aren't set yet, then this uses a virtual fielddisplay_stop
mirroringdisplay_stop_id
. This isn't the most elegant solution, opening this as a draft for now.Reviewer Checklist