effective_events 2.29.2 → 2.29.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c5cab2a4f52670bdb757aadfb5e3d0d8c2c2fcc5ace2a4767d0493c89c245b3
4
- data.tar.gz: eb553379563b38a9d25a90169a443ad100c29f2ded09331763c0472ed3596e90
3
+ metadata.gz: 5fe803195a47b89ebfbef90c0273828a1a463864b34c97eee1d1845bd0802d9d
4
+ data.tar.gz: 13e3440736211a77566adaf6824d83f3372eec0b1f9b04757256cd72c3acecc8
5
5
  SHA512:
6
- metadata.gz: 17da816f22e61e8a3d3235aeab9e737c60b6ab94c6616a9ad394da62996e4aff9d17e69409fdebc3da719b0514156e3cb19941838d6a612a61878fa47908f5c6
7
- data.tar.gz: 0b5191245dd117b9a5b1a5f9fb1350d839f6a56053116fbfbe098315fcf6dd40a82be974f9c8be2a56912b40bd33f9f59ae1cddd410fd623ce173843afb0343d
6
+ metadata.gz: 3feee602decdd8cab6a09cfbb3f2188466ad1854576891415b731c59ec31f88ce7f35a5b6541366d008f3a08a707efdc2d99f601e3e76d1abc246b59aa53bccf
7
+ data.tar.gz: c59ff8cb25b345807ce274d35ae620a6430dc162105277749e361f21f7963bc48ca11576541d5cded0f860bcb4c93466114dac170be699d46fd7c03788ecb76f
@@ -31,6 +31,7 @@ module Effective
31
31
  return if resource.was_submitted?
32
32
  return if resource.event.blank?
33
33
  return if resource.selection_not_expired?
34
+ return if resource.orders.any? { |order| order.declined? && order.delayed? }
34
35
 
35
36
  resource.ticket_selection_expired!
36
37
 
@@ -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
@@ -50,8 +50,10 @@
50
50
  = f.show_if_any(:category, ['Member Only', 'Member or Non-Member']) do
51
51
  = f.price_field :member_price, hint: 'A price of $0 will allow a checkout for free when selecting a member.'
52
52
 
53
- .row
54
- .col-md-6= qb_item_name_field(f)
53
+ - if EffectiveOrders.use_item_names?
54
+ .row
55
+ .col-md-6= qb_item_name_field(f)
56
+
55
57
  = f.check_box :tax_exempt, label: "Yes, this #{etd(f.object)} is tax exempt"
56
58
  = f.check_box :archived, label: 'Archive this ticket. While archived, it cannot be purchased by users but registrants can only be added by an admin.'
57
59
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '2.29.2'.freeze
2
+ VERSION = '2.29.4'.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: 2.29.2
4
+ version: 2.29.4
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-05 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails