feat(intake): CRM-owned website inquiry emails + in-app notifications
Flag-gated (website_intake_email_enabled, default OFF) sending of registrant confirmation + staff alert for inquiries captured at /api/public/website-inquiries, reusing the branded berth + residential templates and adding contact-form client-confirmation + sales-alert templates. In-app (bell) notifications fire on every fresh capture, independent of the flag. Recipients resolve from the existing inquiry_/residential_notification_recipients settings; fires only on a fresh (non-deduped) insert so retries never re-send. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ export async function sendInquiryNotifications(params: InquiryNotificationParams
|
||||
/**
|
||||
* Finds all user IDs on a port whose role grants `interests.view` permission.
|
||||
*/
|
||||
async function findUsersWithInterestsPermission(portId: string): Promise<string[]> {
|
||||
export async function findUsersWithInterestsPermission(portId: string): Promise<string[]> {
|
||||
const assignments = await db
|
||||
.select({
|
||||
userId: userPortRoles.userId,
|
||||
|
||||
Reference in New Issue
Block a user