fix: Handle account user lookup fields for queued form responses (#23811)
* Add constants for queued response id query string * Ignore eslint - app store imports * Return `routingFormResponseId` or `queuedFormResponseId` from URL params * Pass routingForm params to `getTeamMemberEmailForResponseOrContact` * Handle getting form responses for queued form responses * Type fix * add test * Add tests --------- Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
4 files changed
+318
-189
No files matched your search
@@ -125,6 +125,7 @@
|
||||
<div id="cal-booking-routingFormFullPrerender">
|
||||
<hr/>
|
||||
<a href="?only=ns:routingFormFullPrerender&debug=1&[email protected]">Routing Form - Prerender Headless Router itself queuing the form response</a>
|
||||
NOTE: Pass query param param.formId=FORM_UID_HERE to test with a particular routing form
|
||||
<p>1. As page is loading, we prerender the headless router for the email passed as param.email</p>
|
||||
<p>2. Whenever email changes and onblur happens, the prerender is triggered for the new email and previous prerendered modal is removed</p>
|
||||
<p>3. The prerender of the headless router queues the form response and doesn't really record it. When the actual booking is made, the form response is recorded from the queue</p>
|
||||
@@ -145,7 +146,8 @@
|
||||
});
|
||||
window.routingFormFullPrerender = {
|
||||
buildRouterUrl: ({skills, location, name, email, formId}) => {
|
||||
return `router?form=${formId}&skills=${skills}&Location=${location}&name=${name}&Email=${email}&Rating=5`;
|
||||
// Send `email` as well as `Email` because E2e Tests currently use `Email` and `email` is needed by contact owner lookup. It doesn't accept Uppercase Email
|
||||
return `router?form=${formId}&skills=${skills}&Location=${location}&name=${name}&Email=${email}&email=${email}&Rating=5`;
|
||||
},
|
||||
onFormSubmit: (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user