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 +4 -4
- data/app/controllers/effective/event_registrations_controller.rb +1 -1
- data/app/datatables/admin/effective_event_registrants_datatable.rb +1 -1
- data/app/datatables/effective_event_registrants_datatable.rb +1 -1
- data/app/datatables/effective_event_registrations_datatable.rb +3 -2
- data/app/models/concerns/effective_events_event_registration.rb +7 -7
- data/app/models/effective/event_registrant.rb +1 -1
- data/app/views/effective/event_registrants/_fields_questions.html.haml +1 -1
- data/app/views/effective/events/show.html.haml +1 -9
- data/lib/effective_events/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 489d11bf3227576141f53363ed941b1b606915b64a8d7ce234fd084d8497eafb
|
4
|
+
data.tar.gz: c2e8a39859a284a609f8d6fb2e6a54ccbacf2191a0cecf3ea3407442e14865e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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?
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
|
@@ -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?
|
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
|