Repository navigation
feat(web): vote on availability from the web - #13
Merged
Merged
Conversation
Members can now answer from the availability grid: "Edit my availability"
turns their row (pinned first and marked "You") into toggles, and saving
calls PUT /api/polls/{id}/availability. It reuses SetAvailability, so the
rules match Discord: only roster members may vote, started dates are
locked, unselected dates become Unavailable, and confirmed dates move to
Needs attention when someone drops out. The Discord announcement updates
through the background refresher. Unknown occurrence IDs are now a 400
instead of a 500.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the first step in moving all interaction to the web, with Discord reduced to announcements. Members can now vote from the availability grid.
PUT /api/polls/{id}/availabilitywith{"available": [occurrenceIds]}. It reusesStore.SetAvailability, so the rules match Discord exactly:Bot.SubmitAvailability).ValidationError) instead of 500.v0.0.12.Verification
TestAvailabilityRejectsInvalidInput: rejects a bad poll ID, a zero occurrence ID, unknown fields and a missingavailablelist.TestSchedulingLifecyclenow asserts that a foreign occurrence ID returnsValidationError.a member edits and saves their availability on the web: your row is first, toggling Thursday off sends{"available":[101,103]}, and the toast and view mode come back. It runs on desktop and Pixel 7.go test ./...with PostgreSQL,go vet ./...,npm run check,npm run build,npm run format:check, and the full Playwright suite (15 passed).