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

@@ -15,6 +15,11 @@ async function getEventType(eventTypeId: EventType["id"]) {
},
include: {
customInputs: true,
profile: {
select: {
organizationId: true,
},
},
workflows: {
select: {
workflow: {
@@ -29,9 +34,13 @@ async function getEventType(eventTypeId: EventType["id"]) {
throw new Error(`EventType:${eventTypeId} not found`);
}
const { profile, ...restEventType } = rawEventType;
const isOrgTeamEvent = !!rawEventType?.teamId && !!profile?.organizationId;
const eventType = {
...rawEventType,
bookingFields: getBookingFieldsWithSystemFields(rawEventType),
...restEventType,
bookingFields: getBookingFieldsWithSystemFields({ ...restEventType, isOrgTeamEvent }),
};
return eventType;
}