Commit graph

302 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
ad16f9d046 feat: Add comprehensive scoring system database schema
- Add scoringPattern and eventType enums for 4 scoring patterns
    (single_elimination_playoff, page_playoff, season_standings, qualifying_points)
  - Add 8 placement point fields to seasons table (1st-8th) with defaults
  - Add scoring pattern fields to sportsSeasons table (scoringPattern, totalMajors, etc.)
  - Create 10 new tables:
    - scoring_events: Individual games, tournaments, races
    - event_results: Participant results per event
    - playoff_matches: Bracket tracking for playoffs
    - participant_qualifying_totals: QP aggregation for golf/tennis
    - qualifying_point_config: Configurable QP values per sport
    - team_sport_scores: Aggregated scores per sport
    - team_standings: Current standings with tiebreakers
    - team_standings_snapshots: Daily snapshots for 7-day tracking
    - participant_expected_values: EV calculations per league
    - participant_season_results: F1 current points tracking
  - Add all necessary relations for new tables
  - Update test fixtures with new required scoring fields
2025-10-28 23:40:11 -07:00
Chris Parsons
1a1af87d3c feat: Implement comprehensive scoring system with multiple patterns and configurations 2025-10-28 23:18:17 -07:00
Chris Parsons
be8cabeac7 feat: Prevent simultaneous updates in AutodraftSettings and disable controls during updates 2025-10-26 22:09:22 -07:00
Chris Parsons
609c4e7b2c feat: Add hide ineligible participants functionality in AvailableParticipantsSection 2025-10-26 21:09:30 -07:00
Chris Parsons
5b10548f13 feat: Add ConnectionOverlay component for improved socket connection handling and user feedback 2025-10-26 21:01:12 -07:00
Chris Parsons
88b44b4616 feat: Simplify disabled state logic for autodraft settings controls 2025-10-26 20:52:11 -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
1825c0e271 feat: Enhance AvailableParticipantsSection with icon buttons for queue actions and simplify draft button visibility logic 2025-10-25 21:35:44 -07:00
Chris Parsons
98b84095fd feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
Chris Parsons
c9d3ee73cd feat: Update DraftSidebar to include recent picks section and refactor layout; enhance AvailableParticipantsSection and QueueSection styling 2025-10-25 18:25:26 -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
32980428f2 feat: Integrate accordion component for sidebar and update autodraft settings to sync with props 2025-10-25 10:04:21 -07:00
Chris Parsons
2cd4096e70 feat: Implement draft room redesign with collapsible sidebar and tabbed content
- Added AvailableParticipantsSection for participant search and filtering.
- Created DraftGridSection for displaying the draft grid with team timers and context menu.
- Developed QueueSection for managing participant queue and autodraft settings.
- Introduced RecentPicksSection to show recent draft picks.
- Implemented TeamsDraftedGrid to visualize drafted participants by team and sport.
- Added collapsible UI components for better layout management.
- Established tabbed navigation for draft board, recent picks, and teams drafted.
- Enhanced responsiveness for mobile and desktop views.
- Updated styles for a cohesive design across components.
2025-10-25 03:23:41 -07:00
Chris Parsons
190dfb92ca feat: add socket event for participant removal from queues 2025-10-24 21:46:55 -07:00
Chris Parsons
e7baea319e feat: enhance draft reset functionality to include deletion of draft timers 2025-10-24 21:41:30 -07:00
Chris Parsons
4aafd5853b feat: add connected teams tracking and emit list on connection 2025-10-24 21:31:57 -07:00
Chris Parsons
50a94d62af fix: correct cell content styling order in DraftGrid component 2025-10-24 21:25:02 -07:00
Chris Parsons
74aea1677b refactor: update import paths to use absolute paths for better clarity and maintainability 2025-10-24 21:20:19 -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
f3050908e8 chore: add shadcn package to dependencies 2025-10-23 16:56:46 -07:00
Chris Parsons
ff97e25438 feat: add autodraft status and team connection indicators to draft grid 2025-10-21 23:22:17 -07:00
Chris Parsons
86ae5014ec feat: add admin draft reset functionality with queue and pick deletion 2025-10-21 22:34:26 -07:00
Chris Parsons
4ce71d05d2 feat: prevent users from owning multiple teams in same league 2025-10-21 22:27:14 -07:00
Chris Parsons
ee125565dd feat: add team ownership management UI with admin controls 2025-10-21 22:15:15 -07:00
Chris Parsons
92be03575e feat: add draft order status and teams filled count to league overview 2025-10-21 21:36:42 -07:00
Chris Parsons
fdc94b16ac ci: reorganize workflow dependencies and remove standalone test workflow 2025-10-21 12:57:03 -07:00
Chris Parsons
8046f8b324 docs: add E2E testing setup plan with Cypress authentication and test database configuration 2025-10-21 12:49:17 -07:00
Chris Parsons
0d4ce1d339 ci: add test job to GitHub workflow and setup testing dependencies 2025-10-21 12:47:11 -07:00
Chris Parsons
cf90bf52ec feat: add draft board link visibility for all season statuses 2025-10-20 15:53:38 -07:00
Chris Parsons
6c5c9f709b feat: add public draft board and simplify draft speed settings 2025-10-20 15:03:11 -07:00
Chris Parsons
f86dfade38 feat: add draft completion banner and event handler for draft completion state 2025-10-18 23:33:13 -07:00
Chris Parsons
01b9e23eaf refactor: remove unused timeRemaining state and currentUserId prop in draft room 2025-10-18 23:23:29 -07:00
Chris Parsons
06db7fde7a feat: add draft pause/resume functionality with UI controls and socket events 2025-10-18 23:19:41 -07:00
Chris Parsons
a7f5df923f feat: add draft increment time and show team-specific timers in draft UI 2025-10-18 23:13:04 -07:00
Chris Parsons
fa5fb6d06e refactor: reorganize Docker file structure and import types separately in server.ts 2025-10-18 22:20:06 -07:00
Chris Parsons
2bad3dd75e refactor: migrate server code from JavaScript to TypeScript with build pipeline 2025-10-18 22:16:04 -07:00
Chris Parsons
9d41508fd0 feat: add draft API routes and implement draft room pick controls 2025-10-18 14:55:26 -07:00
Chris Parsons
1ad14bfef1 feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
Chris Parsons
83e40bd59f feat: add search, filtering and EV sorting to draft participant list 2025-10-17 16:58:35 -07:00
Chris Parsons
d0ae694283 feat: add tooltip showing overall pick number in draft grid 2025-10-17 15:41:59 -07:00
Chris Parsons
d440a70ef2 feat: implement snake draft grid visualization with real-time pick tracking 2025-10-17 12:51:47 -07:00
Chris Parsons
269499d584 feat: add draft room authentication and UI improvements with exit button 2025-10-17 12:45:30 -07:00
Chris Parsons
137c4eb0fd feat: add draft room route and entry button from league home page 2025-10-17 12:30:58 -07:00
Chris Parsons
e2b06be6b6 feat: add socket test route and echo event handler for debugging 2025-10-17 12:15:07 -07:00
Chris Parsons
12fdc6943c chore: add socket.io and socket.io-client dependencies 2025-10-17 11:13:37 -07:00
Chris Parsons
b09c55f22c fix: update Docker file paths and simplify production start script 2025-10-17 11:04:16 -07:00
Chris Parsons
b9dc2eb870 chore: exclude JS files from TypeScript compilation in vite config 2025-10-16 18:32:59 -07:00
Chris Parsons
0c685f8522 chore: exclude JS files and update TypeScript source paths in tsconfig.node.json 2025-10-16 18:18:51 -07:00