Commit graph

6 commits

Author SHA1 Message Date
Chris Parsons
8e422c6503 fix: Pass database instance to isParticipantDrafted in timer context
The timer system runs outside the request context and uses its own database
  connection. This fix allows isParticipantDrafted to accept an optional db
  parameter so it works in both request handlers and timer contexts.

  Fixes: DatabaseContext not set error during autopick
2025-10-28 23:40:29 -07:00
Chris Parsons
f0c289353e feat: Refactor database connection handling in draft-related functions for improved flexibility 2025-10-26 20:35:55 -07:00
Chris Parsons
918e9ff04a feat: Implement autodraft chain logic and timer initialization for next team picks 2025-10-25 22:11:10 -07:00
Chris Parsons
714ab0f484 feat: Refactor autopick logic to use unified executeAutoPick function and enhance eligibility checks 2025-10-25 10:14:36 -07:00
Chris Parsons
decb28dc19 Implement Omni League Draft Eligibility Rules
- Created draft eligibility calculation logic in `app/lib/draft-eligibility.ts`
- Added interfaces for sport availability and draft eligibility
- Implemented `calculateDraftEligibility` function to determine eligible sports based on team picks and global availability
- Developed `getEligibilitySummary` function for human-readable eligibility status
- Updated API endpoints to validate eligibility before making picks
- Enhanced frontend draft room UI to reflect eligibility status and provide visual indicators for ineligible participants
- Comprehensive implementation summary and testing documentation added
- All changes type-checked and unit tests passed successfully
2025-10-24 21:12:07 -07:00
Chris Parsons
469a85a0f8 feat: add draft pick, queue, and timer models with database schema updates 2025-10-16 00:32:48 -07:00