feat(waitlist): optional event waitlist with FIFO promote.
Commercial calendars opt in via settings.waitlist_enabled; join when full; auto-promote on cancel/decline/expire with email and in-app notify. Refs EventHub/EventHubBack#72
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-module(logic_email).
|
||||
-export([send_verification_email/2, send_specialist_invite/2, send_password_reset/2,
|
||||
send_booking_reminder/4]).
|
||||
send_booking_reminder/4, send_waitlist_promoted/3]).
|
||||
|
||||
%% SMTP via env (variant A / Back#68):
|
||||
%% SMTP_HOST empty → log-only (local/tests)
|
||||
@@ -29,6 +29,13 @@ send_booking_reminder(Email, EventTitle, StartTime, EventPath) ->
|
||||
logic_email_templates:render_reminder(Url, to_bin(EventTitle), WhenText),
|
||||
send(to_bin(Email), Subject, Plain, Html).
|
||||
|
||||
-spec send_waitlist_promoted(binary(), binary(), binary()) -> ok.
|
||||
send_waitlist_promoted(Email, EventTitle, EventPath) ->
|
||||
Url = abs_path(EventPath),
|
||||
{Subject, Plain, Html} =
|
||||
logic_email_templates:render_waitlist_promoted(Url, to_bin(EventTitle)),
|
||||
send(to_bin(Email), Subject, Plain, Html).
|
||||
|
||||
send_kind(Kind, To0, Url) ->
|
||||
{Subject, Plain, Html} = logic_email_templates:render(Kind, Url),
|
||||
send(to_bin(To0), Subject, Plain, Html).
|
||||
|
||||
Reference in New Issue
Block a user