Skip to content

Commit

Permalink
Add dealer waitlist/decline emails and guest RI step
Browse files Browse the repository at this point in the history
Adds automatic emails for waitlisted and declined dealers, plus updates the approved email text, requested via email. Also adds the "Rock Island" version of the merch step for the guest checklist, requested via Slack.
  • Loading branch information
kitsuta committed Nov 18, 2023
1 parent f8c057f commit 2ec5b33
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 62 deletions.
19 changes: 17 additions & 2 deletions magprime/automated_emails.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uber.models import Attendee, AutomatedEmail
from uber.automated_emails import StopsEmailFixture, AutomatedEmailFixture
from uber.automated_emails import StopsEmailFixture, AutomatedEmailFixture, MarketplaceEmailFixture
from uber.config import c
from uber.utils import before, days_after, days_before, DeptChecklistConf

Expand Down Expand Up @@ -71,9 +71,24 @@ def __init__(self, event):
Attendee, 'Important MAGFest PC Gaming Room Information! *PLEASE READ*', 'lan_room.html',
lambda a: c.LAN in a.interests_ints,
ident='magprime_important_lan_room_info',
needs_approval=True,
sender='MAGFest LAN <[email protected]>')

MarketplaceEmailFixture(
'Your {} {} has been waitlisted'.format(c.EVENT_NAME, c.DEALER_APP_TERM.capitalize()),
'dealers/waitlisted.txt',
lambda g: g.status == c.WAITLISTED,
# query=Group.status == c.WAITLISTED,
needs_approval=True,
ident='dealer_reg_waitlisted')

MarketplaceEmailFixture(
'Your {} {} has been decline'.format(c.EVENT_NAME, c.DEALER_APP_TERM.capitalize()),
'dealers/declined.txt',
lambda g: g.status == c.DECLINED,
# query=Group.status == c.DECLINED,
needs_approval=True,
ident='dealer_reg_declined')

