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

fix: Add check for first slot only restriction in booking API

Open Souptik2001 opened this issue 1 year ago • 9 comments

What does this PR do?

  • Fixes #16030
  • Fixes CAL-4098

https://www.loom.com/share/70ff42c56724446d9172ac33aa71bf1d?sid=79d948db-6128-4576-9c9e-00881e59f56f

Mandatory Tasks (DO NOT REMOVE)

  • [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • [ ] I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Please refer the video above 👆

Souptik2001 avatar Aug 02 '24 10:08 Souptik2001

@Souptik2001 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 Aug 02 '24 10:08 vercel[bot]

Graphite Automations

"Add community label" took an action on this PR • (08/02/24)

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

"Add consumer team as reviewer" took an action on this PR • (08/02/24)

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

"Add foundation team as reviewer" took an action on this PR • (10/09/24)

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

graphite-app[bot] avatar Aug 02 '24 10:08 graphite-app[bot]

I have added quite a few inline comments for better understanding as the logic is a little complex over here. But as pointed out in another PR, if not required let me know I can remove it.

Souptik2001 avatar Aug 02 '24 10:08 Souptik2001

Thanks @anikdhabal . Removed the inline comments you mentioned.

P.S - there are others that I didn't remove, as you didn't mention those.

Souptik2001 avatar Aug 02 '24 11:08 Souptik2001

Need a final review from @CarinaWolli before approving

anikdhabal avatar Aug 02 '24 12:08 anikdhabal

suggestion: in the best scenario, even if someone tries to edit the URL and tries to enter a different time slot that is not meant to be booked, the page should not render at all. Instead, it should persist with the original time slot.

nishchal27 avatar Aug 22 '24 02:08 nishchal27

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Sep 11 '24 00:09 github-actions[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Sep 30 '24 00:09 github-actions[bot]

@anikdhabal Can you please check my intuition here that since we already have this functionality in the web app, there shouldn't need to be this amount of logical changes in the core getUserAvailability call. Instead, the API should just be able to supply whatever params/data needed such that it makes use of the core logic.

keithwillcode avatar Dec 11 '24 16:12 keithwillcode

Moving back to draft since there are conflicts to fix.

keithwillcode avatar Jan 08 '25 16:01 keithwillcode

The pr is still incomplete and need to address few things more. Closing it for now

anikdhabal avatar Feb 07 '25 13:02 anikdhabal