feat(waitlist): optional event waitlist with FIFO promote.
CI / test (push) Successful in 7m12s
CI / deploy-ift (push) Successful in 2m44s
CI / e2e-ift (push) Successful in 1m28s
CI / deploy-stage (push) Successful in 2m3s
CI / e2e-stage (push) Successful in 1m24s

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:
2026-08-14 21:44:42 +03:00
parent 29111cd514
commit fb8869fa86
15 changed files with 730 additions and 9 deletions
+8 -1
View File
@@ -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).