fixes:CAL-4905 (#18222)
This commit is contained in:
1 parent
a0706d9b51
commit
4df4383e1e
2 files changed
+11
-6
No files matched your search
@@ -191,16 +191,18 @@ export async function onFormSubmission(
|
||||
return acc;
|
||||
}, [] as OrderedResponses);
|
||||
|
||||
if (form.settings?.emailOwnerOnSubmission) {
|
||||
if (form.teamId) {
|
||||
if (form.userWithEmails?.length) {
|
||||
moduleLogger.debug(
|
||||
`Preparing to send Form Response email for Form:${form.id} to users: ${form.userWithEmails.join(",")}`
|
||||
);
|
||||
await sendResponseEmail(form, orderedResponses, form.userWithEmails);
|
||||
}
|
||||
} else if (form.settings?.emailOwnerOnSubmission) {
|
||||
moduleLogger.debug(
|
||||
`Preparing to send Form Response email for Form:${form.id} to form owner: ${form.user.email}`
|
||||
);
|
||||
await sendResponseEmail(form, orderedResponses, [form.user.email]);
|
||||
} else if (form.userWithEmails?.length) {
|
||||
moduleLogger.debug(
|
||||
`Preparing to send Form Response email for Form:${form.id} to users: ${form.userWithEmails.join(",")}`
|
||||
);
|
||||
await sendResponseEmail(form, orderedResponses, form.userWithEmails);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -522,7 +522,10 @@ export const successRedirectUrl = z
|
||||
|
||||
export const RoutingFormSettings = z
|
||||
.object({
|
||||
// Applicable only for User Forms
|
||||
emailOwnerOnSubmission: z.boolean(),
|
||||
|
||||
// Applicable only for Team Forms
|
||||
sendUpdatesTo: z.array(z.number()).optional(),
|
||||
sendToAll: z.boolean().optional(),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user