What does this PR do?
This PR updates the Team Event Type assignment flow to allow adding users who are not yet members of the team. When a non-member email is entered in the “Assignment” tab, the system now treats it as an invitation, adding them to the event type and sending the necessary invites.
Key Changes:
- Updates
CheckedTeamSelect component to allow creating new email entries for non-members.
- Adds an
(Invite) label next to new emails for better visual feedback.
- Updates the backend to handle invite creation for non-existing users seamlessly.
- Fixes a Prisma error by sanitizing the host object before creation.
- Adds E2E tests to verify assignment invites work as expected.
Fixes #13532
Fixes CAL-3076
/claim #13532
Visual Demo
Video: https://www.loom.com/share/30be5799bca441298264b35b3ccbe8a9
Mandatory Tasks
- I have self-reviewed the code.
- I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. (Or N/A)
- I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
- Create or navigate to an existing Team.
- Create or edit a Team Event Type.
- Go to the Assignment (or Hosts) tab.
- In the host selection input, type an email address that is not currently a member of the team (e.g.,
newuser@example.com).
- Select the email from the dropdown/creation option.
- Verify that the email appears in the list with an
(Invite) label.
- Save the Event Type.
- Verify that the user is invited to the team and assigned to the event type.
Checklist
- I have read the contributing guide
- My code follows the style guidelines of this project
- I have commented my code, particularly in hard-to-understand areas
- I have checked if my changes generate no new warnings