Skip to content

Commit

Permalink
Display full display name for non-admissions type
Browse files Browse the repository at this point in the history
T-shirt sizes are in parentheses, and it's not very useful telling the shop to
just issue an arbitrary size t-shirt if we're trying to do stock control.
  • Loading branch information
lukegb committed May 30, 2024
1 parent 77daec4 commit 2661d6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ def is_adult_ticket(self) -> bool:

@property
def checkin_display_name(self):
if self.parent.type != "admissions":
return self.display_name
return re.sub(r" \(.*\)", "", self.display_name)

def get_price_tier(self, name):
Expand Down
4 changes: 2 additions & 2 deletions templates/arrivals/checkin.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h3>Transferred purchases</h3>
{% for purchase in transferred_purchases %}
<tr>
<td class="hidden-xs">{{ purchase.id }}</td>
<td>{{ purchase.product.display_name }}</td>
<td>{{ purchase.product.checkin_display_name }}</td>
<td><a href="{{ url_for('.checkin', user_id=purchase.owner.id) }}">{{ purchase.owner.name }}</a></td>
<td>
{%- if purchase.redeemed %}
Expand Down Expand Up @@ -153,7 +153,7 @@ <h3>Other purchases</h3>
{% for purchase in other_purchases %}
<tr>
<td class="hidden-xs">{{ purchase.id }}</td>
<td>{{ purchase.product.display_name }}</td>
<td>{{ purchase.product.checkin_display_name }}</td>
<td>
{%- if purchase.redeemed %}
Redeemed {{ purchase.redemption_version().transaction.issued_at.strftime('%A %H:%M') }}
Expand Down

0 comments on commit 2661d6e

Please sign in to comment.