|
|
@@ -74,14 +74,17 @@ defmodule VaccinsWeb.LocationComponent do
|
|
|
|
|
|
defp integrate_availabilities(assigns = %{availabilities: {:ok, after_slots}})
|
|
|
when is_list(after_slots),
|
|
|
- do: assigns |> Map.put(:has_availabilities, true) |> Map.put(:slots_after, after_slots)
|
|
|
+ do:
|
|
|
+ assigns
|
|
|
+ |> Map.put(:has_availabilities, true)
|
|
|
+ |> Map.put(:slots_after, after_slots |> Enum.take(5))
|
|
|
|
|
|
defp integrate_availabilities(assigns = %{availabilities: {:ok, before_slots, after_slots}})
|
|
|
when is_list(before_slots),
|
|
|
do:
|
|
|
assigns
|
|
|
|> Map.put(:has_availabilities, true)
|
|
|
- |> Map.put(:slots_after, after_slots)
|
|
|
+ |> Map.put(:slots_after, after_slots |> Enum.take(5))
|
|
|
|> Map.put(:slots_before, before_slots)
|
|
|
|
|
|
defp integrate_availabilities(assigns), do: assigns
|