Skip to content

Commit

Permalink
when zero seats for a particular vouchertype remain, do not show a po…
Browse files Browse the repository at this point in the history
…pup menu at all in patron view
  • Loading branch information
armandofox committed Dec 2, 2023
1 parent 91af572 commit e5ac02b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/store/_ticket_menus.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@
%label.col-form-label.form-control-sm.alert-warning.s-explain= v.explanation
- else
- num_allowed = v.min_and_max_sales_for_this_txn(max_choices = 20)
= select_tag(fieldname, options_for_select(num_allowed), 'data-price' => v.price, 'data-zone' => v.zone_short_name, :class => "itemQty #{ticket_class} form-control form-control-sm col-sm-1")
- if num_allowed.last.zero?
%span.text-info.col-sm-7.border.border-danger.s-explain No seats remaining for tickets of this type
%span.text-info.col-sm-4.border.border-danger.s-explain No seats remaining for tickets of this type
- else
= select_tag(fieldname, options_for_select(num_allowed), 'data-price' => v.price, 'data-zone' => v.zone_short_name, :class => "itemQty #{ticket_class} form-control form-control-sm col-sm-1")
= hidden_field_tag "price[#{v.id}]", v.price, {:id => "valid_voucher_#{v.id}_price"}

- if ! @store.valid_vouchers.empty? && [email protected]?
Expand Down

0 comments on commit e5ac02b

Please sign in to comment.