Build a Weekly Staff Shift Rota Builder in HTML
Create an interactive weekly shift rota in one HTML file that totals staff hours, flags overtime, and alerts you to daily coverage gaps.
Preview prompt
Act as a senior front-end developer building a practical operations tool. Build the Harborline Roasters Weekly Shift Rota, a single-page HTML application that lets managers assign shifts across a 7-day grid, automatically total weekly hours per person, and flag understaffed coverage gaps.
Include these specific features and rules:
1. Load with 6 realistic sample staff members and pre-filled shifts for Monday through Sunday, plus a Reset sample button that restores the default schedule in memory.
2. Let managers click any day cell to cycle through Off, Morning 8h, Mid 8h, and Evening 8h shifts, and allow adding or removing staff rows without using any form tags.
3. Calculate weekly hours per person automatically, flagging anyone over 40 hours, and display a daily coverage row that compares scheduled staff against an adjustable minimum daily target.
4. Show a top summary bar with total scheduled hours, active coverage gaps, and overtime count, plus a short How this is calculated note.
5. Use a clean, high-contrast slate and amber palette with responsive horizontal scrolling on narrow 360px screens and full keyboard accessibility.
6. Keep all state in memory with no external libraries, no localStorage, and no alert dialogs.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.