Преглед на файлове

Display only 2 available slots

theenglishway (time) преди 4 години
родител
ревизия
cbf8cee40b
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      lib/vaccins_web/live/location_component.ex

+ 3 - 3
lib/vaccins_web/live/location_component.ex

@@ -134,15 +134,15 @@ defmodule VaccinsWeb.LocationComponent do
        when is_list(after_slots),
        do:
          assigns
-         |> Map.put(:slots_after, after_slots |> Enum.take(5))
+         |> Map.put(:slots_after, after_slots |> Enum.take(2))
          |> Map.put(:slots_before, [])
 
   defp integrate_availabilities(assigns = %{availabilities: {:ok, before_slots, after_slots}})
        when is_list(before_slots),
        do:
          assigns
-         |> Map.put(:slots_after, after_slots |> Enum.take(5))
-         |> Map.put(:slots_before, before_slots |> Enum.take(5))
+         |> Map.put(:slots_after, after_slots |> Enum.take(2))
+         |> Map.put(:slots_before, before_slots |> Enum.take(2))
          |> Map.put(:last_early_slot_seen, DateTime.utc_now())
 
   defp integrate_availabilities(assigns), do: assigns