Problem statement
A schedule view whose per-day groups miss any day with no bookings and drop bookings that don't sit on a hand-listed day. A grouping function must take an in-memory bookings array and a chronological list of day keys and produce one entry per requested day — with each day's bookings sorted by start time and counted — using Vanilla TypeScript.
Demo
The page, styles, mock data, panel markup, and DOM rendering are already scaffolded and wired. Only the groupBookingsByDay function in src/js/bookings.ts is missing — implement it so every test passes. Do not edit any other file.
What to implement
- Produce one entry per requested day, in the same chronological order the days were supplied.
- Put each booking under the day whose key matches the day part of the booking's start time.
- Order each day's bookings from the earliest start time to the latest.
- Include every day in the requested range even when it has no bookings, keeping its list empty and its count at zero.
- Give each day a count that matches the number of bookings shown for that day.
- Drop any booking whose day is not part of the requested range.
- Leave the bookings you were given and the requested days you were given unchanged.
- Everything shown must come from the bookings and days you were given — nothing should be hardcoded.
