cal.com
cal.com copied to clipboard
feat: Implement global booking limits for users
What does this PR do?
Fixes #8985
https://www.loom.com/share/c99fb2713137476fb987dcd76236704a?sid=101bbea4-6f4b-4a83-82f7-5fc2bd308a1b
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.
@asadath1395 is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Thank you for following the naming conventions! đ Feel free to join our discord and post your PR link.
Graphite Automations
"Add consumer team as reviewer" took an action on this PR ⢠(03/28/24)
1 reviewer was added to this PR based on Keith Williams's automation.
"Add community label" took an action on this PR ⢠(03/28/24)
1 label was added to this PR based on Keith Williams's automation.
"Add foundation team as reviewer" took an action on this PR ⢠(04/16/24)
1 reviewer was added to this PR based on Keith Williams's automation.
đŚ Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. đ¤
New Page Added
The following page was added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (350Â KB) |
|---|---|---|---|
/settings/my-account/bookings |
311.71Â KB |
540.14Â KB | 154.33% |
@ciaranha Shouldn't global booking limits limit the number of bookings of your whole cal.com account considering all event types?
For example:
- Global booking limit: 1 per day
- Event type 1 gets booked for tomorrow
- Now tomorrow is blocked for all event types
If that's the case then I think we also don't need the Review part here:
You could still want an event type specific booking limit. For example:
- Global limit: 10 bookings per week
- Event type limit: Only allow 1 booking of this event type per day
@ciaranha Shouldn't global booking limits limit the number of bookings of your whole cal.com account considering all event types?
đ Yes.
For example:
Global booking limit: 1 per day Event type 1 gets booked for tomorrow Now tomorrow is blocked for all event types
đ Exactly
You could still want an event type-specific booking limit. For example:
- Global limit: 10 bookings per week
- Event type limit: Only allow 1 booking of this event type per day
đ Exactly
If that's the case then I think we also don't need the Review part here:
đ Yes
Copy suggestions for clarification:
@asadath1395 I am putting this in draft as this needs some adjustments đ
The syncing thing threw me offguard. @ciaranha How should the global future booking limit work?
The syncing thing threw me offguard. @ciaranha How should the global future booking limit work?
I think the above comment explains it pretty well but let me know if you still have questions đ
@asadath1395 are you referring to the Global settings for "Limit future booking" & "Buffers" from here?
If so, you can ignore those and just implement the "Limit booking frequency" here. I don't think there's anything else to cover from a design perspective. Let me know if this clears things up for you.
@asadath1395 are you referring to the Global settings for "Limit future booking" & "Buffers" from here?
If so, you can ignore those and just implement the "Limit booking frequency" here. I don't think there's anything else to cover from a design perspective. Let me know if this clears things up for you.
Yup i was referring to that, cool will go ahead and tweak the existing "Limit booking frequency" to match as discussed above. On a side note, if and when Global settings for "Limit future booking" & "Buffers" are ready, i would love to work on it, please feel free to assign it to me. Thanks
@asadath1395 great thank you đ from a design point of view, the others are ready. I will however just create separate issues for them and get a review from other team members to ensure we want to add these to the product and there are no unforeseen downsides or anything overlooked.
@asadath1395 make sure to mark PR as 'ready for review' when you are done đ
This PR is being marked as stale due to inactivity.
This PR is being marked as stale due to inactivity.
This PR is being closed due to a lack of activity. Please reopen if work is to continue.
@CarinaWolli Since you are working on global booking limits for teams https://github.com/calcom/cal.com/issues/16557, 2nd point here https://github.com/calcom/cal.com/pull/14243#pullrequestreview-2025439062 is not applicable for this PR, right?
@keithwillcode Could you please re-open this PR? I would like to continue the work here
@CarinaWolli Since you are working on global booking limits for teams #16557, 2nd point here #14243 (review) is not applicable for this PR, right?
Yes you are right, we changed that. We only want to count the user's bookings including bookings from managed event types, but not bookings from other team event types (collective, round-robin)