effective_events 2.35.0 → 2.35.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: 0a35679ce20fbdd029eb43d42d309d2d9afb8f14563a8678b6a0dfed1fba1c86
|
4
|
+
data.tar.gz: af28a6d095903ec662b695943fbf0c8eb140bbfc3151c67cb68696fad79bc657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f62138d80a94f535ff09d17b7d243ac77519efeac21040813535e4daf7a7a039474e8226e8569602397e4efd5227ae4bcf1de6c0dd8766c195f5d541212c4be8
|
7
|
+
data.tar.gz: 64fa8b144451340b18c3ba0e10764618717f64f833bd67fe25256d9857608c08face61f94142f69ee830a99379247f64500642f69d97a1187fa349aa03b5c83d
|
@@ -35,8 +35,9 @@ class EffectiveEventsDatatable < Effective::Datatable
|
|
35
35
|
|
36
36
|
actions_col show: false do |event|
|
37
37
|
if event.registerable?
|
38
|
+
label = (event.waitlist_only? ? 'Join Waitlist' : 'Register')
|
38
39
|
url = event.external_registration_url.presence || effective_events.new_event_event_registration_path(event)
|
39
|
-
dropdown_link_to(
|
40
|
+
dropdown_link_to(label, url)
|
40
41
|
end
|
41
42
|
end
|
42
43
|
end
|
@@ -210,8 +210,10 @@ module Effective
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def registration_available?
|
213
|
-
return false if
|
214
|
-
|
213
|
+
return false if closed?
|
214
|
+
|
215
|
+
return false if registration_start_at.blank?
|
216
|
+
registration_start_at <= Time.zone.now
|
215
217
|
end
|
216
218
|
|
217
219
|
def closed?
|
@@ -228,6 +230,10 @@ module Effective
|
|
228
230
|
event_tickets.none? { |event_ticket| event_ticket_available?(event_ticket, except: except, quantity: 1) }
|
229
231
|
end
|
230
232
|
|
233
|
+
def waitlist_only?
|
234
|
+
any_waitlist? && event_tickets.none? { |et| et.capacity_available > 0 }
|
235
|
+
end
|
236
|
+
|
231
237
|
def upcoming?
|
232
238
|
end_at > Time.zone.now
|
233
239
|
end
|
@@ -297,7 +303,7 @@ module Effective
|
|
297
303
|
end
|
298
304
|
|
299
305
|
# Can I register/purchase this many new event tickets?
|
300
|
-
def event_ticket_available?(event_ticket, except: nil, quantity:
|
306
|
+
def event_ticket_available?(event_ticket, except: nil, quantity: 1)
|
301
307
|
raise('expected an EventTicket') unless event_ticket.kind_of?(Effective::EventTicket)
|
302
308
|
raise('expected except to be an EventRegistration') if except && !except.class.try(:effective_events_event_registration?)
|
303
309
|
raise('expected quantity to be greater than 0') unless quantity.to_i > 0
|
@@ -311,7 +317,7 @@ module Effective
|
|
311
317
|
end
|
312
318
|
|
313
319
|
# Can I register/purchase this many new event products?
|
314
|
-
def event_product_available?(event_product, quantity:)
|
320
|
+
def event_product_available?(event_product, quantity: 1)
|
315
321
|
raise('expected an EventProduct') unless event_product.kind_of?(Effective::EventProduct)
|
316
322
|
raise('expected quantity to be greater than 0') unless quantity.to_i > 0
|
317
323
|
|
@@ -16,8 +16,9 @@
|
|
16
16
|
|
17
17
|
- if @event.registerable? || (impersonating? && @event.registerable_when_impersonating?)
|
18
18
|
.register.mb-4
|
19
|
+
- label = (@event.waitlist_only? ? 'Join Waitlist' : 'Register')
|
19
20
|
- url = @event.external_registration_url.presence || effective_events.new_event_event_registration_path(@event)
|
20
|
-
= link_to
|
21
|
+
= link_to label, url, class: 'btn btn-lg btn-primary'
|
21
22
|
|
22
23
|
- if @event.file.attached?
|
23
24
|
= image_tag url_for(@event.file), class: "effective-events-image d-none d-lg-block float-right", alt: @event.title, width: "350", height: "220"
|
@@ -67,7 +68,8 @@
|
|
67
68
|
|
68
69
|
- if @event.registerable?
|
69
70
|
.register.mb-4
|
71
|
+
- label = (@event.waitlist_only? ? 'Join Waitlist' : 'Register')
|
70
72
|
- url = @event.external_registration_url.presence || effective_events.new_event_event_registration_path(@event)
|
71
|
-
= link_to
|
73
|
+
= link_to label, url, class: 'btn btn-lg btn-primary'
|
72
74
|
|
73
75
|
= link_to("← #{events_name_label}".html_safe, effective_events.events_path, class: "btn btn-secondary my-4")
|
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.35.
|
4
|
+
version: 2.35.1
|
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-07-
|
11
|
+
date: 2025-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|