effective_events 0.14.0 → 0.14.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 418833792fdacf3ee145ead72e1bac6aee5933e9ca8eaad3cf26afc589ec8e3b
|
4
|
+
data.tar.gz: 1a105035e07a3ff8dde869ff9ed9b28830ff9739fde2bae7d6d7a59be2ba0437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36464803efef6e30bcac251faa6251080e1fdf8cf1f1504695e102ee82f0b65320102c13ccfe61410d0d7a29c22734e5cf27d535b854ec6f00652e0a05f5b1dc
|
7
|
+
data.tar.gz: d135b844f28edde57fa67bcda5a2bf03935db3a3d33b49db09d32be8381cf6e7e478c67e4ac7195f450a1ab74718f980c8a7de6c8aeb52ce7347e974dad5f0db
|
@@ -23,7 +23,9 @@ module Admin
|
|
23
23
|
col :member_price, as: :price
|
24
24
|
|
25
25
|
col :capacity_to_s, label: 'Capacity' do |ticket|
|
26
|
-
if ticket.capacity.present?
|
26
|
+
if ticket.capacity.present? && ticket.waitlist?
|
27
|
+
"#{ticket.capacity_available} remaining / #{ticket.capacity} total. #{ticket.waitlisted_event_registrants_count} waitlisted."
|
28
|
+
elsif ticket.capacity.present?
|
27
29
|
"#{ticket.capacity_available} remaining / #{ticket.capacity} total"
|
28
30
|
end
|
29
31
|
end
|
@@ -34,6 +36,10 @@ module Admin
|
|
34
36
|
event.event_registrants.registered.unarchived.count
|
35
37
|
end
|
36
38
|
|
39
|
+
col :purchased_event_registrants_count, label: 'Deferred', visible: false do |event|
|
40
|
+
event.event_registrants.deferred.unarchived.count
|
41
|
+
end
|
42
|
+
|
37
43
|
col :purchased_event_registrants_count, label: 'Purchased', visible: false do |event|
|
38
44
|
event.event_registrants.purchased.unarchived.count
|
39
45
|
end
|
@@ -108,6 +108,14 @@ module Effective
|
|
108
108
|
purchased_event_registrants.length
|
109
109
|
end
|
110
110
|
|
111
|
+
def non_waitlisted_event_registrants_count
|
112
|
+
registered_event_registrants.where(waitlisted: false).or(registered_event_registrants.where(waitlisted: true, promoted: true))
|
113
|
+
end
|
114
|
+
|
115
|
+
def waitlisted_event_registrants_count
|
116
|
+
registered_event_registrants.where(waitlisted: true, promoted: false).length
|
117
|
+
end
|
118
|
+
|
111
119
|
def questions
|
112
120
|
[question1.presence, question2.presence, question3.presence].compact
|
113
121
|
end
|