Add admin-editable registration info to barrio signup page#216
Add admin-editable registration info to barrio signup page#216peterdrier merged 4 commits intomainfrom
Conversation
…ns, and resources Closes nobodies-collective#464 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a RegistrationInfo markdown field to CityPlanningSettings that admins can edit from the Barrio Admin page. When non-empty, the content renders as an info card at the top of /Barrios/Register, above the registration form. Uses the shared SanitizedMarkdown helper for safe rendering. Closes nobodies-collective#464 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12a2ce5d16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var cityPlanningSettings = await _cityPlanningService.GetSettingsAsync(); | ||
| ViewData["RegistrationInfo"] = cityPlanningSettings.RegistrationInfo; |
There was a problem hiding this comment.
Load registration info for the active registration year
This reads registration info from CityPlanningService.GetSettingsAsync(), which is keyed to CampSettings.PublicYear, but camp registration itself targets the highest open season year (OpenSeasons.OrderByDescending(...).FirstOrDefault()). Because opening a season and changing PublicYear are separate admin actions, a common transition state (next season open while public year is still old) will show/edit the wrong year's registration info on /Barrios/Register, leading to stale or missing instructions for registrants.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in dc93323. Added ICityPlanningService.GetRegistrationInfoAsync and a private GetOrCreateRegistrationSettingsAsync helper that keys the row to max(OpenSeasons) ?? PublicYear — the same year CampController.PopulateRegisterSeasonYearAsync uses for the registration form. Both the read path (CampController/CampAdminController) and the write path (UpdateRegistrationInfoAsync) now use this helper, so during the next-season-open / old-PublicYear transition window admins edit and registrants see the same row.
Resolves the CampAdminController conflict from PR #219 (service ownership phase 2): drop the direct HumansDbContext dependency in favor of ICityPlanningService, keeping the new registration-info editor wired through the service layer. Codex P2: registration info was keyed to CityPlanningSettings.PublicYear but /Barrios/Register targets the highest open season year, so during season transitions admins would edit/view the wrong year's row. Add GetRegistrationInfoAsync and key both read and write to max(OpenSeasons) (falling back to PublicYear) so the info shown matches the year the register page targets. Renumber the migration to 20260413131100 so it sorts after two newer migrations that landed on main during the merge, and refresh its designer snapshot to reflect the full merged model. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The accordion ("What Your Barrio Gets", "Your Obligations", "Useful
Resources") was fabricated content — benefits, obligations, and resource
details were invented without any source. The real design is that this
information is admin-editable markdown set via /Barrios/Admin and rendered
through the RegistrationInfo ViewData card at the top of the page.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
RegistrationInfomarkdown field toCityPlanningSettingswith EF migration/Barrios/Admin) to edit the registration info content/Barrios/Registerwhen non-emptyIssues
Test plan
/Barrios/Adminand verify the "Registration Info" textarea is visible/Barrios/Registerand verify the info card appears above the form with rendered markdown🤖 Generated with Claude Code