effective_events 2.29.0 → 2.29.1

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: 3fd4cccf384770e4b061ff775b4b897c374ea9682dc3da142bf96b5d3660e0b6
4
- data.tar.gz: b14016ffa7febad385aa03e53ef3d2b66cc04a3acaf1cd7c08922f69c0cbe906
3
+ metadata.gz: b81b67a3bf9674dd3a2d4da50a44dbf5eda264eef34d1b7a7537fe83f111c63d
4
+ data.tar.gz: 4897e9c03b796cfbdd84235fd5a1de7c9aefa2cb22f1aaa7b3dc588364f9f093
5
5
  SHA512:
6
- metadata.gz: 98f1052081b05189b102c2d971f5e5b620a448980ba1725178aad152ed73619490f9249d648939717642609faad2f6418a9b45d1f75ed1cbd3ee6f323a54cd73
7
- data.tar.gz: eaedb7ff8cfef0be586b3dd26f0da550201b5f65a1f5742ba0c4df8a5cc59137e15bb8e40b9d90b76c62fa7761b6a40cbfa8b0e8510620341f77a78de86e26f4
6
+ metadata.gz: 683a8c654cb4a1cc588faf7878407a96e3d84e9fd6feb6f570d6c0bddc8def1f1a6998a0a286eb9d7ba5382f5a488c8fa832a2ad3af0976523fe85d61f410445
7
+ data.tar.gz: 0ed2cd15b70a51fdcab101537f6d62b58314da4984f6805dc241cae1458c2d7d1f5f13c40495462615f4d58556b3102cc0c35ca36c0caaf001029d71016026e1
@@ -22,7 +22,7 @@ module Effective
22
22
  return if resource.submit_order&.deferred?
23
23
  return if resource.event.registerable? && !resource.event.sold_out?(except: resource)
24
24
 
25
- flash[:danger] = "Your selected event is no longer available for registration. This event registration is no longer available."
25
+ flash[:danger] = "Your selected event is not available for registration. This event registration not available."
26
26
  return redirect_to(view_context.return_to_dashboard_path)
27
27
  end
28
28
 
@@ -2,6 +2,7 @@ module Admin
2
2
  class EffectiveEventRegistrantsDatatable < Effective::Datatable
3
3
  filters do
4
4
  scope :registered
5
+ scope :not_registered
5
6
  scope :purchased_or_created_by_admin, label: 'Purchased'
6
7
  scope :deferred
7
8
  scope :not_purchased_not_created_by_admin, label: 'Not Purchased'
@@ -21,9 +22,15 @@ module Admin
21
22
 
22
23
  col :event
23
24
 
24
- col :owner
25
+ col :owner, visible: false
25
26
  col :event_registration, visible: false
26
27
 
28
+ if defined?(EffectiveMemberships) && EffectiveMemberships.Organization.respond_to?(:sponsors)
29
+ col :sponsorship, search: EffectiveMemberships.Organization::SPONSORSHIPS do |er|
30
+ (er.owner || er.user).try(:sponsorship)
31
+ end
32
+ end
33
+
27
34
  if attributes[:event_id]
28
35
  col :event_ticket, search: Effective::EventTicket.where(event: event).all
29
36
  else
@@ -194,10 +194,15 @@ module Effective
194
194
  # No longer includes sold_out? we check that separately
195
195
  def registerable?
196
196
  return false unless published?
197
- return false if closed?
197
+ return false unless registration_available?
198
198
  (external_registration? && external_registration_url.present?) || event_tickets.present?
199
199
  end
200
200
 
201
+ def registration_available?
202
+ return false if registration_start_at.blank? || registration_end_at.blank?
203
+ (registration_start_at..registration_end_at).cover?(Time.zone.now)
204
+ end
205
+
201
206
  def closed?
202
207
  return false if registration_end_at.blank?
203
208
  registration_end_at < Time.zone.now
@@ -44,7 +44,7 @@ module Effective
44
44
 
45
45
  scope :sorted, -> { order(:id) }
46
46
  scope :deep, -> { includes(:event, :event_product) }
47
- scope :registered, -> { purchased_or_deferred.or(where(created_by_admin: true)) }
47
+ scope :registered, -> { unarchived.purchased_or_deferred.or(where(created_by_admin: true)) }
48
48
  scope :purchased_or_created_by_admin, -> { purchased.or(unarchived.where(created_by_admin: true)) }
49
49
  scope :not_purchased_not_created_by_admin, -> { not_purchased.where(created_by_admin: false) }
50
50
 
@@ -72,6 +72,7 @@ module Effective
72
72
  scope :sorted, -> { order(:event_ticket_id, :id) }
73
73
  scope :deep, -> { includes(:event, :event_ticket, :owner) }
74
74
  scope :registered, -> { unarchived.where.not(registered_at: nil) }
75
+ scope :not_registered, -> { archived.or(where(registered_at: nil)) }
75
76
  scope :purchased_or_created_by_admin, -> { purchased.or(unarchived.where(created_by_admin: true)) }
76
77
  scope :not_purchased_not_created_by_admin, -> { not_purchased.where(created_by_admin: false) }
77
78
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '2.29.0'.freeze
2
+ VERSION = '2.29.1'.freeze
3
3
  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: 2.29.0
4
+ version: 2.29.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-01-16 00:00:00.000000000 Z
11
+ date: 2025-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails