effective_events 0.20.1 → 0.20.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_events_event_registration.rb +5 -3
- data/app/models/effective/event_addon.rb +4 -2
- data/app/models/effective/event_registrant.rb +1 -1
- data/app/views/admin/event_addons/_form.html.haml +4 -1
- data/app/views/effective/event_registrations/_layout.html.haml +2 -2
- data/lib/effective_events/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0709b951c8c62ef98e05483a64c07f02c4f324e598a38fe248e53cf46505e0e7'
|
4
|
+
data.tar.gz: cccb708e60d917e8a52ca2da3933c145db3dd316835eaab493fa4fc3d62eef70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a26c1676942e725de1f158c1763a7163f119fa12873e7bec523094aba5c62a82e0327bf91df00003a74d20f8bb326246205aad0bc337fd69608852cba1dc0cd
|
7
|
+
data.tar.gz: '0882344df168c99d2a767eac559a4865e5f12f0e6c96759f7cfafa7b1f3e4c6e2d5ae9745e8ba3abf65576613f32936878ded5289fd57c88125f825431298c66'
|
@@ -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
|
@@ -94,8 +94,10 @@ module Effective
|
|
94
94
|
|
95
95
|
save!
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
unless registered?
|
98
|
+
order = Effective::Order.new(items: self, user: owner)
|
99
|
+
order.purchase!(skip_buyer_validations: true, email: false)
|
100
|
+
end
|
99
101
|
|
100
102
|
true
|
101
103
|
end
|
@@ -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.3
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|