Skip to content

Build the hours editor (W7-03) #156 - #172

Merged
calebyhan merged 1 commit into
mainfrom
156/hours-editor
Nov 30, 2026
Merged

calebyhan merged 1 commit into
mainfrom
156/hours-editor

Conversation

@BrianRyu04

Copy link
Copy Markdown
Contributor

Motivation
Open hours drive the status banner, the after-hours auto-reply, and the Hours list on the public site (TDD 4.6.5). The admin API is done (#94), but /portal/admin/hours is a placeholder, so changing hours still needs a developer.

Changes:

  • Added HoursManager on /portal/admin/hours.
  • Weekly schedule: add and remove windows per weekday, then save the whole week in one PUT. The backend's overlap error shows inline. Times are labelled with the line's timezone and never converted through the browser.
  • Date exceptions: create, edit, and delete (with confirmation), with closed-all-day or custom hours and an optional note (200 chars max). An open exception without times can't be submitted.
  • Preview: reuses HoursList with the unsaved edits, so coordinators see what the public site will show.
  • Tests cover saving every window, the inline overlap error, blocking an open exception without times, and the delete confirmation.

Known limitation: GET /api/admin/hours only returns exceptions from today onward, so the collapsed "Past exceptions" section will always be empty. Fixing it needs a small backend change, which I'd leave to a follow-up issue.

Closes #156

@github-actions

Copy link
Copy Markdown

Backend Test Results

713 tests  ±0   713 ✅ ±0   18s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 455e4cc. ± Comparison against base commit f435caa.

@calebyhan calebyhan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calebyhan
calebyhan merged commit 51a508a into main Nov 30, 2026
4 checks passed
@calebyhan
calebyhan deleted the 156/hours-editor branch November 30, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the hours editor (W7-03)

2 participants