Skip to content

Commit

Permalink
move phx-update ignore and format
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Dec 12, 2024
1 parent e53bc1c commit 9e7985c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 5 additions & 7 deletions lib/dotcom_web/components/trip_planner/input_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ defmodule DotcomWeb.Components.TripPlanner.InputForm do
phx-change="input_form_change"
phx-submit="input_form_submit"
>
<div :for={field <- [:from, :to]} class="mb-1" id="trip-planner-locations" phx-update="ignore">
<div :for={field <- [:from, :to]} class="mb-1" id="trip-planner-locations">
<.algolia_autocomplete
config_type="trip-planner"
placeholder="Enter a location"
id={"trip-planner-input-form--#{field}"}
phx-update="ignore"
>
<.inputs_for :let={location_f} field={f[field]} skip_hidden={true}>
<input
Expand All @@ -44,7 +45,7 @@ defmodule DotcomWeb.Components.TripPlanner.InputForm do
name={location_f[subfield].name}
/>
</.inputs_for>
<.error_container :for={{msg, _} <- f[field].errors} :if={used_input?(f[field])}>
<.error_container :for={{msg, _} <- f[field].errors}>
{msg}
</.error_container>
</.algolia_autocomplete>
Expand All @@ -60,10 +61,7 @@ defmodule DotcomWeb.Components.TripPlanner.InputForm do
class="mb-0"
phx-update="ignore"
/>
<.error_container
:for={{msg, _} <- f[:datetime_type].errors}
:if={used_input?(f[:datetime_type])}
>
<.error_container :for={{msg, _} <- f[:datetime_type].errors}}>
{msg}
</.error_container>
<.live_component
Expand All @@ -73,7 +71,7 @@ defmodule DotcomWeb.Components.TripPlanner.InputForm do
field={f[:datetime]}
id={:datepicker}
/>
<.error_container :for={{msg, _} <- f[:datetime].errors} :if={used_input?(f[:datetime])}>
<.error_container :for={{msg, _} <- f[:datetime].errors}}>
{msg}
</.error_container>
</div>
Expand Down
5 changes: 4 additions & 1 deletion lib/dotcom_web/components/trip_planner/results.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ defmodule DotcomWeb.Components.TripPlanner.Results do
</button>
</div>
<div :if={Enum.count(@results.itinerary_groups) > 0} class="w-full p-4 row-start-2 col-start-1">
<div :if={@results.itinerary_group_selection != nil} class="row-start-1 col-start-1 h-min w-full p-4">
<div
:if={@results.itinerary_group_selection != nil}
class="row-start-1 col-start-1 h-min w-full p-4"
>
<button type="button" phx-click="reset_itinerary_group" class="btn-link">
<span class="flex flex-row items-center">
<.icon class="fill-brand-primary h-4 mr-2" name="chevron-left" />
Expand Down

0 comments on commit 9e7985c

Please sign in to comment.