feat: atoms team booking (#14525)
* feat: setup usePublicEvent with orgSlug and duration * feat: setup useAvailableSlots with eventTypeSlug and orgSlug * fix & feat: fix TS issues and allow passing multiple users to Booker * refactor: dont show [15min] [30min] [60min] [1h30min] picker * fix: pass orgSlug to handleNewBooking -> loadUsers -> findUsersByUsername to not return empty users[] * refactor: display attendees in booking confirmation screen * fix: getting slots get orgSlug from props not event * revert: Booker username use props instead of hardcoded values * refactor: setup BookerStore org and use it for selectedTime + isDynamic logic * refactor: hide 'what is this meeting about' input in final booking step * fix: TS error * revert: what is the meeting about field hiding * revert: make org as org? in booker store * revert: createNewBooking -> loadUsers -> get forced orgSlug from header not body * refactor: useHandleBookEvent get orgSlug from booker store not props * fix: if entity undefined dont access orgSlug * refactor: add isDynamic prop as queryKey for usePublicEvent * refactor: remove unused prop * re-add docs * fix: typescript error * fix: force platform orgSlug in handleNewBooking.ts * fix: remove duplicate setSelectedDuration declaration * refactor: destructure properies from body instead of req.body * fix: entity optional and hide event members --------- Co-authored-by: Morgan <[email protected]> Co-authored-by: Morgan Vernay <[email protected]>
This commit is contained in:
18 files changed
+148
-33
No files matched your search
@@ -150,7 +150,9 @@ export class BookingsController {
|
||||
@Headers(X_CAL_CLIENT_ID) clientId?: string
|
||||
): Promise<ApiResponse<unknown>> {
|
||||
const oAuthClientId = clientId?.toString();
|
||||
const locationUrl = body.locationUrl;
|
||||
|
||||
const { orgSlug, locationUrl } = body;
|
||||
req.headers["x-cal-force-slug"] = orgSlug;
|
||||
try {
|
||||
const booking = await handleNewBooking(
|
||||
await this.createNextApiBookingRequest(req, oAuthClientId, locationUrl)
|
||||
|
||||
@@ -99,6 +99,10 @@ export class CreateBookingInput {
|
||||
@Type(() => Response)
|
||||
responses!: Response;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
orgSlug?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
locationUrl?: string;
|
||||
|
||||
@@ -12,5 +12,5 @@ export class GetPublicEventTypeQueryParams {
|
||||
@ApiProperty({ required: false })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
org?: string;
|
||||
org?: string | null;
|
||||
}
|
||||
@@ -722,6 +722,7 @@
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
@@ -4226,6 +4227,9 @@
|
||||
"responses": {
|
||||
"$ref": "#/components/schemas/Response"
|
||||
},
|
||||
"orgSlug": {
|
||||
"type": "string"
|
||||
},
|
||||
"locationUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user