Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adds permission groups to invite #5173

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

tiagoapolo
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Task: #4002

Changes

  • Adds permission groups to user invite
  • implements useClickOutsideHook
  • Updated react-datepicker from version 6.2.0 to ^8.1.0
  • Enhanced the DateSelect component by converting it from JavaScript to TypeScript
  • Added permission_groups to the invite object in organisation-store.js.

How did you test this code?

  • Regression tests for inline modal and click outside interactions
  • Invite creation regression test and tested user inclusion into groups after account creation

@tiagoapolo tiagoapolo requested a review from a team as a code owner February 28, 2025 20:54
@tiagoapolo tiagoapolo requested review from kyle-ssg and removed request for a team February 28, 2025 20:54
@tiagoapolo tiagoapolo self-assigned this Feb 28, 2025
Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 9:07pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 9:07pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Feb 28, 2025 9:07pm

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard fix labels Feb 28, 2025
Copy link
Contributor

github-actions bot commented Feb 28, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-5173 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-5173 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-5173 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5173 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5173 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-5173 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Feb 28, 2025

Uffizzi Preview deployment-61459 was deleted.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds a new feature to include permission groups when inviting users, while also converting the InviteUsers component to TypeScript and updating related modules. Key changes include:

  • Converting the InviteUsers component from JavaScript to TypeScript with added support for permission groups.
  • Updating the organisation store to include the permission_groups property in the invite payload.
  • Modifying the GroupSelect component’s onAdd callback to incorporate an additional parameter (group name).

Reviewed Changes

File Description
frontend/web/components/modals/InviteUsers.tsx New TypeScript invite component with permission groups functionality and click outside hook usage.
frontend/common/stores/organisation-store.js Adds permission_groups to the invite payload.
frontend/web/components/GroupSelect.tsx Updates onAdd callback signature to pass the group name.
frontend/web/components/modals/InviteUsers.js Removal of legacy JavaScript invite component.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

frontend/web/components/modals/InviteUsers.tsx:107

  • The function closeModal is referenced but not defined or imported in the component; please ensure it is declared or imported to avoid runtime errors.
closeModal()
@tiagoapolo tiagoapolo merged commit 1e10632 into main Mar 5, 2025
33 checks passed
@tiagoapolo tiagoapolo deleted the fix/4002-permission-groups-invite branch March 5, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants