More PR review fixes

pull/6560/head
Hariom Balhara 2023-02-13 18:31:40 +05:30
parent 99e7234334
commit 6ec5696e50
2 changed files with 1 additions and 5 deletions

View File

@ -352,7 +352,6 @@ function getBookingData({
}; };
} else { } else {
// Check if required custom inputs exist // Check if required custom inputs exist
// TODO: Run it conditionally for API.
handleCustomInputs(eventType.customInputs as EventTypeCustomInput[], reqBody.customInputs); handleCustomInputs(eventType.customInputs as EventTypeCustomInput[], reqBody.customInputs);
return { return {
@ -384,7 +383,7 @@ function getCustomInputsResponses(
} }
} else { } else {
const responses = reqBody.responses || {}; const responses = reqBody.responses || {};
// Map new responses format to old customInputs format so that webhooks can still receive same values. // Backward Compatibility: Map new `responses` to old `customInputs` format so that webhooks can still receive same values.
for (const [fieldName, fieldValue] of Object.entries(responses)) { for (const [fieldName, fieldValue] of Object.entries(responses)) {
const foundACustomInputForTheResponse = eventTypeCustomInputs.find( const foundACustomInputForTheResponse = eventTypeCustomInputs.find(
(input) => slugify(input.label) === fieldName (input) => slugify(input.label) === fieldName
@ -594,9 +593,7 @@ async function handler(
const invitee = [ const invitee = [
{ {
// TODO: ManageBookings: Ensure that email is there in TS as well as runtime. Right now I can save an attendee without email
email: bookerEmail, email: bookerEmail,
//TODO: ManageBookings: Ensure that name is there in TS as well as runtime
name: bookerName, name: bookerName,
timeZone: bookingData.timeZone, timeZone: bookingData.timeZone,
language: { translate: tAttendees, locale: language ?? "en" }, language: { translate: tAttendees, locale: language ?? "en" },

View File

@ -4,7 +4,6 @@ export function Label(props: JSX.IntrinsicElements["label"]) {
return ( return (
<label <label
{...props} {...props}
// TODO: Test labels inside the app when dark theme is enabled as app doesn't support dark theme
className={classNames( className={classNames(
"mb-2 block text-sm font-medium leading-none text-gray-700 dark:text-white", "mb-2 block text-sm font-medium leading-none text-gray-700 dark:text-white",
props.className props.className