effective_events 3.2.10 → 3.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_events_event_registration.rb +26 -6
- data/app/views/effective/event_registrations/_changing.html.haml +1 -1
- data/app/views/effective/event_registrations/_form_blank_registrants.html.haml +3 -0
- 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: 39f87bb39300369b64de5ed4dd6e7380fc949c1f9afd6e3b8f3a23eabedfa0f1
|
|
4
|
+
data.tar.gz: db3aa1963b120e1cbd0b5ef3048d7ff0f18cf3266b536fbf54ea65c681cb9df4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3380ffbfdf73d7967dde94dcab2dca97a76b81de0672d4a773ff08930e8a1da4282a9900f0d4d0b6ae60d62394192d14bd0687fd713cbfc5443ee72f0127b824
|
|
7
|
+
data.tar.gz: dfbf439c5b2b53a7c8b8e79036a9a0d5f889449f5669558e9cab457cd7ef6bd939f97bb4b9a796d4128d1b7d38f298bd8d5204040915bc73eac0ea14f56740b3
|
|
@@ -22,6 +22,16 @@ module EffectiveEventsEventRegistration
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
included do
|
|
25
|
+
|
|
26
|
+
# This has to go before acts_as_purchasable_parent
|
|
27
|
+
before_destroy(if: -> { was_submitted? }) do
|
|
28
|
+
if event_registrants.any? { |er| er.registered? && !er.waitlisted_not_promoted? && er.event_ticket.capacity_available == 0 }
|
|
29
|
+
send_event_capacity_released_email!
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
true
|
|
33
|
+
end
|
|
34
|
+
|
|
25
35
|
acts_as_purchasable_parent
|
|
26
36
|
acts_as_tokened
|
|
27
37
|
|
|
@@ -135,7 +145,7 @@ module EffectiveEventsEventRegistration
|
|
|
135
145
|
validate(if: -> { current_step == :tickets }) do
|
|
136
146
|
unavailable_event_tickets.each do |event_ticket|
|
|
137
147
|
errors.add(:base, "The requested number of #{event_ticket} tickets are not available")
|
|
138
|
-
event_ticket_selections.find { |ets| ets.event_ticket == event_ticket }
|
|
148
|
+
event_ticket_selections.find { |ets| ets.event_ticket == event_ticket }&.errors&.add(:quantity, "not available")
|
|
139
149
|
end
|
|
140
150
|
end
|
|
141
151
|
|
|
@@ -408,10 +418,14 @@ module EffectiveEventsEventRegistration
|
|
|
408
418
|
def waitlist_event_registrants
|
|
409
419
|
present_event_registrants.group_by { |er| er.event_ticket }.each do |event_ticket, event_registrants|
|
|
410
420
|
if event_ticket.waitlist?
|
|
411
|
-
existing = event_registrants.find { |er| er.persisted? && er.waitlisted_not_promoted? }
|
|
421
|
+
existing = event_registrants.find { |er| er.persisted? && er.waitlisted_not_promoted? }.present?
|
|
412
422
|
capacity = event.capacity_available(event_ticket: event_ticket, event_registration: self)
|
|
413
423
|
|
|
414
|
-
|
|
424
|
+
# Count already-registered non-waitlisted registrants in this registration
|
|
425
|
+
registered = event_registrants.count { |er| er.registered? && !er.waitlisted? }
|
|
426
|
+
available = [capacity - registered, 0].max
|
|
427
|
+
|
|
428
|
+
event_registrants.reject(&:registered?).each_with_index { |er, index| er.assign_attributes(waitlisted: (existing || index >= available)) }
|
|
415
429
|
else
|
|
416
430
|
event_registrants.each { |er| er.assign_attributes(waitlisted: false) }
|
|
417
431
|
end
|
|
@@ -434,7 +448,12 @@ module EffectiveEventsEventRegistration
|
|
|
434
448
|
|
|
435
449
|
after_commit do
|
|
436
450
|
update_submit_fees_and_order! if submit_order.present?
|
|
437
|
-
|
|
451
|
+
|
|
452
|
+
if submit_order&.deferred?
|
|
453
|
+
update_deferred_event_registration!
|
|
454
|
+
send_order_emails!
|
|
455
|
+
end
|
|
456
|
+
|
|
438
457
|
send_event_capacity_released_email! if send_event_capacity_released_email
|
|
439
458
|
end
|
|
440
459
|
|
|
@@ -493,8 +512,9 @@ module EffectiveEventsEventRegistration
|
|
|
493
512
|
|
|
494
513
|
# Find or build
|
|
495
514
|
def event_ticket_selection(event_ticket:, quantity: 0)
|
|
496
|
-
selection = event_ticket_selections.find { |ets| ets.event_ticket == event_ticket }
|
|
497
|
-
selection
|
|
515
|
+
selection = event_ticket_selections.find { |ets| ets.event_ticket == event_ticket } || event_ticket_selections.build(event_ticket: event_ticket)
|
|
516
|
+
selection.assign_attributes(quantity: quantity)
|
|
517
|
+
selection
|
|
498
518
|
end
|
|
499
519
|
|
|
500
520
|
# This builds the default event addons used by the wizard form
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- if resource.submitted? && resource.event&.delayed_payment_date_upcoming?
|
|
1
|
+
- if resource.submitted? && resource.event&.delayed_payment_date_upcoming? && !resource.was_submitted?
|
|
2
2
|
.alert.alert-warning.mb-4 Please note: you must submit each step and checkout for your ticket changes to be saved. You will receive a new confirmation email.
|
|
3
3
|
|
|
4
4
|
- if resource.display_countdown?
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
- else
|
|
22
22
|
= effective_events_ticket_prices(event, event_ticket)
|
|
23
23
|
|
|
24
|
+
- if event_registrant.waitlisted_not_promoted?
|
|
25
|
+
%span.badge.badge-warning Waitlist
|
|
26
|
+
|
|
24
27
|
= fr.check_box :blank_registrant, label: "I will return and add this ticket's information later"
|
|
25
28
|
|
|
26
29
|
= fr.show_if(:blank_registrant, false) do
|
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: 3.2.
|
|
4
|
+
version: 3.2.12
|
|
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:
|
|
11
|
+
date: 2026-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|