fix(audit): wire 6 missing email subject overrides (R2-H14)
Admin-editable subject overrides at /admin/email-templates were no-ops for 6 of 8 templates — only portal_activation and portal_reset called loadSubjectOverride. Added a shared resolveSubject() helper and wired it into the missing senders: - crm_invite + portal_invite_resend (crm-invite.service.ts) - inquiry_client_confirmation (email worker via portId on job payload) - inquiry_sales_notification (email worker via portId on job payload) - residential_inquiry_client_confirmation (residential-inquiries route) - residential_inquiry_sales_alert (residential-inquiries route) The inquiry email worker payloads now carry portId + portName so the worker can resolve the per-port override; producers in inquiry- notifications.service.ts pass them through. 1175/1175 vitest passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,8 @@ export async function sendInquiryNotifications(params: InquiryNotificationParams
|
||||
firstName,
|
||||
mooringNumber,
|
||||
contactEmail,
|
||||
portId,
|
||||
portName: 'Port Nimara', // future: resolve from getPortBrandingConfig
|
||||
});
|
||||
} catch (err) {
|
||||
logger.error({ err, interestId }, 'Failed to queue client confirmation email');
|
||||
@@ -120,6 +122,8 @@ export async function sendInquiryNotifications(params: InquiryNotificationParams
|
||||
phone: clientPhone,
|
||||
mooringNumber,
|
||||
crmUrl,
|
||||
portId,
|
||||
portName: 'Port Nimara',
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user