feat(slots): thread rescheduledBy param from URL through to tRPC input#28909
feat(slots): thread rescheduledBy param from URL through to tRPC input#28909bcornish1797 wants to merge 1 commit intocalcom:mainfrom
Conversation
Split of calcom#28636 (Part B of 3). Plumbing only — adds a new `rescheduledBy` search param that flows from the URL through `useScheduleForEvent` → `useSchedule` → the tRPC `getSchedule` input schema. Nothing consumes the field yet; it will be read by `_getGuestBusyTimesForReschedule` in Part C to gate guest busy-time blocking on host-initiated reschedules. Concretely: - `apps/web/modules/schedules/hooks/useEvent.ts`: reads `searchParams.get("rescheduledBy")` alongside the existing `rescheduleUid` read and forwards it to `useSchedule`. - `apps/web/modules/schedules/hooks/useSchedule.ts`: adds `rescheduledBy` to `UseScheduleWithCacheArgs` and passes it through to the tRPC query input. - `packages/trpc/server/routers/viewer/slots/types.ts`: adds `rescheduledBy: z.string().nullish()` to `getScheduleSchemaObject`. Backwards compatible — the field is nullish on both the URL and the schema, so older clients keep working unchanged.
|
Welcome to Cal.diy, @bcornish1797! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
📝 WalkthroughWalkthroughThis change adds support for a 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Bcornish seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
|
This PR has been closed due to inactivity. Please feel free to reopen it if you'd like to continue the work. |
Second of three PRs splitting #28636.
Threads a new rescheduledBy URL param through useScheduleForEvent, useSchedule, and the tRPC getSchedule input. Nothing consumes it yet; Part C (#28911) reads it to decide whether a reschedule is host-initiated. Small additive change, backwards compatible at both the URL and schema levels (nullish).