cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: ability to add people to team (and org) via round robin

Open Amit91848 opened this issue 1 year ago β€’ 38 comments

What does this PR do?

Fixes #14169 Fixes #13532

For normal users

https://github.com/calcom/cal.com/assets/74371312/999c1eb1-16a4-47cb-a8b7-a776d04fe91f

For orgs

https://github.com/calcom/cal.com/assets/74371312/53466bad-ad86-4de8-b2cf-f884293c7b26

Type of change

  • New feature (non-breaking change which adds functionality)

Mandatory Tasks

  • [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Amit91848 avatar Mar 22 '24 09:03 Amit91848

@Amit91848 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 22 '24 09:03 vercel[bot]

Thank you for following the naming conventions! πŸ™ Feel free to join our discord and post your PR link.

github-actions[bot] avatar Mar 22 '24 09:03 github-actions[bot]

Graphite Automations

"Add consumer team as reviewer" took an action on this PR β€’ (03/22/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR β€’ (03/22/24)

1 label was added to this PR based on Keith Williams's automation.

graphite-app[bot] avatar Mar 22 '24 09:03 graphite-app[bot]

πŸ“¦ Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. πŸ€–

This PR introduced no changes to the JavaScript bundle! πŸ™Œ

github-actions[bot] avatar Mar 22 '24 10:03 github-actions[bot]

hi @Amit91848 check out this LOOM should show the invited member in the dropdown

ibex088 avatar Mar 22 '24 16:03 ibex088

hi @Amit91848 check out this LOOM should show the invited member in the dropdown

Won't the users have to accept the invite first to be shown and assigned events?

Or else we can show all and disable the ones which have not yet accepted the invite?

Amit91848 avatar Mar 22 '24 16:03 Amit91848

i think showing invited members with a pending badge would make sense here, this would also prevent the member alredy invited error I encountered.

ibex088 avatar Mar 23 '24 01:03 ibex088

Will do

Amit91848 avatar Mar 23 '24 01:03 Amit91848

@SomayChauhan Fixed both, you can now see invited members and also cannot invite them again

https://github.com/calcom/cal.com/assets/74371312/acbb919a-dd35-4413-b376-16c81ea53a5e

Amit91848 avatar Mar 23 '24 07:03 Amit91848

Screenshot 2024-03-23 at 12 48 48β€―PM a pending badge like this will look better i think also i should be able to select the pending members. Screenshot 2024-03-23 at 12 51 05β€―PM should show the pending badge in the selected list as well for pending members.

ibex088 avatar Mar 23 '24 07:03 ibex088

additionally this would be Nice to have, adding comma seperated emails opens the bulk emails by default LOOM

ibex088 avatar Mar 23 '24 07:03 ibex088

Screenshot 2024-03-23 at 12 48 48β€―PM a pending badge like this will look better i think also i should be able to select the pending members.

I thought we couldn't select pending members, will change it.

Screenshot 2024-03-23 at 12 51 05β€―PM should show the pending badge in the selected list as well for pending members.

Will update to show pending badge in the list below. The dropdown is being rendered by react-select so will have to make changes there which would be challenging, will give it a try though.

additionally this would be Nice to have, adding comma seperated emails opens the bulk emails by default LOOM

Great idea, will make changes

Amit91848 avatar Mar 23 '24 07:03 Amit91848

Made changes @SomayChauhan

https://github.com/calcom/cal.com/assets/74371312/f930e00e-a228-4d8f-ac3c-1f8144f67e0e

Amit91848 avatar Mar 23 '24 12:03 Amit91848

Great job with the UI @Amit91848, Looking Awesome!!, However, Saving the event with pending members as host is throwing an error. We should allow to add members who are not yet accepted as hosts. But they shouldn't be able to be booked yet.

ibex088 avatar Mar 23 '24 12:03 ibex088

Great job with the UI @Amit91848, Looking Awesome!!, However, Saving the event with pending members as host is throwing an error. We should allow to add members who are not yet accepted as hosts. But they shouldn't be able to be booked yet.

Thanks. Fixed saving event. They shouldn't be booked as they don't have any availability yet.

Tests are failing because of the change in Option ig, will look into it

Amit91848 avatar Mar 23 '24 13:03 Amit91848

Looking Good!!, @Amit91848, Amazing work

ibex088 avatar Mar 26 '24 05:03 ibex088

@PeerRich should we consider this for collective events as well ?

ibex088 avatar Mar 26 '24 05:03 ibex088

@PeerRich should we consider this for collective events as well ?

Ideally, we should also be able to do this for collective team events.

joeauyeung avatar Apr 26 '24 14:04 joeauyeung

translation missing

can we remove spaces from the inputValue? The input field itself doesn't allow spaces. When testing I typed free@example, [email protected] which gave me the error 'Enter emails'

Fixed these

Tested and works πŸ‘πŸ» @SomayChauhan and @joeauyeung I agree we should also have that for collective events and fixed hosts, should we do it in a follow up or in this PR?

Won't need much changes, should I include it in this pr itself?

Also for fixed hosts, we are only showing accepted members, you cannot see the pending member after inviting them, should we show all members and disable the pending ones?

Amit91848 avatar Apr 27 '24 09:04 Amit91848

Won't need much changes, should I include it in this pr itself?

Would love to have in this PR itself, Thanks!!

ibex088 avatar Apr 29 '24 09:04 ibex088

Tested and works πŸ‘πŸ» @SomayChauhan and @joeauyeung I agree we should also have that for collective events and fixed hosts, should we do it in a follow up or in this PR?

This works too now

https://github.com/calcom/cal.com/assets/74371312/4c3d6bec-2ed8-4089-b180-fed52a29b6c4

Also for fixed hosts, we are only showing accepted members, you cannot see the pending member after inviting them, should we show all members and disable the pending ones?

Only this needs to be looked at ig.

Amit91848 avatar Apr 29 '24 11:04 Amit91848

awesome PR! asking the obvious here, but inviting people will also add them to the event-type immediately, right?

PeerRich avatar Apr 29 '24 13:04 PeerRich

/tip 100

PeerRich avatar Apr 29 '24 13:04 PeerRich

πŸŽ‰πŸŽˆ @Amit91848 has been awarded $100! 🎈🎊

algora-pbc[bot] avatar Apr 29 '24 13:04 algora-pbc[bot]

/tip 100

Thanks a lot!! 😍

Amit91848 avatar Apr 29 '24 13:04 Amit91848

awesome PR! asking the obvious here, but inviting people will also add them to the event-type immediately, right?

As of now the user only gets invited to the team, you will have to manually select the user from dropdown and save to update the event type.

Should I make change to add them to event type? Since you cannot have pending users as fixed hosts, user would be added to event type only if they are invited from round robin hosts.

Amit91848 avatar Apr 29 '24 13:04 Amit91848

They shouldn't be booked as they don't have any availability yet.

You can also invite existing users to a team, user that already have an availability. So we still need to fix that pending member can't be booked

CarinaWolli avatar Apr 29 '24 13:04 CarinaWolli

Should I make change to add them to event type? Since you cannot have pending users as fixed hosts, user would be added to event type only if they are invited from round robin hosts.

Why can't we have pending users as fixed hosts?

CarinaWolli avatar Apr 29 '24 13:04 CarinaWolli

Why can't we have pending users as fixed hosts?

https://github.com/calcom/cal.com/blob/93bb37702c8790e4b56b74a04e6bcd137ca9d807/apps/web/components/eventtype/EventTeamTab.tsx#L384-L388

https://github.com/calcom/cal.com/blob/93bb37702c8790e4b56b74a04e6bcd137ca9d807/apps/web/components/eventtype/EventTeamTab.tsx#L432-L436

Pending members are being filtered before being passed to Fixed Hosts so I assumed that was the case, is it not?

Amit91848 avatar Apr 29 '24 14:04 Amit91848

You can also invite existing users to a team, user that already have an availability. So we still need to fix that pending member can't be booked.

Yeah my bad, will look into it.

Amit91848 avatar Apr 29 '24 14:04 Amit91848