Skip to content

Commit

Permalink
wip: stops section of shuttle form
Browse files Browse the repository at this point in the history
  • Loading branch information
lemald committed Nov 7, 2024
1 parent c07583b commit ccbeb53
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/arrow_web/live/shuttle_live/shuttle_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ defmodule ArrowWeb.ShuttleViewLive do
</div>
</div>
</.inputs_for>
<h2>define stops</h2>
<.inputs_for :let={f_route} field={f[:routes]} as={:routes_with_stops}>
<h4>direction <%= input_value(f_route, :direction_id) %></h4>
<.inputs_for :let={f_route_stop} field={f_route[:route_stops]}>
<.input field={f_route_stop[:time_to_next_stop]} type="number" label="Time to next stop" />
<input
value={input_value(f_route_stop, :stop_sequence)}
type="hidden"
name={input_name(f_route_stop, :stop_sequence)}
/>
</.inputs_for>
</.inputs_for>
<:actions>
<.button>Save Shuttle</.button>
</:actions>
Expand Down

0 comments on commit ccbeb53

Please sign in to comment.