-
Notifications
You must be signed in to change notification settings - Fork 10k
feat: Add rerouting
to AssignmentReasonRecorder
#19252
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
Conversation
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (02/12/25)1 reviewer was added to this PR based on Keith Williams's automation. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
@@ -467,6 +469,7 @@ const NewRoutingManager = ({ | |||
// TODO: Long term, we should refactor handleNewBooking and use a different route specific for this purpose, | |||
createBookingMutation.mutate({ | |||
rescheduleUid: booking.uid, | |||
rescheduledBy: session?.data?.user?.email, |
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.
Need to track who is calling the reroute
isRerouting, | ||
reroutedByEmail, |
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.
We can reuse the logic that we use when recording the initial routing. That way we can see what attributes changed.
This PR is being marked as stale due to inactivity. |
@@ -469,6 +471,7 @@ const NewRoutingManager = ({ | |||
// TODO: Long term, we should refactor handleNewBooking and use a different route specific for this purpose, | |||
createBookingMutation.mutate({ | |||
rescheduleUid: booking.uid, | |||
rescheduledBy: session?.data?.user?.email ?? undefined, |
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.
Shouldn't we error early if session is nullish, because rerouting can't be done by a non-logged in user.
Doing this change make it feel like non-logged in user could do re-routing
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.
A non-logged in user would never see this dialog because we only show this for authed users who have access to make the reroute. The typing just makes this undefined.
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.
Yeah, but if he is never supposed to see this dialog, then I think we should make it explict and check for session the first thing in the component(after all the hooks) and early return.
Then we could just do session.data.user.email here. It avoids the entire component to keep executing in such a case.
packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.ts
Outdated
Show resolved
Hide resolved
packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.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.
Left some comments, overall looks good.
Also, CI is failing a lot of checks
✅ No security or compliance issues detected. Reviewed everything up to c63d274. Security Overview
Detected Code Changes
Reply to this PR with |
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.
@joeauyeung Some conflicts were there, I resolved them. Please take a look
Also, we weren't passing rescheduledBy when doing the Rerouting through new tab(with different timeslot option), have fixed that as well. Corresponding commit c63d274
I tested and LGTM !!
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.
LGTM!
What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?