Add guest management functionality to existing bookings#10
Conversation
* feat: ability to add guests via app.cal.com/bookings * fix: some update * fix: minor issue * fix: final update * update * update * add requested changes * fix type error * small update * final update * fix type error * fix location * update calender event --------- Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
cursor review |
There was a problem hiding this comment.
Bugbot free trial expires on August 11, 2025
Learn more in the Cursor dashboard.
|
|
||
| const isTeamAdminOrOwner = | ||
| (await isTeamAdmin(user.id, booking.eventType?.teamId ?? 0)) && | ||
| (await isTeamOwner(user.id, booking.eventType?.teamId ?? 0)); |
There was a problem hiding this comment.
Bug: Permission Check Uses Incorrect Logical Operator
The isTeamAdminOrOwner permission check incorrectly uses the logical AND (&&) operator instead of OR (||). This requires a user to be both a team admin and a team owner to add guests, which is overly restrictive, as either role should grant permission.
| } else { | ||
| setIsInvalidEmail(true); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Bug: Email Validation Fails Due to Empty String Initialization
The validation logic is flawed because the multiEmailValue state is initialized with [""]. This causes the multiEmailValue.length === 0 check to be ineffective, allowing empty strings to be passed to the email validation schema. Consequently, validation fails when not all email fields are filled or when the input is effectively empty.
Locations (1)
|
This PR is being marked as stale due to inactivity. |
Test 10