mirror of
https://codeberg.org/JasterV/spazio-solazzo.git
synced 2026-04-27 02:25:40 +00:00
fix: sort time slots by start day when displaying them
This commit is contained in:
parent
72a1cbc662
commit
90a35607a9
1 changed files with 13 additions and 10 deletions
|
|
@ -134,6 +134,7 @@ defmodule SpazioSolazzoWeb.SpaceBookingLive do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp load_time_slots_with_stats(space, date, current_user) do
|
defp load_time_slots_with_stats(space, date, current_user) do
|
||||||
|
time_slots =
|
||||||
BookingSystem.get_space_time_slots_by_date!(space.id, date,
|
BookingSystem.get_space_time_slots_by_date!(space.id, date,
|
||||||
load: [
|
load: [
|
||||||
booking_stats: %{
|
booking_stats: %{
|
||||||
|
|
@ -144,5 +145,7 @@ defmodule SpazioSolazzoWeb.SpaceBookingLive do
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Enum.sort_by(time_slots, fn slot -> slot.start_time end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue