Additional Notes Required (#4897)
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
4 files changed
+28
-1
No files matched your search
@@ -805,6 +805,7 @@ const BookingPage = ({
|
||||
) : (
|
||||
<textarea
|
||||
{...bookingForm.register("notes")}
|
||||
required={!!eventType.metadata.additionalNotesRequired}
|
||||
id="notes"
|
||||
name="notes"
|
||||
rows={3}
|
||||
|
||||
@@ -249,7 +249,30 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupInfered
|
||||
)}
|
||||
/>
|
||||
<hr />
|
||||
|
||||
<Controller
|
||||
name="metadata.additionalNotesRequired"
|
||||
control={formMethods.control}
|
||||
defaultValue={!!eventType.metadata.additionalNotesRequired}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<div className="flex space-x-3 ">
|
||||
<Switch
|
||||
name="additionalNotesRequired"
|
||||
fitToHeight={true}
|
||||
checked={value}
|
||||
onCheckedChange={(e) => onChange(e)}
|
||||
/>
|
||||
<div className="flex flex-col">
|
||||
<Skeleton as={Label} className="text-sm font-semibold leading-none text-black">
|
||||
{t("require_additional_notes")}
|
||||
</Skeleton>
|
||||
<Skeleton as="p" className="-mt-2 text-sm leading-normal text-gray-600">
|
||||
{t("require_additional_notes_description")}
|
||||
</Skeleton>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
<hr />
|
||||
<Controller
|
||||
name="successRedirectUrl"
|
||||
control={formMethods.control}
|
||||
|
||||
@@ -1307,6 +1307,8 @@
|
||||
"update_timezone_question": "Update Timezone?",
|
||||
"update_timezone_description": "It seems like your local timezone has changed to {{formattedCurrentTz}}. It's very important to have the correct timezone to prevent bookings at undesired times. Do you want to update it?",
|
||||
"dont_update": "Don't update",
|
||||
"require_additional_notes": "Require additional notes",
|
||||
"require_additional_notes_description": "Require additional notes to be filled out when booking",
|
||||
"email_address_action": "send email to a specific email address",
|
||||
"after_event_trigger": "after event ends",
|
||||
"how_long_after": "How long after event ends?",
|
||||
|
||||
@@ -31,6 +31,7 @@ export const EventTypeMetaDataSchema = z
|
||||
blockchainId: z.number().optional(),
|
||||
giphyThankYouPage: z.string().optional(),
|
||||
apps: z.object(appDataSchemas).partial().optional(),
|
||||
additionalNotesRequired: z.boolean().optional(),
|
||||
})
|
||||
.nullable();
|
||||
|
||||
|
||||
Reference in new issue
Block a user