feat: Q&A submission deadline for events#231
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When a Q&A submission deadline is set on an event and has passed, all partner mutation routes (POST, PUT, DELETE) return HTTP 403 via a new verifyDeadlineNotPassed() helper in QandaRepositoryExposed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…enAPI Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ssage Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
QandaRepositoryExposed.create/update/delete(HTTP 403 oncenow > deadline, compared in UTC). Persisted onEventsTable.qanda_submission_deadline, exposed viaEventDisplay.qanda_config.submission_deadline. New registered schema migration adds the column to existing DBs.qanda_submission_deadlineoncreate_event; newqanda_configresponse schema (also closes a pre-existing gap whereqanda_configwas never typed in responses); front client regenerated.EventForm(datetime-local); partner Scanzee page shows an amber banner and disables every create/edit/delete control when the deadline has passed (parsed as UTC to match the server).Notes for reviewers
front/utils/api.tsshows a large but cosmetic diff: regenerating against the repo's current orval config reformatted the whole file from double to single quotes. The only real API-surface additions areQandaConfigSchema,qanda_config,submission_deadline, andqanda_submission_deadline(no endpoints/types removed — verified by symbol-set comparison). Squash if desired.created_at/submission_*); no per-event timezone was introduced. The message is hardcoded French to match the existing Scanzee/EventForm pages (no i18n machinery added).update()lacks aqandaEnabledguard (pre-existing); the front-wide date formatters parse naive server datetimes as local time while this feature parses as UTC (this feature is the more correct one).docs/superpowers/.Test plan
./gradlew checkgreen — contract tests cover: config PUT/GET deadline round-trip, disable→null clearing, and 403 on create/update/delete after the deadline.npm run lintclean.🤖 Generated with Claude Code