File tree Expand file tree Collapse file tree 9 files changed +23
-1
lines changed Expand file tree Collapse file tree 9 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @calcom/atoms " : minor
3
+ ---
4
+
5
+ booker atom: allow toggling org and team info when booking round robin
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ Below is a list of props that can be passed to the booker atom.
126
126
| confirmButtonDisabled | No | Boolean indicating if the submit button should be disabled, defaults to false. |
127
127
| timeZones | No | Array of valid IANA timezones to be used in the booker. Eg. [ "Asia/Kolkata", "Europe/London"] |
128
128
| onTimeslotsLoaded | No | Callback function triggered once the available timeslots have been fetched. |
129
+ | roundRobinHideOrgAndTeam | No | Boolean indicating if the organization and team should be hidden in the booker atom sidebar for round robin scheduling type, defaults to false. |
129
130
130
131
## Styling
131
132
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ const BookerComponent = ({
80
80
confirmButtonDisabled,
81
81
timeZones,
82
82
eventMetaChildren,
83
+ roundRobinHideOrgAndTeam,
83
84
} : BookerProps & WrappedBookerProps ) => {
84
85
const searchParams = useCompatSearchParams ( ) ;
85
86
const isPlatformBookerEmbed = useIsPlatformBookerEmbed ( ) ;
@@ -403,7 +404,8 @@ const BookerComponent = ({
403
404
isPlatform = { isPlatform }
404
405
isPrivateLink = { ! ! hashedLink }
405
406
locale = { userLocale }
406
- timeZones = { timeZones } >
407
+ timeZones = { timeZones }
408
+ roundRobinHideOrgAndTeam = { roundRobinHideOrgAndTeam } >
407
409
{ eventMetaChildren }
408
410
</ EventMeta >
409
411
{ layout !== BookerLayouts . MONTH_VIEW &&
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export const EventMeta = ({
54
54
locale,
55
55
timeZones,
56
56
children,
57
+ roundRobinHideOrgAndTeam,
57
58
} : {
58
59
event ?: Pick <
59
60
BookerEvent ,
@@ -90,6 +91,7 @@ export const EventMeta = ({
90
91
locale ?: string | null ;
91
92
timeZones ?: Timezone [ ] ;
92
93
children ?: React . ReactNode ;
94
+ roundRobinHideOrgAndTeam ?: boolean ;
93
95
} ) => {
94
96
const { timeFormat, timezone } = useBookerTime ( ) ;
95
97
const [ setTimezone ] = useTimePreferences ( ( state ) => [ state . setTimezone ] ) ;
@@ -167,6 +169,7 @@ export const EventMeta = ({
167
169
profile = { event . profile }
168
170
entity = { event . entity }
169
171
isPrivateLink = { isPrivateLink }
172
+ roundRobinHideOrgAndTeam = { roundRobinHideOrgAndTeam }
170
173
/>
171
174
< EventTitle className = { `${ classNames ?. eventMetaTitle } my-2` } >
172
175
{ translatedTitle ?? event ?. title }
Original file line number Diff line number Diff line change @@ -140,11 +140,13 @@ export type WrappedBookerPropsForPlatform = WrappedBookerPropsMain & {
140
140
verifyCode : undefined ;
141
141
customClassNames ?: CustomClassNames ;
142
142
timeZones ?: Timezone [ ] ;
143
+ roundRobinHideOrgAndTeam ?: boolean ;
143
144
} ;
144
145
export type WrappedBookerPropsForWeb = WrappedBookerPropsMain & {
145
146
isPlatform : false ;
146
147
verifyCode : UseVerifyCodeReturnType ;
147
148
timeZones ?: Timezone [ ] ;
149
+ roundRobinHideOrgAndTeam ?: boolean ;
148
150
} ;
149
151
150
152
export type WrappedBookerProps = WrappedBookerPropsForPlatform | WrappedBookerPropsForWeb ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export interface EventMembersProps {
18
18
profile : BookerEvent [ "profile" ] ;
19
19
entity : BookerEvent [ "entity" ] ;
20
20
isPrivateLink : boolean ;
21
+ roundRobinHideOrgAndTeam ?: boolean ;
21
22
}
22
23
23
24
export const EventMembers = ( {
@@ -26,6 +27,7 @@ export const EventMembers = ({
26
27
profile,
27
28
entity,
28
29
isPrivateLink,
30
+ roundRobinHideOrgAndTeam,
29
31
} : EventMembersProps ) => {
30
32
const username = useBookerStore ( ( state ) => state . username ) ;
31
33
const isDynamic = ! ! ( username && username . indexOf ( "+" ) > - 1 ) ;
@@ -40,6 +42,10 @@ export const EventMembers = ({
40
42
! users . length ||
41
43
( profile . name !== users [ 0 ] . name && schedulingType === SchedulingType . COLLECTIVE ) ;
42
44
45
+ if ( schedulingType === SchedulingType . ROUND_ROBIN && roundRobinHideOrgAndTeam ) {
46
+ return < div className = "h-6" /> ;
47
+ }
48
+
43
49
const orgOrTeamAvatarItem =
44
50
isDynamic || ( ! profile . image && ! entity . logoUrl ) || ! entity . teamSlug
45
51
? [ ]
Original file line number Diff line number Diff line change @@ -549,6 +549,7 @@ export const BookerPlatformWrapper = (
549
549
hasValidLicense = { true }
550
550
isBookingDryRun = { isBookingDryRun ?? routingParams ?. isBookingDryRun }
551
551
eventMetaChildren = { props . eventMetaChildren }
552
+ roundRobinHideOrgAndTeam = { props . roundRobinHideOrgAndTeam }
552
553
/>
553
554
</ AtomsWrapper >
554
555
) ;
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ export type BookerPlatformWrapperAtomProps = Omit<
84
84
eventMetaChildren ?: React . ReactNode ;
85
85
onTimeslotsLoaded ?: ( slots : Record < string , Slot [ ] > ) => void ;
86
86
startTime ?: string | Date ;
87
+ roundRobinHideOrgAndTeam ?: boolean ;
87
88
} ;
88
89
89
90
type VIEW_TYPE = keyof typeof BookerLayouts ;
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
93
93
< Booker
94
94
// timeZones={["Europe/London", "Asia/Kolkata"]}
95
95
// isBookingDryRun={true}
96
+ // roundRobinHideOrgAndTeam={true}
96
97
bannerUrl = "https://i0.wp.com/mahala.co.uk/wp-content/uploads/2014/12/img_banner-thin_mountains.jpg?fit=800%2C258& ssl = 1 "
97
98
eventSlug = { eventTypeSlug }
98
99
onCreateBookingSuccess = { ( data ) => {
You can’t perform that action at this time.
0 commit comments