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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user