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:
authored and GitHub committed 2024-09-11 17:56:04 -07:00
1 parent 74a9f3c19e
commit 4a59841b02
85 files changed
+2078 -274

No files matched your search

+12 -8
View File
@@ -1,17 +1,20 @@
import type { TFunction } from "next-i18next";
import isSmsCalEmail from "@calcom/lib/isSmsCalEmail";
import type { CalendarEvent } from "@calcom/types/Calendar";
import { Info } from "./Info";
const PersonInfo = ({ name = "", email = "", role = "" }) => (
const PersonInfo = ({ name = "", email = "", role = "", phoneNumber = "" }) => (
<div style={{ color: "#101010", fontWeight: 400, lineHeight: "24px" }}>
{name} - {role}{" "}
<span style={{ color: "#4B5563" }}>
<a href={`mailto:${email}`} style={{ color: "#4B5563" }}>
{email}
</a>
</span>
{name} - {role} {phoneNumber}
{!isSmsCalEmail(email) && (
<span style={{ color: "#4B5563" }}>
<a href={`mailto:${email}`} style={{ color: "#4B5563" }}>
{email}
</a>
</span>
)}
</div>
);
@@ -28,7 +31,7 @@ export function WhoInfo(props: { calEvent: CalendarEvent; t: TFunction }) {
email={props.calEvent.organizer.email}
/>
{props.calEvent.team?.members.map((member) => (
<PersonInfo key={member.name} name={member.name} role={t("team_member")} email={member.email} />
<PersonInfo key={member.name} name={member.name} role={t("team_member")} email={member?.email} />
))}
{props.calEvent.attendees.map((attendee) => (
<PersonInfo
@@ -36,6 +39,7 @@ export function WhoInfo(props: { calEvent: CalendarEvent; t: TFunction }) {
name={attendee.name}
role={t("guest")}
email={attendee.email}
phoneNumber={attendee.phoneNumber ?? undefined}
/>
))}
</>