fix: sort time slots by start day when displaying them

This commit is contained in:
JasterV 2026-02-09 20:22:04 +01:00
parent 72a1cbc662
commit 90a35607a9

View file

@ -134,6 +134,7 @@ defmodule SpazioSolazzoWeb.SpaceBookingLive do
end
defp load_time_slots_with_stats(space, date, current_user) do
time_slots =
BookingSystem.get_space_time_slots_by_date!(space.id, date,
load: [
booking_stats: %{
@ -144,5 +145,7 @@ defmodule SpazioSolazzoWeb.SpaceBookingLive do
}
]
)
Enum.sort_by(time_slots, fn slot -> slot.start_time end)
end
end