fix: add reassignedBy and reassign reason to both status (#17418)
* add reassignedBy and reassign reason to both status * fix w-full issue in dialog * fix types --------- Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
64551a506a
commit
e728ed74ce
8 files changed
+46
-15
No files matched your search
@@ -42,11 +42,13 @@ export const roundRobinManualReassignment = async ({
|
||||
newUserId,
|
||||
orgId,
|
||||
reassignReason,
|
||||
reassignedById,
|
||||
}: {
|
||||
bookingId: number;
|
||||
newUserId: number;
|
||||
orgId: number | null;
|
||||
reassignReason?: string;
|
||||
reassignedById: number;
|
||||
}) => {
|
||||
const roundRobinReassignLogger = logger.getSubLogger({
|
||||
prefix: ["roundRobinManualReassign", `${bookingId}`],
|
||||
@@ -164,6 +166,7 @@ export const roundRobinManualReassignment = async ({
|
||||
title: newBookingTitle,
|
||||
userPrimaryEmail: newUser.email,
|
||||
reassignReason,
|
||||
reassignById: reassignedById,
|
||||
},
|
||||
select: bookingSelect,
|
||||
});
|
||||
|
||||
@@ -64,6 +64,7 @@ export const buildBooking = (
|
||||
fromReschedule: null,
|
||||
recurringEventId: null,
|
||||
smsReminderNumber: null,
|
||||
reassignById: null,
|
||||
scheduledJobs: [],
|
||||
metadata: null,
|
||||
responses: null,
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Booking" ADD COLUMN "reassignById" INTEGER;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Booking" ADD CONSTRAINT "Booking_reassignById_fkey" FOREIGN KEY ("reassignById") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -343,6 +343,7 @@ model User {
|
||||
NotificationsSubscriptions NotificationsSubscriptions[]
|
||||
referralLinkId String?
|
||||
features UserFeatures[]
|
||||
reassignedBookings Booking[] @relation("reassignByUser")
|
||||
|
||||
@@unique([email])
|
||||
@@unique([email, username])
|
||||
@@ -608,6 +609,8 @@ model Booking {
|
||||
cancellationReason String?
|
||||
rejectionReason String?
|
||||
reassignReason String?
|
||||
reassignBy User? @relation("reassignByUser", fields: [reassignById], references: [id])
|
||||
reassignById Int?
|
||||
dynamicEventSlugRef String?
|
||||
dynamicGroupSlugRef String?
|
||||
rescheduled Boolean?
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ export const roundRobinManualReassignHandler = async ({ ctx, input }: RoundRobin
|
||||
newUserId: teamMemberId,
|
||||
orgId: ctx.user.organizationId,
|
||||
reassignReason,
|
||||
reassignedById: ctx.user.id,
|
||||
});
|
||||
|
||||
return { success: true };
|
||||
|
||||
@@ -64,7 +64,7 @@ export const ConfirmationContent = (props: PropsWithChildren<ConfirmationDialogC
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<div className="w-full">
|
||||
<DialogPrimitive.Title className="font-cal text-emphasis mt-2 text-xl">
|
||||
{title}
|
||||
</DialogPrimitive.Title>
|
||||
|
||||
Reference in new issue
Block a user