Skip to content

Coach groups UI + lesson group selection (group_ids)#60

Open
sahilkashyap64 wants to merge 9 commits into
mainfrom
codex/implement-coach-player-group-management-ui
Open

Coach groups UI + lesson group selection (group_ids)#60
sahilkashyap64 wants to merge 9 commits into
mainfrom
codex/implement-coach-player-group-management-ui

Conversation

@sahilkashyap64
Copy link
Copy Markdown
Collaborator

Motivation

  • Provide coaches with player-group management and let lesson creation reference groups so selected group players can be invited/expanded automatically.
  • Ensure private lessons resolve to exactly one player when groups are selected, and allow semi-private/group lessons to mix groups and manual players with deduping.

Description

  • Add service methods to the existing authenticated API client: getCoachPlayerGroups, getCoachPlayerGroupById, createCoachPlayerGroup, updateCoachPlayerGroup, and deleteCoachPlayerGroup in src/services/coach.js.
  • New modular UI components and section: GroupList, GroupForm, GroupPicker, groupUtils, and CoachGroupsSection (files under src/components/groups and src/components/dashboard/sections) plus a coachGroups typedef in src/types/coachGroups.js.
  • Wire app-level group state and CRUD handlers in src/App.jsx with user-friendly API error mapping, optimistic refresh, and expose groups* props to DashboardPage.
  • Integrate group selection into lesson creation by updating CreateLessonModal to include GroupPicker, adding groupIds to lesson drafts, sending group_ids in the schedule payload, deduping existing players, and validating private-lesson selection using utilities in src/utils/lessonGroupSelection.js.

Testing

  • Ran unit tests with npm test, including new tests src/utils/__tests__/lessonGroupSelection.test.js, and all tests passed (5/5).
  • Built production bundle with npm run build successfully.
  • Launched dev server and captured a quick UI screenshot to validate rendering in the running app (artifact saved during the run).

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for thunderous-muffin-603a62 ready!

Name Link
🔨 Latest commit 9fc9855
🔍 Latest deploy log https://app.netlify.com/projects/thunderous-muffin-603a62/deploys/69a0aace2644890008e18cfc
😎 Deploy Preview https://deploy-preview-60--thunderous-muffin-603a62.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 25, 2026

PR Preview Action v1.6.2

🚀 View preview at
https://CodeMyMobile.github.io/TTP_Coach_Web_Public/pr-preview/pr-60/

Built to branch gh-pages at 2026-02-26 20:19 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant