You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae6ed04
Browse filesBrowse the repository at this point in the historyBrowse files
feat(email): multipart HTML+plaintext for RI exchange pending approval (#296)
Mirror the purchaseApprovalRequestHTMLTemplate pattern for the
SendRIExchangePendingApproval flow:
- Add riExchangePendingApprovalHTMLTemplate: inline-styled table of
exchanges with per-row Approve/Reject CTA buttons, summary block,
optional requested-by line, configurable cancellation-window note,
and skipped-exchanges section.
- Extend riExchangePendingApprovalTemplate (plaintext): labelled
Approve/Reject URLs (replacing bracket notation), optional
requested-by block, configurable cancellation-window note.
- Extend RIExchangeNotificationData with RequestedByName,
RequestedByEmail, RequestedAt, CancellationWindowNote fields.
- Add RenderRIExchangePendingApprovalEmailHTML renderer.
- Add sendRIExchangePendingApprovalVia helper (shared by Sender and
SMTPSender, non-fatal HTML degrade on render error).
- SMTPSender.SendRIExchangePendingApproval: delegates to helper.
- Sender.SendRIExchangePendingApproval: uses direct SES multipart path
when emailAddress+fromEmail are configured; falls back to SNS
broadcast for topic-only deployments.
- 7 new test cases covering both halves, empty/custom cancellation
notes, missing requested-by, and skipped-exchanges rendering.
<p style="margin:8px 0 0 0;color:#475569;font-size:14px;">CUDly has identified <strong>{{len .Exchanges}}</strong> convertible RI exchange(s) that need your approval.</p>
{{if .CancellationWindowNote}}{{.CancellationWindowNote}}{{else}}Please approve within 6 hours (before the next analysis run).{{end}}
381
+
</p>
382
+
<p style="margin:8px 0 0 0;color:#94a3b8;font-size:11px;">Clicking a link will require you to sign in if you aren't already; the action is then recorded against your logged-in account.</p>
<p style="margin:0;color:#94a3b8;font-size:11px;">This is an automated message from CUDly. Do not share these links. <a href="{{.DashboardURL}}/#ri-exchange" style="color:#64748b;">View exchange history</a></p>
387
+
</td></tr>
388
+
389
+
</table>
390
+
</td></tr></table>
391
+
</body></html>`
392
+
319
393
constriExchangeCompletedTemplate=`CUDly - RI Exchanges Completed
0 commit comments