effective_events 0.20.0 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaa9c21f0fef7ddb63d6ed3eead8cef3e567d56adca7086a450edd80f17c52d9
4
- data.tar.gz: '05839b258bb697ee0320b4137c307ae89cc1c930e5d1a684f12dcf21f686e748'
3
+ metadata.gz: 28f5c7415e3b84908b2656bbd58cf74e202b924086f0c735b640063ab2bfca2d
4
+ data.tar.gz: c8cd136cfdfba553ddaf73c63d977d883486e72a775630fbcd85778baa38a4c7
5
5
  SHA512:
6
- metadata.gz: bbaf326950e23dbf0052418436863a79b87628c7dd6cfd79bf57eeb884fb9b6be4a3088b490620a98568c610068048f25844eb9f866bf255cadf2f1d02761bde
7
- data.tar.gz: 82199ab2e8c26b8f6fbfc4ad3b27f2865b1a64d3ffca1a565d7866c02447a7f41b508a83177ff7fbab6e063774dc732dedd7624e014bc193b7d96a11f3c24658
6
+ metadata.gz: 6d515ddf50f3e622c92af47f17cb69cd4315da25001e7c236c0f98bb05b068ad3a19db2611ab66e58f461982a691ca7601cc473ad98a596fc41d07bab73ac198
7
+ data.tar.gz: 7481e857dbc9bd01a2b1b192b3115cb0e8385e93ad4e011f060311d7432ff6cd7804f788657b0525550bc4200367a1e14e31321a95aaca3b15b6028505bc8d23
@@ -2,6 +2,7 @@ module Admin
2
2
  class EffectiveEventRegistrantsDatatable < Effective::Datatable
3
3
  filters do
4
4
  scope :unarchived, label: "All"
5
+ scope :registered
5
6
  scope :purchased
6
7
  scope :deferred
7
8
  scope :not_purchased
@@ -56,7 +57,7 @@ module Admin
56
57
  end
57
58
 
58
59
  col :user, label: 'Member', visible: false
59
- col :member_or_non_member_choice, visible: false
60
+ col :organization, visible: false
60
61
 
61
62
  col :orders, visible: false
62
63
  col :price, as: :price
@@ -133,10 +133,10 @@ module EffectiveEventsEventRegistration
133
133
 
134
134
  # Validate the same registrant user isn't being registered twice
135
135
  validate(if: -> { current_step == :details }) do
136
- present_event_registrants.group_by { |er| er.user }.each do |user, event_registrants|
136
+ present_event_registrants.group_by { |er| [er.user, er.event_ticket] }.each do |(user, event_ticket), event_registrants|
137
137
  if user.present? && event_registrants.length > 1
138
- errors.add(:base, "Unable to register #{user} more than once")
139
- event_registrants.each { |er| er.errors.add(:user_id, "cannot be registered more than once") }
138
+ errors.add(:base, "Unable to register #{user} for #{event_ticket} more than once")
139
+ event_registrants.each { |er| er.errors.add(:user_id, "cannot be registered for #{event_ticket} more than once") }
140
140
  end
141
141
  end
142
142
  end
@@ -316,6 +316,8 @@ module EffectiveEventsEventRegistration
316
316
  def tickets!
317
317
  assign_attributes(current_step: :tickets) # Ensure the unavailable tickets validations are run
318
318
 
319
+ reset_all_wizard_steps_after(:tickets) unless was_submitted?
320
+
319
321
  update_event_registrants
320
322
  select_event_registrants
321
323
  waitlist_event_registrants
@@ -115,7 +115,7 @@ module Effective
115
115
  validates :email, email: true
116
116
 
117
117
  # This works for persisted and adding a new one. But not adding two at same time in a registration
118
- validates :user_id, uniqueness: { scope: [:event_id], allow_blank: true, message: 'is already registered for this event' }
118
+ validates :user_id, uniqueness: { scope: [:event_ticket_id], allow_blank: true, message: 'is already registered for this event ticket' }
119
119
 
120
120
  # First name, last name and email are always required fields on details
121
121
  validates :first_name, presence: true, if: -> { registrant_validations_enabled? }
@@ -5,7 +5,7 @@
5
5
  - if resource.display_countdown?
6
6
  .mt-4
7
7
 
8
- = card do
9
- %p Your tickets are reserved until #{resource.selected_expires_at.strftime("%I:%M%P %Z")}
8
+ .alert.alert-warning
9
+ Your tickets are reserved until #{resource.selected_expires_at.strftime("%l:%M%P %Z")}
10
10
 
11
11
  .col-lg-9.mb-3= yield
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.20.0'.freeze
2
+ VERSION = '0.20.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails