From f63ca6b08e988d02aa682e24aa1206a12b4cf255 Mon Sep 17 00:00:00 2001
From: Victoria Earl
Date: Fri, 15 Mar 2024 22:22:55 -0400
Subject: [PATCH] Update dealer and panel emails for 2024 Changes requested via
Slack!
---
magwest/automated_emails.py | 37 +++++++++++++++++--
magwest/models.py | 6 +++
.../templates/emails/dealers/approved.html | 8 ++--
magwest/templates/emails/dealers/declined.txt | 6 +++
.../emails/dealers/payment_reminder.txt | 9 +++++
.../templates/emails/dealers/waitlisted.txt | 12 ++++++
.../emails/panels/panel_app_accepted.txt | 17 +++++++++
.../emails/panels/panel_app_declined.txt | 11 ++++++
.../emails/panels/panel_app_scheduled.txt | 13 +++++++
.../emails/panels/panel_app_waitlisted.txt | 9 +++++
.../emails/panels/panelist_schedule.txt | 5 +++
.../emails/placeholders/panelist.txt | 7 ++++
.../preregistration/dealer_confirmation.html | 1 -
13 files changed, 133 insertions(+), 8 deletions(-)
create mode 100644 magwest/templates/emails/dealers/declined.txt
create mode 100644 magwest/templates/emails/dealers/payment_reminder.txt
create mode 100644 magwest/templates/emails/dealers/waitlisted.txt
create mode 100644 magwest/templates/emails/panels/panel_app_accepted.txt
create mode 100644 magwest/templates/emails/panels/panel_app_declined.txt
create mode 100644 magwest/templates/emails/panels/panel_app_scheduled.txt
create mode 100644 magwest/templates/emails/panels/panel_app_waitlisted.txt
create mode 100644 magwest/templates/emails/panels/panelist_schedule.txt
create mode 100644 magwest/templates/emails/placeholders/panelist.txt
diff --git a/magwest/automated_emails.py b/magwest/automated_emails.py
index 4658e28..e8866a4 100644
--- a/magwest/automated_emails.py
+++ b/magwest/automated_emails.py
@@ -1,11 +1,28 @@
from datetime import timedelta
-from uber.automated_emails import AutomatedEmailFixture, BandEmailFixture, StopsEmailFixture
+from uber.automated_emails import AutomatedEmailFixture, MarketplaceEmailFixture, StopsEmailFixture
from uber.config import c
-from uber.models import Attendee
+from uber.models import Attendee, AutomatedEmail
from uber.utils import before, days_before, days_after
+MarketplaceEmailFixture(
+ f'Waitlisted - {c.EVENT_NAME_AND_YEAR}',
+ 'dealers/waitlisted.txt',
+ lambda g: g.status == c.WAITLISTED,
+ # query=Group.status == c.WAITLISTED,
+ needs_approval=True,
+ ident='dealer_reg_waitlisted')
+
+MarketplaceEmailFixture(
+ f'About your Declined Dealer\'s Application - {c.EVENT_NAME_AND_YEAR}',
+ 'dealers/declined.txt',
+ lambda g: g.status == c.DECLINED,
+ # query=Group.status == c.DECLINED,
+ needs_approval=True,
+ ident='dealer_reg_declined')
+
+
AutomatedEmailFixture(
Attendee,
'{EVENT_NAME} food for guests',
@@ -14,6 +31,7 @@
ident='magwest_guest_food_restrictions',
sender="MAGWest Tea Room ")
+
AutomatedEmailFixture(
Attendee,
'{EVENT_NAME} hospitality suite information',
@@ -22,6 +40,7 @@
ident='magwest_guest_food_info',
sender="MAGWest Tea Room ")
+
AutomatedEmailFixture(
Attendee,
'{EVENT_NAME} Volunteer Food',
@@ -30,6 +49,7 @@
ident='magwest_volunteer_food_info',
sender="MAGWest Tea Room ")
+
AutomatedEmailFixture(
Attendee,
'{EVENT_NAME} FAQ',
@@ -37,15 +57,16 @@
lambda a: a.badge_status == c.COMPLETED_STATUS and days_before(7, c.FINAL_EMAIL_DEADLINE),
ident='magwest_prefest_faq')
+
AutomatedEmailFixture(
Attendee,
'{EVENT_NAME} PC Gaming Survey',
'pc_gaming_survey.html',
lambda a: c.LAN in a.interests_ints,
ident='pc_gaming_survey',
- needs_approval=True,
sender="MAGWest LAN Staff ")
+
StopsEmailFixture(
'CORRECTION to the {EVENT_NAME} ({EVENT_DATE}) Shift Schedule Email',
'shifts/schedule_correction.html',
@@ -53,6 +74,7 @@
when=days_before(1, c.FINAL_EMAIL_DEADLINE),
ident='volunteer_shift_schedule_correction')
+
AutomatedEmailFixture(
Attendee,
'Last Chance for MAGWest {EVENT_YEAR} bonus swag!',
@@ -62,3 +84,12 @@
when=before(c.EPOCH - timedelta(days=2)),
sender='MAGWest Merch Team ',
ident='magwest_bonus_swag_reminder_last_chance')
+
+
+AutomatedEmail.email_overrides.extend([
+ ('panel_accepted', 'subject', f"Approved - {c.EVENT_NAME_AND_YEAR} Panel Application"),
+ ('panel_declined', 'subject', f"Declined - {c.EVENT_NAME_AND_YEAR} Panel Application"),
+ ('panel_waitlisted', 'subject', f"Waitlisted - {c.EVENT_NAME_AND_YEAR} Panel Application"),
+ ('panel_accept_reminder', 'subject', f"Last Chance to Confirm Your Panel - {c.EVENT_NAME_AND_YEAR}"),
+ ('panel_scheduled', 'subject', f"Your Panel has been Scheduled - {c.EVENT_NAME_AND_YEAR}")
+ ])
\ No newline at end of file
diff --git a/magwest/models.py b/magwest/models.py
index a47fab7..57f66ff 100644
--- a/magwest/models.py
+++ b/magwest/models.py
@@ -2,12 +2,18 @@
from uber.models.types import DefaultColumn as Column, MultiChoice
from uber.config import c
+
@Session.model_mixin
class Attendee:
@property
def num_free_event_shirts(self):
return 1 if self.badge_type == c.STAFF_BADGE else self.volunteer_event_shirt_eligible
+ @property
+ def approved_panel_apps(self):
+ return [panel.name for panel in self.panel_applications if panel.status == c.ACCEPTED]
+
+
@Session.model_mixin
class GuestMerch:
extra_merch_time = Column(MultiChoice(c.EXTRA_MERCH_TIME_OPTS))
\ No newline at end of file
diff --git a/magwest/templates/emails/dealers/approved.html b/magwest/templates/emails/dealers/approved.html
index 9af7f30..5031ad6 100644
--- a/magwest/templates/emails/dealers/approved.html
+++ b/magwest/templates/emails/dealers/approved.html
@@ -1,11 +1,9 @@
-
Thank you for your interest in the MAGWest Marketplace. Your group ({{ group.name }}) has been approved as a {{ c.EVENT_NAME }} Dealer for this coming {{ event_dates() }}!
+Hello there! Thank you for submitting your dealer's application for this year's MAGWest Marketplace. Your group ({{ group.name }}) has been approved as a {{ c.EVENT_NAME }} Dealer for this coming {{ event_dates() }}!
-Please note that we are still in process of finalizing the Marketplace contract for this year and will be sending a second email with a link to the contract shortly.
-
-Once you have looked over the contract, please go ahead and pay the ${{ group.cost }} you owe using the credit card button on this page.
+By proceeding with the purchase of your table(s), you are implicitly agreeing to comply with both the MAGWest Marketplace agreement and the event's code of conduct. To view the MAGWest Marketplace agreement and purchase your approved tables, go ahead and pay the ${{ group.cost }} you owe using the credit card button on this page.
Payment is expected by: {{ c.DEALER_PAYMENT_DUE|datetime_local }}. Failure to pay by this date may result in removal of your application and your tables being filled by another applicant.
@@ -17,6 +15,8 @@
{{ group.badges }} badge{{ group.badges|pluralize }} ({{ group.default_badge_cost|format_currency }})
+Looking forward to working with you! Cheers!
+
{{ c.MARKETPLACE_EMAIL_SIGNATURE }}