feat: booking with phone number (#14461)
Co-authored-by: Omar López <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
85 files changed
+2078
-274
No files matched your search
@@ -42,6 +42,7 @@ import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
|
||||
import useTheme from "@calcom/lib/hooks/useTheme";
|
||||
import isSmsCalEmail from "@calcom/lib/isSmsCalEmail";
|
||||
import { getEveryFreqFor } from "@calcom/lib/recurringStrings";
|
||||
import { getIs24hClockFromLocalStorage, isBrowserLocale24h } from "@calcom/lib/timeFormat";
|
||||
import { localStorage } from "@calcom/lib/webstorage";
|
||||
@@ -144,7 +145,7 @@ export default function Success(props: PageProps) {
|
||||
|
||||
const attendees = bookingInfo?.attendees;
|
||||
|
||||
const isGmail = !!attendees.find((attendee) => attendee.email.includes("gmail.com"));
|
||||
const isGmail = !!attendees.find((attendee) => attendee?.email?.includes("gmail.com"));
|
||||
|
||||
const [is24h, setIs24h] = useState(
|
||||
props?.userTimeFormat ? props.userTimeFormat === 24 : isBrowserLocale24h()
|
||||
@@ -551,7 +552,14 @@ export default function Success(props: PageProps) {
|
||||
{attendee.name && (
|
||||
<p data-testid={`attendee-name-${attendee.name}`}>{attendee.name}</p>
|
||||
)}
|
||||
<p data-testid={`attendee-email-${attendee.email}`}>{attendee.email}</p>
|
||||
{attendee.phoneNumber && (
|
||||
<p data-testid={`attendee-phone-${attendee.phoneNumber}`}>
|
||||
{attendee.phoneNumber}
|
||||
</p>
|
||||
)}
|
||||
{!isSmsCalEmail(attendee.email) && (
|
||||
<p data-testid={`attendee-email-${attendee.email}`}>{attendee.email}</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user