Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add band claim email #4362

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions uber/automated_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,12 @@ def guest_placeholder(a): return a.placeholder and a.badge_type == c.GUEST_BADGE
and a.group.guest.group_type == c.GUEST)


def band_placeholder(a): return a.placeholder and a.badge_type == c.GUEST_BADGE and (
not a.group
or a.group.guest
and a.group.guest.group_type == c.BAND)


def dealer_placeholder(a): return a.placeholder and a.is_dealer and a.group.status == c.APPROVED


Expand All @@ -519,12 +525,15 @@ def volunteer_placeholder(a): return a.placeholder and a.registered_local > c.PR
# a.staffing provided by StopsEmailFixture


# TODO: Add an email for MIVS judges, an email for non-Guest guest group badges,
# TODO: Add an email for MIVS judges, an email for non-Guest or Band guest group badges,
# and an email for group-leader-created badges
def generic_placeholder(a): return a.placeholder and (c.AT_THE_CON or not panelist_placeholder(a)
and not guest_placeholder(a) and not dealer_placeholder(a)
and a.registered_local > min(c.PREREG_OPEN, c.DEALER_REG_START)
and not volunteer_placeholder(a))
def generic_placeholder(a): return a.placeholder and c.AT_THE_CON or (not panelist_placeholder(a)
and not band_placeholder(a)
and not guest_placeholder(a)
and not dealer_placeholder(a)
and a.registered_local > min(c.PREREG_OPEN,
c.DEALER_REG_START)
and not volunteer_placeholder(a))


AutomatedEmailFixture(
Expand Down Expand Up @@ -572,6 +581,14 @@ def generic_placeholder(a): return a.placeholder and (c.AT_THE_CON or not paneli
sender=c.GUEST_EMAIL,
ident='guest_badge_confirmation')

AutomatedEmailFixture(
Attendee,
'Claim your performer badge for {EVENT_NAME} {EVENT_YEAR}',
'placeholders/band.txt',
band_placeholder,
sender=c.BAND_EMAIL,
ident='band_badge_confirmation')

AutomatedEmailFixture(
Attendee,
f'{c.EVENT_NAME} {c.DEALER_TERM.title()} information required',
Expand Down
8 changes: 8 additions & 0 deletions uber/templates/emails/placeholders/band.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% if attendee.first_name %}{{ attendee.first_name }},

{% endif %}Thanks for coming out to perform at {{ c.EVENT_NAME }}! We've added you to our registration database for your complimentary badge, but we don't have all of your personal information. To ensure that you can pick up your badge with no hassles, please fill out the rest of your info at {{ c.URL_BASE }}/preregistration/confirm?id={{ attendee.id }} and then simply bring a photo ID{{ c.EXTRA_CHECKIN_DOCS }} to {{ c.EVENT_NAME }}.

Please let us know if you have any questions by reaching out to us at {{ c.BAND_EMAIL|email_only }}.

Thank you!
{{ c.BAND_EMAIL_SIGNATURE }}
Loading