effective_events 0.20.3 → 0.20.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9b8633a6d61dfd2916934dff65ecbfe5df1ced40cfcff2ee4b49f2138ae2b30
|
4
|
+
data.tar.gz: 8b843be43da82c2e4127e3a77ecb4fb2eb4f4f503743749e817375db9d3420e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c65f032ed10d4164d1e774af03b9b491a50ea8b7016dc8337c9ccb8d76edb556f3483a6c15766f8a8492f05a3b072a96db56f7b857ac102d9adcb3d30467c24
|
7
|
+
data.tar.gz: 7ad25cf506e1ea2867cbc47fdadecb0370d3cd7598c0424d34cb04d83ddc3f0a0acd0103fa9945341a0dc83eb2ec129113068a79e5dfb4a10387a6b33a76c7f8
|
@@ -21,7 +21,7 @@ module Admin
|
|
21
21
|
|
22
22
|
col :event
|
23
23
|
|
24
|
-
col :owner
|
24
|
+
col :owner
|
25
25
|
col :event_registration, visible: false
|
26
26
|
|
27
27
|
if attributes[:event_id]
|
@@ -56,7 +56,7 @@ module Admin
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
col :user,
|
59
|
+
col :user, visible: false
|
60
60
|
col :organization, visible: false
|
61
61
|
|
62
62
|
col :orders, visible: false
|
@@ -81,6 +81,10 @@ module Admin
|
|
81
81
|
scope = scope.where(event: event)
|
82
82
|
end
|
83
83
|
|
84
|
+
if (user_id = attributes[:for_id]).present? && (user_type = attributes[:for_type]).present?
|
85
|
+
scope = scope.where(user_id: user_id, user_type: user_type).or(scope.where(owner_id: user_id, owner_type: user_type))
|
86
|
+
end
|
87
|
+
|
84
88
|
scope
|
85
89
|
end
|
86
90
|
|
@@ -181,7 +181,7 @@ module Effective
|
|
181
181
|
[
|
182
182
|
(content_tag(:span, 'Member', class: 'badge badge-warning') if member_ticket?),
|
183
183
|
(content_tag(:span, 'Waitlist', class: 'badge badge-warning') if waitlisted_not_promoted?),
|
184
|
-
(content_tag(:span, 'Archived', class: 'badge badge-warning') if
|
184
|
+
(content_tag(:span, 'Archived', class: 'badge badge-warning') if archived?)
|
185
185
|
].compact.join(' ').html_safe
|
186
186
|
end
|
187
187
|
|
@@ -287,6 +287,18 @@ module Effective
|
|
287
287
|
true
|
288
288
|
end
|
289
289
|
|
290
|
+
def archive!
|
291
|
+
super()
|
292
|
+
orders.reject(&:purchased?).each { |order| order.update_purchasable_attributes! }
|
293
|
+
true
|
294
|
+
end
|
295
|
+
|
296
|
+
def unarchive!
|
297
|
+
super()
|
298
|
+
orders.reject(&:purchased?).each { |order| order.update_purchasable_attributes! }
|
299
|
+
true
|
300
|
+
end
|
301
|
+
|
290
302
|
def event_ticket_price
|
291
303
|
raise('expected an event') if event.blank?
|
292
304
|
raise('expected an event ticket') if event_ticket.blank?
|
@@ -375,7 +387,7 @@ module Effective
|
|
375
387
|
def assign_price
|
376
388
|
raise('is already purchased') if purchased?
|
377
389
|
|
378
|
-
price = waitlisted_not_promoted? ? 0 : event_ticket_price
|
390
|
+
price = (waitlisted_not_promoted? || archived?) ? 0 : event_ticket_price
|
379
391
|
|
380
392
|
assign_attributes(price: price)
|
381
393
|
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: 0.20.
|
4
|
+
version: 0.20.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: 2024-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|