Skip to content

Allow choosing violation type after election day ends - #137

Merged
hkdobrev merged 1 commit into
mainfrom
feature/video-violations
Apr 19, 2026
Merged

hkdobrev merged 1 commit into
mainfrom
feature/video-violations

Conversation

@hkdobrev

Copy link
Copy Markdown
Member

Summary

  • After election day end timestamp (8pm BG time), show radio buttons on the violation form to choose between "На място" (on-site) and "Видео наблюдение" (video)
  • URL param type=video still sets the default, but users can switch type after end timestamp
  • Uses a ref-based resolver so Yup schema dynamically validates based on selected type

Test plan

  • Before end timestamp: no radio buttons shown, form behaves as before
  • Before end timestamp with type=video in URL: video form, no radio buttons
  • After end timestamp: radio buttons appear, default is "На място"
  • After end timestamp with type=video in URL: radio buttons appear, default is "Видео наблюдение"
  • Switching type toggles description min length and photo upload visibility

🤖 Generated with Claude Code

After 8pm BG time, show radio buttons to pick between on-site and video
type on any violation form, not just when type=video is in the URL.
Uses a ref-based resolver to dynamically switch Yup schema validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hkdobrev
hkdobrev force-pushed the feature/video-violations branch from 799c9de to ddee0a6 Compare April 19, 2026 12:44
@hkdobrev
hkdobrev merged commit 0bbfbab into main Apr 19, 2026
1 check passed
@hkdobrev
hkdobrev deleted the feature/video-violations branch April 19, 2026 12:44
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.

1 participant