Additional fields as variables for custom event name (#7454)

* feat: add custom validate name util

* refactor: separate custom event type modal into a
different component

* feat: add validation to zod

* chore: add i18n key

* feat: add dynamic imports

* fix: padding

* Omit cache-hit exit 1, assuming it'll fail regardless

* allow custom inputs as variables in event name

* fix ui for adding custom inputs

* show edited event name in modal

* code clean up

* merge fixes

* includes new booking fields logic

* fix event name with custom booking fields

* code clean up

* Update apps/web/public/static/locales/en/common.json

Co-authored-by: Alex van Andel <[email protected]>

* fix type error

* remove old reqbody variable

---------

Co-authored-by: nafees nazik <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-03-09 15:11:16 +00:00
1 parent 943142e77f
commit d9a555d94a
7 files changed
+82 -21

No files matched your search

@@ -714,6 +714,8 @@ async function handler(
const attendeesList = [...invitee, ...guests];
const responses = "responses" in reqBody ? reqBody.responses : null;
const eventNameObject = {
//TODO: Can we have an unnamed attendee? If not, I would really like to throw an error here.
attendeeName: bookerName || "Nameless",
@@ -722,6 +724,7 @@ async function handler(
// TODO: Can we have an unnamed organizer? If not, I would really like to throw an error here.
host: organizerUser.name || "Nameless",
location: bookingLocation,
bookingFields: { ...responses },
t: tOrganizer,
};
@@ -733,7 +736,6 @@ async function handler(
}
}
const responses = "responses" in reqBody ? reqBody.responses : null;
const calEventUserFieldsResponses =
"calEventUserFieldsResponses" in reqBody ? reqBody.calEventUserFieldsResponses : null;
let evt: CalendarEvent = {