effective_events 2.29.3 → 2.29.5
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/controllers/effective/event_registrations_controller.rb +3 -0
- data/app/models/concerns/effective_events_event_registration.rb +33 -0
- data/app/views/effective/event_registrations/checkout.html.haml +3 -0
- data/app/views/effective/event_registrations/submitted.html.haml +8 -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: c14e31c639caed97a4e6f5b15206e6da6734c97a5cd60af0aebcc654ac41fc8a
|
4
|
+
data.tar.gz: 2f9ec428eb3d1794f77b8ed757af584c3323e98c75e6040e2d64994ba70ed303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 985572039dc88d35c6e339acfbf38fac38e6d96b388210ed2f6f416a3c215fd1acbf35dd8a3f1991ca622cfc75e8a3d818377faa636dc432a13226baaf3162de
|
7
|
+
data.tar.gz: 499e41790fd28b1c6d74af26bcfca71c76fc1256a8fe4280982e8072dcaa0b0150bc2f05d30bd33b583ac388a17f22e9aeb6b4bb97cc4055dffa5788ec3c0e01
|
@@ -21,6 +21,7 @@ module Effective
|
|
21
21
|
return if resource.event.blank?
|
22
22
|
return if resource.submit_order&.deferred?
|
23
23
|
return if resource.event.registerable? && !resource.event.sold_out?(except: resource)
|
24
|
+
return if resource.just_let_them_edit_tickets_and_register_anyway?
|
24
25
|
|
25
26
|
flash[:danger] = "Your selected event is not available for registration. This event registration not available."
|
26
27
|
return redirect_to(view_context.return_to_dashboard_path)
|
@@ -31,6 +32,8 @@ module Effective
|
|
31
32
|
return if resource.was_submitted?
|
32
33
|
return if resource.event.blank?
|
33
34
|
return if resource.selection_not_expired?
|
35
|
+
return if resource.orders.any? { |order| order.declined? && order.delayed? }
|
36
|
+
return if resource.just_let_them_edit_tickets_and_register_anyway?
|
34
37
|
|
35
38
|
resource.ticket_selection_expired!
|
36
39
|
|
@@ -167,6 +167,14 @@ module EffectiveEventsEventRegistration
|
|
167
167
|
return false if step == :complete && !completed?
|
168
168
|
return true if step == :complete && completed?
|
169
169
|
|
170
|
+
if draft? && orders.any? { |order| order.declined? && order.delayed? }
|
171
|
+
return [:billing, :checkout].include?(step)
|
172
|
+
end
|
173
|
+
|
174
|
+
if submitted? && submit_order&.declined?
|
175
|
+
return [:billing, :checkout, :submitted].include?(step)
|
176
|
+
end
|
177
|
+
|
170
178
|
# If submitted with a cheque/phone deferred (but not delayed) processor then lock down the steps.
|
171
179
|
if submitted? && !delayed_payment_date_upcoming?
|
172
180
|
return (step == :submitted)
|
@@ -218,6 +226,24 @@ module EffectiveEventsEventRegistration
|
|
218
226
|
true
|
219
227
|
end
|
220
228
|
|
229
|
+
# Ready to check out
|
230
|
+
# This is called by the "ready_checkout" before_action in wizard_controller/before_actions.rb
|
231
|
+
# We have to handle the edge case where a delayed payment was declined
|
232
|
+
# Because we use submitted & completed here instead of submitted as our exit state, it's a bit weird
|
233
|
+
def ready!
|
234
|
+
without_current_step do
|
235
|
+
if submitted? && submit_order&.declined?
|
236
|
+
build_submit_fees_and_order(force: true)
|
237
|
+
wizard_steps.delete(:checkout)
|
238
|
+
wizard_steps.delete(:submitted)
|
239
|
+
unsubmitted!
|
240
|
+
else
|
241
|
+
build_submit_fees_and_order
|
242
|
+
save!
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
221
247
|
def after_submit_deferred!
|
222
248
|
update_deferred_event_registration!
|
223
249
|
send_event_registration_confirmation!
|
@@ -230,6 +256,8 @@ module EffectiveEventsEventRegistration
|
|
230
256
|
notifications.each { |notification| notification.notify!(event_registrants: event_registrants) }
|
231
257
|
|
232
258
|
send_event_registration_confirmation! unless submit_order&.delayed? || submit_order&.deferred?
|
259
|
+
|
260
|
+
true
|
233
261
|
end
|
234
262
|
end
|
235
263
|
|
@@ -250,6 +278,7 @@ module EffectiveEventsEventRegistration
|
|
250
278
|
return false if done?
|
251
279
|
return false unless selected_at.present?
|
252
280
|
return false unless current_step.present?
|
281
|
+
return false if draft? && orders.any? { |order| order.declined? && order.delayed? }
|
253
282
|
|
254
283
|
[:start, :tickets, :submitted, :complete].exclude?(current_step)
|
255
284
|
end
|
@@ -493,6 +522,10 @@ module EffectiveEventsEventRegistration
|
|
493
522
|
EffectiveEvents.send_email(:event_registration_confirmation, self)
|
494
523
|
end
|
495
524
|
|
525
|
+
def just_let_them_edit_tickets_and_register_anyway?
|
526
|
+
false
|
527
|
+
end
|
528
|
+
|
496
529
|
private
|
497
530
|
|
498
531
|
def update_deferred_event_registration!
|
@@ -4,6 +4,9 @@
|
|
4
4
|
|
5
5
|
- if resource.submit_order.deferred?
|
6
6
|
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
7
|
+
- elsif resource.just_let_them_edit_tickets_and_register_anyway?
|
8
|
+
= card do
|
9
|
+
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
|
7
10
|
- elsif resource.event.registerable? == false
|
8
11
|
.alert.alert-danger Your selected event is no longer available for registration.
|
9
12
|
- elsif resource.unavailable_event_tickets.present?
|
@@ -12,6 +12,14 @@
|
|
12
12
|
|
13
13
|
= render 'effective/event_registrations/summary', event_registration: resource
|
14
14
|
|
15
|
+
- # This should only happen with a delayed order that was then declined
|
16
|
+
- if resource.submit_order&.declined?
|
17
|
+
= card do
|
18
|
+
%h3 Declined
|
19
|
+
%p Your card was declined by the payment processor: #{resource.submit_order.declined_reason}
|
20
|
+
%p Please try again.
|
21
|
+
%p= link_to('Click here to checkout again', wizard_path(:checkout))
|
22
|
+
|
15
23
|
- if resource.event.allow_blank_registrants? && EffectiveResources.authorized?(self, :update_blank_registrants, resource)
|
16
24
|
= card do
|
17
25
|
%h3 Incomplete Ticket Information
|
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: 2.29.
|
4
|
+
version: 2.29.5
|
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: 2025-02-
|
11
|
+
date: 2025-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|