feat: Salesforce skip ownership check if attendee email is a free domain (#17916)

* Add email domain array

* Create numbered email domain object

* Check email domain

* Rename function

* Add tests

* Frontend enable skip ownership check if free email domain

* Backend ignore adding ownership to return records if free email domain check is enabled

* feat: Only require confirmation for free email domains (#17917)

* Add requiresConfirmationForFreeEmail to db

* Add option to event type settings

* Get requiresConfirmationForFreeEmail for event type page

* Include requiresConfirmationForFreeEmail in fetching event type

* Pass bookerEmail to `getRequiresConfirmationFlags`

* Add free email domain check to `determineRequiresConfirmation`

* Add `requiresConfirmationForFreeEmail` to types

* Add severity to Watchlist table

* Add migration for watchlist severity

* Add `getEmailDomainInWatchlist` method to watchlist repository

* Use watchlist repository to check for free email domain

* Mock watchlist repository in test

* Update test

* Rename method

* Add severity to blocked list

* Move check free email domain to async

* Type checks

* Adjust for promise returned

* Fix tests

* Fix

* Fix tests
This commit is contained in:
Joe Au-Yeung authored and GitHub committed 2024-12-18 15:02:42 +00:00
1 parent a7f24e777b
commit 8dda418127
27 files changed
+4951 -36

No files matched your search

@@ -88,6 +88,7 @@ export const useEventTypeForm = ({
schedulingType: eventType.schedulingType,
requiresConfirmation: eventType.requiresConfirmation,
requiresConfirmationWillBlockSlot: eventType.requiresConfirmationWillBlockSlot,
requiresConfirmationForFreeEmail: eventType.requiresConfirmationForFreeEmail,
slotInterval: eventType.slotInterval,
minimumBookingNotice: eventType.minimumBookingNotice,
metadata: eventType.metadata,
@@ -188,6 +189,7 @@ export const useEventTypeForm = ({
};
const getDirtyFields = (values: FormValues): Partial<FormValues> => {
console.log("🚀 ~ getDirtyFields ~ values:", values);
if (!isFormDirty) {
return {};
}
@@ -368,6 +370,7 @@ export const useEventTypeForm = ({
}, {}) as EventTypeUpdateInput;
if (dirtyFieldExists) {
console.log("🚀 ~ handleSubmit ~ filteredPayload:", filteredPayload);
onSubmit({ ...filteredPayload, id: eventType.id });
}
};