-
Notifications
You must be signed in to change notification settings - Fork 10.2k
feat: ✨ lock member default availability #22136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: ✨ lock member default availability #22136
Conversation
@shaun-ak is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (06/30/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (06/30/25)1 label was added to this PR based on Keith Williams's automation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic found 3 issues across 13 files. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
packages/trpc/server/routers/viewer/availability/schedule/create.handler.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey can you please address the issues suggested by the cubic
hey @Devanshusharma2005 , I have addressed the review comments by cubic. Also added a video for reference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic reviewed 13 files and found no issues. Review PR in cubic.dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay . Lets wait for @anikdhabal review too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment. Need clarification from the team. The rest of the code looks good to me.
packages/trpc/server/routers/viewer/availability/schedule/create.handler.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a team inside an org, when a team admin/owner tries to update their own default availability, no error is shown. Default Availability does not update but on the frontend no error is shown.
@shaun-ak you can check the docs here: https://cal.com/docs/self-hosting/license-key |
Hey @kart1ka , I am trying to use the key from docs but getting "Invalid License Key" error. |
Thanks for the detailed feedback, @CarinaWolli. Let me know if there's anything else you'd like to tweak! Here's a video recording of the changes -- https://cap.link/kmthe6t070472r7 |
When profile timezone is updated, the default timezone is also updated when locked default availability is on. Pls make sure the changes work for both profile timezone update and the travel schedule update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment
Default.availability.1.mp4Hey @kart1ka , for me the scenario is working fine, was there any specific testing path that you followed? Attached a video of my local testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working fine. Can you please add some tests to verify the logic works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @shaun-ak, everything works great. One more thing: we just decided to make this feature available only for organizations. It’s still a team-wide setting, but we want to offer it only for teams within an organization. Could you add that as well? 🙏
Sure @CarinaWolli , will make it work for only organizations. |
What does this PR do?
Video Demo (if applicable):
Screen.Recording.2025-07-01.at.8.57.37.AM.mp4
Mandatory Tasks (DO NOT REMOVE)
Summary by cubic
Added a team setting to lock default availability, preventing team members from editing their default availability schedule unless they are an admin or owner.