"""
AutomatedEmailFixture(
Attendee, 'MAGFest Tech Ops volunteering', 'techops.txt',
Expand Down
9 changes: 9 additions & 0 deletions magprime/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
from uber.utils import add_opt, check, localized_now, remove_opt


@Session.model_mixin
class AutomatedEmail:
@presave_adjustment
def set_auto_approval(self):
if self.ident in [
'qrcode_for_checkin', 'badge_confirmation_reminder_last_chance', 'under_18_parental_consent_reminder'
]:
self.needs_approval = False

@Session.model_mixin
class PanelApplication:
magscouts_opt_in = Column(Choice(c.PANEL_MAGSCOUTS_OPTS), default=c.NO_CHOICE)
Expand Down
34 changes: 17 additions & 17 deletions magprime/templates/emails/dealers/approved.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
You may do this by <a href="{{ c.URL_BASE }}/preregistration/group_members?id={{ group.id }}">clicking here</a>.
{% endif %}

<br/> <br/><strong>New Tax Information <span style="color:red">*Please Read*</span></strong>
<p>All sellers in the Marketplace are required to obtain a Seller's Permit from the State of Maryland.
To ease the burden on the Comptroller's office for issuing mass permits, we submit the names of our sellers in advance
to ensure everyone has the right documentation; the Comptroller's office then issues the seller's permits directly to
you. In order to make sure we get you your documentation, we need you to fill out
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfxVM_ymIfWbetRfPkLiJmFuIbq-Ap0-W5Xt4xBRxJkHeIMuQ/viewform" target="_blank">this form</a>
no later than December 12th, 2021. After that date, you will need to obtain your own permit,
directions on how to do this can be found here:
<a href="https://tinyurl.com/MAGFestSellers" target="_blank">https://tinyurl.com/MAGFestSellers</a>.
<strong>Finally, if you are multiple Artists or Vendors sharing the same table space through an approved table share or
you applied and were accepted together: then each individual seller *MUST* fill out the form above and get their
exhibitor's affidavit.</strong></p>

<p>TLDR; fill out <a href="https://docs.google.com/forms/d/e/1FAIpQLSfxVM_ymIfWbetRfPkLiJmFuIbq-Ap0-W5Xt4xBRxJkHeIMuQ/viewform" target="_blank">this form</a>
no later than December 12th, 2021. Check your email and/or physical mail for your sellers permit that will be
sent directly from MD Comptroller. ANY and ALL issues regarding receiving your permit must be directed to the
Comptroller's office as we, unfortunately, have no power to help!</p>
<br/> <br/><strong>Tax Information <span style="color:red">*MUST READ*</span></strong>
<p>All sellers in the Marketplace are required to obtain a Seller's Permit from the State of Maryland.
To ease the burden on the Comptroller's office for issuing mass permits, we submit the names & information of our sellers
in advance to ensure everyone has the right documentation; the Comptroller's office then issues the seller's permits
directly to you. Be sure to double check the address on your application and be sure this information is correct for the
Comptroller's office submission.
<strong>Finally, if you are multiple Artists or Vendors sharing the same table space through an approved table share or you
applied and were accepted together: then each individual seller *MUST* provide MAGFest and the Maryland Comptroller their
information above and get their own exhibitor's affidavit.</strong></p>

<p>By paying for your table(s) and assigning your badge(s), you and anyone with badges associated with your table agree to abide
by and follow the below rules and guidelines laid out in the Marketplace Contract. This is non-negotiable, and anyone who does
not follow them will have their tables rescinded immediately with no refund and will have to leave.</p>

<p>Please review the full list of rules for MAGFest Marketplace at
<a href="https://super.magfest.org/marketplace-rules" target="_blank">https://super.magfest.org/marketplace-rules</a>.
All sellers must abide by these rules at all times.</p>

This registration includes:
<ul>
Expand Down
5 changes: 5 additions & 0 deletions magprime/templates/emails/dealers/declined.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Hello {{ group.leader.full_name }},

Thank you for your interest in MAGFest Marketplace. Unfortunately, this year your application for "{{ group.name }}" is being declined. We hope you have a good rest of your day.

~ Marketplace Staff
5 changes: 5 additions & 0 deletions magprime/templates/emails/dealers/waitlisted.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Hello {{ group.leader.full_name }},

Thank you for your interest in MAGFest Marketplace. Unfortunately, due to the large number of applications this year your application for "{{ group.name }}" is being waitlisted. You will be notified if a table becomes available. If you are able to take a last minute (and we mean very last minute) table, please let us know by emailing us at [email protected]. We hope you try applying again in the future. Have a great rest of your day!

~ Marketplace Staff
50 changes: 50 additions & 0 deletions magprime/templates/guest_checklist/guest_merch_deadline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% extends "guest_checklist/merch_deadline.html" %}

{%- set HAS_ROCK_ISLAND = c.ROCK_ISLAND in c.GUEST_MERCHS and guest.group_type in c.ROCK_ISLAND_GROUPS -%}

{% block deadline_text %}
{% if guest.merch_status %}
You have already indicated your merchandise preferences, but you may update them using the link above.
{% else %}
Use the link above to provide details on any merchandise you are bringing to
sell{% if HAS_ROCK_ISLAND %} in 'Rock Island', our volunteer-run merch booth{% endif %}.
{% endif %}
{% endblock %}

{% block form_desc %}
<p>MAGFest will provide access to our Rock Island Merch Department during the event.</p>

<p>
<a href="../static/RockIsland.pdf">
Click here for more info about our Rock Island service!
</a>
</p>
{% endblock %}

{% block form_extra %}
{{ super() }}

<div class="form-group" id="confirm-ri-faq">
<div class="col-sm-9 col-sm-offset-3 checkbox">
{{ macros.toggle_checkbox(
'#save-merch-button',
'I acknowledge that I have read & understood the <a href="../static/RockIsland.pdf">Rock Island FAQ</a>, including the hours and policies.'|safe,
suffix='_agreed_ri_faq',
mode='#save-merch-button',
hide_on_checked=False,
checked=agreed_to_ri_faq) }}
</div>
</div>

<script>
var showOrRIFaq = function() {
setVisible('#confirm-ri-faq', $.val('selling_merch') === {{ c.ROCK_ISLAND }});
$('#save-merch-button').prop('disabled', $.val('selling_merch') === {{ c.ROCK_ISLAND }} && !$('#toggle_visibility_agreed_ri_faq').prop('checked'));
};
$(function () {
$("[name='selling_merch'] option[value='{{ c.OWN_TABLE }}']").remove();
showOrRIFaq();
$.field('selling_merch').on('change', showOrRIFaq);
});
</script>
{% endblock %}
43 changes: 0 additions & 43 deletions magprime/templates/regextra.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,10 @@
if ($.field('payment_method')) {
$('#price_explanation').insertAfter($.field('payment_method').parents('.form-group'));
}
if ($.field('comments')) {
$.field('comments').parents('.form-group').hide();
}

if ($.field('found_how')) {
$.field('found_how').parents('.form-group').hide();
}

if ($.field('shirt')) {
$('.season-row').insertAfter($.field('shirt').parents('.form-group'));
}
if ($.field('onsite_contact')) {
$.field('onsite_contact').parents('.form-group').find('.control-label').text('MAGBuddy');
}
if ($('#extra_donation')) {
$('#extra_donation .control-label span').text('Superstar Donation');
{% if not is_prereg_dealer and not admin_area %}$('#extra_donation').prepend('<img class="center-block" width="100%" src="{{ c.URL_BASE }}/static/theme/superstar.png" width="400" alt="Become a Superstar" />');{% endif %}
$('#extra_donation p.help-block').html(
'<p>Become a MAGFest Superstar! With a donation of $30 (or <i>more</i> &#128558;), you’ll receive a number of exclusive (and mostly pointless!) perks, earning a coveted spot on our Superstars Squad. <a href="https://super.magfest.org/superstars" target="_blank">Click here to learn more</a> (and to see the absolute BS perks you get for a donation of $420 and $1337).</p>' +
'<strong>Remember!</strong> MAGFest, Inc. is a 501(c)(3) charitable organization, so your donation is tax-deductible! <strong>Donations are not merch packages and do not come with merchandise.</strong> Please only donate if you are in a financial position to do so—we thank you for your help!'
);
$('#extra_donation_preselect').insertBefore($('#extra_donation .input-group'));

$('input[name="superstar_opts"]').change( function() {
if($(this).val() == -1) {
$('input[name="extra_donation"').focus();
return false;
}

var currentVal = $('input[name="extra_donation"').val();
var newVal = $(this).val() == 0 ? '' : $(this).val();
if (currentVal != newVal) {
$('input[name="extra_donation"').val(newVal).trigger('blur');
}
});
$('input[name="extra_donation"').on('blur', function() {
var extraDonationVal = $(this).val();
$('input[name="superstar_opts"]').each(function() {
if ($(this).val() == extraDonationVal) {
$(this).click();
return false;
}
})

$('input[name="superstar_opts"][value=-1]').click();
})
}
{% if not attendee.group and not attendee.promo_code_group and not is_prereg_dealer %}
if ($.field('group_name')) {
$.field('group_name').parents('.form-group').insertAfter($('label[for="legal_name"]').parents('.form-group'));
Expand Down

0 comments on commit 2ec5b33

Please sign in to comment.