Skip to content
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

feat: add reassign reason + rename insights #17720

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to /bookings > /routing

File renamed without changes.
2 changes: 2 additions & 0 deletions apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2772,6 +2772,7 @@
"booking_created_date": "Booking created date",
"booking_reassigned_to_host": "Booking reassigned to {{host}}",
"no_contact_owner": "No contact owner",
"summary": "Summary",
"routing_forms_created": "Routing Forms Created",
"routing_forms_total_responses": "Total Responses",
"routing_forms_total_responses_without_booking": "Total Responses Without Booking",
Expand All @@ -2783,6 +2784,7 @@
"routing_form_insights_booked_by": "Booked by",
"routing_form_insights_created_at": "Created at",
"routing_form_insights_booking_status": "Booking Status",
"routing_form_insights_reassign_reason": "Reassign Reason",
"routing_form_insights_booking_at": "Booking At",
"routing_form_insights_submitted_at": "Submitted At",
"access_denied": "Access Denied",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ export function RoutingFormResponsesTable() {
</div>
),
}),
columnHelper.accessor("reassignReason", {
id: "reassignReason",
header: t("routing_form_insights_reassign_reason"),
size: 250,
cell: (info) => <div className="max-w-[250px]">{info.getValue()}</div>,
}),
columnHelper.accessor("createdAt", {
id: "submittedAt",
header: t("routing_form_insights_submitted_at"),
Expand Down
9 changes: 9 additions & 0 deletions packages/features/insights/server/routing-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class RoutingEventsInsights {
uid: true,
status: true,
createdAt: true,
reassignReason: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add reassign reason to table

attendees: {
select: {
timeZone: true,
Expand Down Expand Up @@ -571,6 +572,12 @@ class RoutingEventsInsights {
createdAt: true,
startTime: true,
endTime: true,
reassignBy: {
select: {
name: true,
},
},
reassignReason: true,
attendees: {
select: {
email: true,
Expand Down Expand Up @@ -614,6 +621,8 @@ class RoutingEventsInsights {
"Attendee Timezone": response.routedToBooking?.attendees[0]?.timeZone || "",
"Routed To Name": response.routedToBooking?.user?.name || "",
"Routed To Email": response.routedToBooking?.user?.email || "",
"Reassigned By": response.routedToBooking?.reassignBy?.name || "",
"Reassigned Reason": response.routedToBooking?.reassignReason || "",
Comment on lines +624 to +625
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provide Reassign reason and who reassigned in routing form export

};

// Add form fields as columns with their labels
Expand Down
8 changes: 4 additions & 4 deletions packages/features/shell/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ const navigation: NavigationItemType[] = [
isCurrent: ({ pathname: path, item }) => path?.startsWith(item.href) ?? false,
child: [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename tabs - see PR description for reasoning.

{
name: "bookings",
name: "summary",
href: "/insights",
isCurrent: ({ pathname: path }) => path == "/insights" ?? false,
},
{
name: "routing",
href: "/insights/routing",
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/routing") ?? false,
name: "bookings",
href: "/insights/bookings",
isCurrent: ({ pathname: path }) => path?.startsWith("/insights/bookings") ?? false,
},
],
},
Expand Down
Loading