Skip to content

Commit

Permalink
fix: Booking questions order correction in confirmation email (#18192)
Browse files Browse the repository at this point in the history
Co-authored-by: Udit Takkar <[email protected]>
  • Loading branch information
VenkataRohan and Udit-takkar authored Dec 16, 2024
1 parent abaf03a commit da2c57c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/web/modules/bookings/views/bookings-single-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,17 @@ export default function Success(props: PageProps) {
)}
</div>
<div className="text-bookingdark dark:border-darkgray-200 mt-8 text-left dark:text-gray-300">
{Object.entries(bookingInfo.responses).map(([name, response]) => {
const field = eventType.bookingFields.find((field) => field.name === name);
{eventType.bookingFields.map((field) => {
if (!field) return null;

if (!bookingInfo.responses[field.name]) return null;

const response = bookingInfo.responses[field.name];
// We show location in the "where" section
// We show Booker Name, Emails and guests in Who section
// We show notes in additional notes section
// We show rescheduleReason at the top
if (!field) return null;

const isSystemField = SystemField.safeParse(field.name);
// SMS_REMINDER_NUMBER_FIELD is a system field but doesn't have a dedicated place in the UI. So, it would be shown through the following responses list
// TITLE is also an identifier for booking question "What is this meeting about?"
Expand Down

0 comments on commit da2c57c

Please sign in to comment.