Extract rota display into reusable partials#214
Conversation
Two regressions from the rota partial extraction (PR #214): - _BuildStrikeRotaTable: restore the "all slots signed up but some still understaffed" info alert that was dropped when extracting from Views/Shifts/Index.cshtml. - _BuildStrikeRotaTable: restore the hidden filter inputs (departmentId, fromDate, toDate, period, tags[]) on the range signup form so SignUpRange redirects preserve filter state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review — 2026-04-13Spec: closes #198. The issue author paused the ShiftAdmin half of the refactor on 2026-03-25 (view slated for replacement in Vol→Camps transition), so only extracting from Findings (verified against base fd4a66c):
Fix commit: b536c5e. Bottom line: Refactor is structurally correct and ShiftAdmin is correctly left alone per issue author. With b536c5e the two functional regressions are restored. Ready to merge after QA spot-check of the Review by Claude Code `/pr-review` |
Extracts inline rota rendering from Views/Shifts/Index.cshtml into three shared partials with typed view models: - _RotaHeader: rota name, preference star, priority/period/visibility badges, tags, description, practical info. - _BuildStrikeRotaTable: all-day shift table with collapsible date ranges, range signup form (preserving filter state), SlotsFull info alert. - _EventRotaTable: timed shift table with per-shift signup form (preserving filter state), phase badges, signup lists. Reduces volunteer browse view rota loop from ~350 lines to ~30 lines of partial dispatch. All Localizer calls, filter hidden inputs on both signup forms, and the SlotsFull alert are preserved from the pre-refactor view. Closes #198 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b536c5e to
4206676
Compare
Rebased onto main — 2026-04-13The PR branch was cut from Rebased to
Build: `dotnet build Humans.Web` → 0 warnings, 0 errors. History: force-pushed (`b536c5e` → `4206676`). The branch is now 1 commit ahead of `main`. My previous fix commit (b536c5e) and the original refactor commit (1e18ec1) were squashed into a single clean commit on top of main since there was no sensible way to replay them through the i18n additions. Ready to merge pending QA spot-check of `/Shifts`. Review by Claude Code `/pr-review` |
NuGet published five advisories against 14.11.1 earlier today (GHSA-26qp-ffjh-2x4v, GHSA-cr67-pvmx-2pp2, GHSA-fwvm-ggf6-2p4x, GHSA-v67w-737x-v2c9, GHSA-x9h5-r9v2-vcww — ImageMagick stack overflow in DestroyXMLTree() and related). TreatWarningsAsErrors promotes NU1902 /NU1903 to build-breaking errors, so restore was failing on main. 14.12.0 is the advertised fix for all five. Also update the About page NuGet list per the post-update maintenance rule if present. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Views/Shifts/Index.cshtmlinto three shared partials:_RotaHeader.cshtml(name, badges, tags, description),_BuildStrikeRotaTable.cshtml(all-day shift table with collapsible date ranges and range signup), and_EventRotaTable.cshtml(timed shift table with individual signup)RotaHeaderViewModel,BuildStrikeRotaTableViewModel,EventRotaTableViewModel) for clean partial contractsIssues
Test plan
/Shifts— verify rota headers display correctly (name, priority badges, period badges, tags, visibility, description, practical info)