effective_events 0.20.1 → 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28f5c7415e3b84908b2656bbd58cf74e202b924086f0c735b640063ab2bfca2d
|
4
|
+
data.tar.gz: c8cd136cfdfba553ddaf73c63d977d883486e72a775630fbcd85778baa38a4c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d515ddf50f3e622c92af47f17cb69cd4315da25001e7c236c0f98bb05b068ad3a19db2611ab66e58f461982a691ca7601cc473ad98a596fc41d07bab73ac198
|
7
|
+
data.tar.gz: 7481e857dbc9bd01a2b1b192b3115cb0e8385e93ad4e011f060311d7432ff6cd7804f788657b0525550bc4200367a1e14e31321a95aaca3b15b6028505bc8d23
|
@@ -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: [:
|
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
|
-
|
9
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|