Skip to content

Commit

Permalink
Merge pull request #4362 from magfest/add-band-claim-email
Browse files Browse the repository at this point in the history
Add band claim email
  • Loading branch information
kitsuta committed May 14, 2024
2 parents a0780b4 + d9e79f6 commit cbed8dc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
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 }}

0 comments on commit cbed8dc

Please sign in to comment.