effective_events 0.12.0 → 0.12.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: 5ea3b86b0a1ca6c11ee6a2a9ee5fba8dec34473c435299bed967cf129912b0dc
4
- data.tar.gz: 1164dce2a11f7a65e95c113d2ef9f3f0c254da666c206dbba67b7729e441953f
3
+ metadata.gz: 489d11bf3227576141f53363ed941b1b606915b64a8d7ce234fd084d8497eafb
4
+ data.tar.gz: c2e8a39859a284a609f8d6fb2e6a54ccbacf2191a0cecf3ea3407442e14865e3
5
5
  SHA512:
6
- metadata.gz: f9c4899dfc735f56d2b34889f8905b4315dcbf59ab9a9967154ac1f8eb9a0d210982cf21d551a7d0076eeac4ec4ca6ddbaf5d1ba384257e542a5b6d6d32d22e3
7
- data.tar.gz: ec2ed614931b908976b4abb959e9f69d4c16de58b8cafc1cc22223d1a2061fb847500e254a391dba162b5a6065b1faf00065a1be569789c8a344be6bbcaf9c29
6
+ metadata.gz: 91b44a32a36e0d1ba81c1addb51978dddafa5e64fa5c13c927f96a8ebb753f8deb17c11e581af64976f8e9cac31612f7ec2558b5c49741cd5d441b18131c7ecf
7
+ data.tar.gz: 1c389debc53eb354b4e8734ce257bfb4d4f18a8e162e0c2f90c397bbd425318adc849cd4ba8e4e35708b61de8126ce800ca055dffb7960f4e05d5eb338b41e9d
@@ -16,7 +16,7 @@ module Effective
16
16
  # If the event is no longer registerable, do not let them continue
17
17
  def redirect_unless_registerable
18
18
  return if resource.blank?
19
- return if resource.submitted?
19
+ return if resource.was_submitted?
20
20
  return if resource.event.blank?
21
21
  return if resource.event.registerable?
22
22
  return if resource.submit_order&.deferred?
@@ -26,7 +26,7 @@ module Admin
26
26
 
27
27
  col :purchased_order, visible: false
28
28
 
29
- col :user
29
+ col :user, label: 'Member'
30
30
  col :first_name
31
31
  col :last_name
32
32
  col :email
@@ -20,7 +20,7 @@ class EffectiveEventRegistrantsDatatable < Effective::Datatable
20
20
  ].compact.join('<br>').html_safe
21
21
  end
22
22
 
23
- col :user, visible: false
23
+ col :user, label: 'Member', visible: false
24
24
  col :first_name, visible: false
25
25
  col :last_name, visible: false
26
26
  col :email, visible: false
@@ -24,7 +24,9 @@ class EffectiveEventRegistrationsDatatable < Effective::Datatable
24
24
  if er.draft?
25
25
  dropdown_link_to('Continue', effective_events.event_event_registration_build_path(er.event, er, er.next_step), 'data-turbolinks' => false)
26
26
  dropdown_link_to('Delete', effective_events.event_event_registration_path(er.event, er), 'data-confirm': "Really delete #{er}?", 'data-method': :delete)
27
- else
27
+ elsif er.submitted?
28
+ dropdown_link_to('Continue', effective_events.event_event_registration_build_path(er.event, er, er.next_step), 'data-turbolinks' => false)
29
+ elsif er.completed?
28
30
  dropdown_link_to('Show', effective_events.event_event_registration_path(er.event, er))
29
31
 
30
32
  # Register Again
@@ -32,7 +34,6 @@ class EffectiveEventRegistrationsDatatable < Effective::Datatable
32
34
  url = er.event.external_registration_url.presence || effective_events.new_event_event_registration_path(er.event)
33
35
  dropdown_link_to('Register Again', url)
34
36
  end
35
-
36
37
  end
37
38
  end
38
39
  end
@@ -125,6 +125,10 @@ module EffectiveEventsEventRegistration
125
125
  # If we're submitted. Try to move to completed.
126
126
  before_save(if: -> { submitted? }) { try_completed! }
127
127
 
128
+ def payment_date_in_future?
129
+ false
130
+ end
131
+
128
132
  def can_visit_step?(step)
129
133
  return false if step == :complete && !completed?
130
134
  return true if step == :complete && completed?
@@ -216,7 +220,7 @@ module EffectiveEventsEventRegistration
216
220
  first_name: owner.try(:first_name),
217
221
  last_name: owner.try(:last_name),
218
222
  email: owner.try(:email),
219
- company: owner.try(:company),
223
+ company: owner.try(:company)
220
224
  )
221
225
  end
222
226
 
@@ -241,9 +245,7 @@ module EffectiveEventsEventRegistration
241
245
  def unavailable_event_tickets
242
246
  unavailable = []
243
247
 
244
- changed_event_registrants = present_event_registrants.select { |er| er.new_record? || er.event_ticket_id_changed? }
245
-
246
- changed_event_registrants.map(&:event_ticket).group_by { |t| t }.each do |event_ticket, event_tickets|
248
+ present_event_registrants.map(&:event_ticket).group_by { |t| t }.each do |event_ticket, event_tickets|
247
249
  unavailable << event_ticket unless event.event_ticket_available?(event_ticket, quantity: event_tickets.length)
248
250
  end
249
251
 
@@ -253,9 +255,7 @@ module EffectiveEventsEventRegistration
253
255
  def unavailable_event_products
254
256
  unavailable = []
255
257
 
256
- changed_event_products = present_event_addons.select { |er| er.new_record? || er.event_product_id_changed? }
257
-
258
- changed_event_products.map(&:event_product).group_by { |p| p }.each do |event_product, event_products|
258
+ present_event_addons.map(&:event_product).group_by { |p| p }.each do |event_product, event_products|
259
259
  unavailable << event_product unless event.event_product_available?(event_product, quantity: event_products.length)
260
260
  end
261
261
 
@@ -44,7 +44,7 @@ module Effective
44
44
  qb_item_name :string
45
45
  tax_exempt :boolean
46
46
 
47
- # Historical. Not used anymore.
47
+ # Historical. Not used anymore. TO BE DELETED.
48
48
  number :string
49
49
  notes :text
50
50
 
@@ -1,5 +1,5 @@
1
1
  - if ticket.questions.present?
2
- %p Please answer the following questions:
2
+ %p Please answer the following questions (optional):
3
3
 
4
4
  - if ticket.question1.present?
5
5
  = f.text_field :response1, label: ticket.question1
@@ -40,7 +40,7 @@
40
40
  %br
41
41
  = @event.registration_end_at.strftime("%b %d, %Y %I:%M%P")
42
42
 
43
- - if @event.event_tickets.present? #|| @event.event_products.present?
43
+ - if @event.event_tickets.present?
44
44
  %ul.list-unstyled
45
45
  - if @event.event_tickets.present?
46
46
  %li
@@ -50,14 +50,6 @@
50
50
  - @event.event_tickets.each do |ticket|
51
51
  %li= "#{ticket} (#{effective_events_ticket_price(@event, ticket)})"
52
52
 
53
- -# - if @event.event_products.present?
54
- -# %li
55
- -# %label Add-ons
56
- -# %br
57
- -# %ul
58
- -# - @event.event_products.each do |product|
59
- -# %li= "#{product} (#{price_to_currency(product.price)})"
60
-
61
53
  %hr
62
54
 
63
55
  %label.mb-2 Upcoming Events
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.12.0'.freeze
2
+ VERSION = '0.12.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect