Skip to content

Add more nuanced premium perk ineligible tooltips #11342

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 10 additions & 2 deletions app/views/events/promotions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
<span class="flex-grow">Jukebox</span>
<span class="badge bg-muted mr-5" style="font-size: 15px; padding: 8px 14px;">Premium</span>
</h3>
<% if (!@perks_available || [email protected]_by_teenagers? || @event.users.count { |user| user.teenager? && user.active? } < 10) %>
<div class="tooltipped tooltipped--w inline-block" aria-label="Must have at least 10 active teenagers">
<% if !@perks_available %>
<div class="tooltipped tooltipped--w inline-block" aria-label="User must be manager and org must not be HQ-affiliated">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div class="tooltipped tooltipped--w inline-block" aria-label="User must be manager and org must not be HQ-affiliated">
<div class="tooltipped tooltipped--w inline-block" aria-label="User must be manager and organization must not be HQ-affiliated">

Also - we should split these into two scenarios. "HQ-affiliated" isn't something every user will be familiar with.

<span class="btn disabled promo-premium-header bg-clip-padding">Ineligible</span>
</div>
<% elsif [email protected]_by_teenagers? %>
<div class="tooltipped tooltipped--w inline-block" aria-label="Org must be teen-led">
<span class="btn disabled promo-premium-header bg-clip-padding">Ineligible</span>
</div>
<% elsif @event.users.count { |user| user.teenager? && user.active? } < 10 %>
<div class="tooltipped tooltipped--w inline-block" aria-label="Org must have 10 or more active teens">
<span class="btn disabled promo-premium-header bg-clip-padding">Ineligible</span>
</div>
<% else %>
Expand Down
Loading