effective_events 0.16.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/datatables/admin/effective_event_tickets_datatable.rb +5 -4
  3. data/app/datatables/effective_event_registrants_datatable.rb +2 -1
  4. data/app/mailers/effective/events_mailer.rb +1 -1
  5. data/app/models/effective/event.rb +0 -4
  6. data/app/models/effective/event_notification.rb +2 -0
  7. data/app/models/effective/event_registrant.rb +40 -15
  8. data/app/models/effective/event_ticket.rb +1 -1
  9. data/app/views/admin/event_addons/_form.html.haml +10 -5
  10. data/app/views/admin/event_registrants/_form.html.haml +10 -6
  11. data/app/views/admin/event_tickets/_form.html.haml +6 -6
  12. data/app/views/admin/events/_form_event.html.haml +1 -1
  13. data/app/views/effective/event_registrants/_fields.html.haml +0 -4
  14. data/app/views/effective/event_registrants/_fields_member_only.html.haml +10 -3
  15. data/app/views/effective/event_registrants/_fields_member_or_non_member.html.haml +10 -3
  16. data/app/views/effective/event_registrants/_fields_regular.html.haml +3 -3
  17. data/app/views/effective/event_registrations/_event_tickets.html.haml +2 -2
  18. data/app/views/effective/event_registrations/checkout.html.haml +2 -3
  19. data/app/views/effective/event_registrations/submitted.html.haml +2 -2
  20. data/app/views/effective/event_registrations/tickets.html.haml +2 -1
  21. data/config/effective_events.rb +4 -0
  22. data/config/locales/effective_events.en.yml +1 -1
  23. data/config/routes.rb +2 -0
  24. data/db/migrate/101_create_effective_events.rb +2 -1
  25. data/lib/effective_events/version.rb +1 -1
  26. data/lib/effective_events.rb +5 -1
  27. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecc4eb59591259776d458e3fc0d6328ba9790249e07d1ad9409d95a4eb18871b
4
- data.tar.gz: f85c9a53cfea60042cc37b81956186f6c2ad943ae3a2e2b001225176e9966ce4
3
+ metadata.gz: 192d39046e600f74608d6f9b5bf1cc90f14be13eabb74ceed9365579919e2a95
4
+ data.tar.gz: af3326868396402818278f3144a3ea061c417c1b65e7cc178be801726bb16d59
5
5
  SHA512:
6
- metadata.gz: 0c83eddb719ba7e8d32d91f4be0474d76a224ca6980bce71d12cbe60bfe737774eb3b20ac005c6a870777f96946bb6e212ddf9693e80ed152728c6a87e0cd5fe
7
- data.tar.gz: 7d5809a96b668b4a2afd459e894216d6077a64e444dba188ec615030dda1a68d076f8759e017cb23424f38840c43be1833070fabc939b3330a5b43ade9475f14
6
+ metadata.gz: 3160971a296127da50d08aae0a1b35939d18f83aa65b479043b8f832b79812975c5b46759f9caab63f3b19b72d3ae0b3b372293011b45ee59dc4c0bd60753339
7
+ data.tar.gz: b899987a70b37e98033d2c1ad634bfe65b00610b0326cdf353edeadc1c4fe6ecb8a2db7bbb26e53f383c1f339acb163a4e850fbac9941362c6d8abd2ee28dfeb
@@ -18,10 +18,14 @@ module Admin
18
18
  col :title
19
19
  col :category, visible: false
20
20
 
21
- col :early_bird_price, as: :price, visible: event.early_bird_end_at.present?
21
+ col :early_bird_price, as: :price, visible: event&.early_bird_end_at.present?
22
22
  col :regular_price, as: :price
23
23
  col :member_price, as: :price
24
24
 
25
+ col :waitlist
26
+ col :capacity_available, visible: false
27
+ col :capacity, label: 'Capacity Total', visible: false
28
+
25
29
  col :capacity_to_s, label: 'Capacity' do |ticket|
26
30
  if ticket.capacity.present? && ticket.waitlist?
27
31
  "#{ticket.capacity_available} remaining / #{ticket.capacity} total. #{ticket.waitlisted_event_registrants_count} waitlisted."
@@ -44,9 +48,6 @@ module Admin
44
48
  event.event_registrants.purchased.unarchived.count
45
49
  end
46
50
 
47
- col :capacity_available, visible: false
48
- col :capacity, label: 'Capacity Total', visible: false
49
- col :waitlist, visible: false
50
51
 
51
52
  col :question1, visible: false
52
53
  col :question2, visible: false
@@ -6,7 +6,8 @@ class EffectiveEventRegistrantsDatatable < Effective::Datatable
6
6
 
7
7
  col :name do |er|
8
8
  if er.first_name.present?
9
- "#{er.first_name} #{er.last_name}<br><small>#{mail_to(er.email)}</small>"
9
+ email = (er.user.present? ? masked_email(er.user) : er.email)
10
+ "#{er.first_name} #{er.last_name}<br><small>#{email}</small>"
10
11
  elsif er.owner.present?
11
12
  er.owner.to_s + ' - GUEST'
12
13
  else
@@ -8,7 +8,7 @@ module Effective
8
8
  raise('expected an Effective::EventRegistrant') unless resource.kind_of?(Effective::EventRegistrant)
9
9
 
10
10
  @assigns = assigns_for(resource)
11
- mail(to: resource.email, **headers_for(resource, opts))
11
+ mail(to: resource.member_email, **headers_for(resource, opts))
12
12
  end
13
13
 
14
14
  protected
@@ -166,10 +166,6 @@ module Effective
166
166
  errors.add(:delayed_payment, 'no delayed payment processor available') unless EffectiveOrders.try(:delayed?)
167
167
  end
168
168
 
169
- validate(if: -> { delayed_payment_date && registration_end_at }) do
170
- errors.add(:delayed_payment_date, 'must be after registration end date') unless registration_end_at < delayed_payment_date
171
- end
172
-
173
169
  validate(if: -> { file.attached? }) do
174
170
  errors.add(:file, 'must be an image') unless file.image?
175
171
  end
@@ -150,6 +150,8 @@ module Effective
150
150
  update_column(:started_at, Time.zone.now)
151
151
 
152
152
  event_registrants.each do |event_registrant|
153
+ next if event_registrant.member_email.blank?
154
+
153
155
  begin
154
156
  EffectiveEvents.send_email(email_template, event_registrant, email_notification_params)
155
157
  rescue => e
@@ -32,7 +32,6 @@ module Effective
32
32
  company :string
33
33
 
34
34
  blank_registrant :boolean
35
- member_registrant :boolean
36
35
 
37
36
  waitlisted :boolean
38
37
  promoted :boolean # An admin marked this registrant as promoted from the waitlist
@@ -59,8 +58,6 @@ module Effective
59
58
 
60
59
  scope :sorted, -> { order(:last_name) }
61
60
  scope :deep, -> { includes(:event, :event_ticket, :owner) }
62
-
63
- #scope :registered, -> { purchased_or_deferred.unarchived }
64
61
  scope :registered, -> { where.not(registered_at: nil) }
65
62
 
66
63
  before_validation(if: -> { event_registration.present? }) do
@@ -69,7 +66,7 @@ module Effective
69
66
  end
70
67
 
71
68
  before_validation(if: -> { blank_registrant? }) do
72
- assign_attributes(user: nil, first_name: nil, last_name: nil, email: nil)
69
+ assign_attributes(user: nil, first_name: nil, last_name: nil, email: nil, company: nil)
73
70
  end
74
71
 
75
72
  before_validation(if: -> { user.present? }) do
@@ -89,22 +86,24 @@ module Effective
89
86
  validates :email, email: true
90
87
 
91
88
  # Member Only Ticket
92
- with_options(if: -> { event_ticket&.member_only? }, unless: -> { blank_registrant? }) do
89
+ with_options(if: -> { event_ticket&.member_only? && present_registrant? }) do
93
90
  validates :user_id, presence: { message: 'Please select a member' }
94
91
  end
95
92
 
96
93
  # Regular Ticket
97
- with_options(if: -> { event_ticket&.regular? }, unless: -> { blank_registrant? }) do
98
- validates :first_name, presence: true
99
- validates :last_name, presence: true
100
- validates :email, presence: true
94
+ with_options(if: -> { event_ticket&.regular? && present_registrant? }) do
95
+ validates :first_name, presence: true, unless: -> { EffectiveEvents.event_registrant_required_fields.exclude?(:first_name) }
96
+ validates :last_name, presence: true, unless: -> { EffectiveEvents.event_registrant_required_fields.exclude?(:last_name) }
97
+ validates :email, presence: true, unless: -> { EffectiveEvents.event_registrant_required_fields.exclude?(:email) }
98
+ validates :company, presence: true, unless: -> { EffectiveEvents.event_registrant_required_fields.exclude?(:company) }
101
99
  end
102
100
 
103
- with_options(if: -> { event_ticket&.member_or_non_member? && !blank_registrant? }) do
104
- validates :user_id, presence: { message: 'Please select a member' }, unless: -> { first_name.present? || last_name.present? || email.present? }
105
- validates :first_name, presence: true, unless: -> { user.present? }
106
- validates :last_name, presence: true, unless: -> { user.present? }
107
- validates :email, presence: true, unless: -> { user.present? }
101
+ with_options(if: -> { event_ticket&.member_or_non_member? && present_registrant? }) do
102
+ validates :user_id, presence: { message: 'Please select a member' }, unless: -> { first_name.present? || last_name.present? }
103
+ validates :first_name, presence: true, unless: -> { user.present? || EffectiveEvents.event_registrant_required_fields.exclude?(:first_name) }
104
+ validates :last_name, presence: true, unless: -> { user.present? || EffectiveEvents.event_registrant_required_fields.exclude?(:last_name) }
105
+ validates :email, presence: true, unless: -> { user.present? || EffectiveEvents.event_registrant_required_fields.exclude?(:email) }
106
+ validates :company, presence: true, unless: -> { user.present? || EffectiveEvents.event_registrant_required_fields.exclude?(:company) }
108
107
  end
109
108
 
110
109
  after_defer do
@@ -138,7 +137,15 @@ module Effective
138
137
  end
139
138
 
140
139
  def member_present?
141
- user&.is?(:member) || (blank_registrant? && member_registrant?)
140
+ user&.is?(:member)
141
+ end
142
+
143
+ def member_email
144
+ email.presence || user&.email
145
+ end
146
+
147
+ def present_registrant?
148
+ !blank_registrant?
142
149
  end
143
150
 
144
151
  def tax_exempt
@@ -164,6 +171,24 @@ module Effective
164
171
  registered!
165
172
  end
166
173
 
174
+ def waitlist!
175
+ raise('expected a waitlist? event_ticket') unless event_ticket.waitlist?
176
+
177
+ update!(waitlisted: true)
178
+ orders.reject(&:purchased?).each { |order| order.update_purchasable_attributes! }
179
+
180
+ true
181
+ end
182
+
183
+ def unwaitlist!
184
+ raise('expected a waitlist? event_ticket') unless event_ticket.waitlist?
185
+
186
+ update!(waitlisted: false)
187
+ orders.reject(&:purchased?).each { |order| order.update_purchasable_attributes! }
188
+
189
+ true
190
+ end
191
+
167
192
  def promote!
168
193
  raise('expected a waitlist? event_ticket') unless event_ticket.waitlist?
169
194
 
@@ -24,6 +24,7 @@ module Effective
24
24
  title :string
25
25
 
26
26
  capacity :integer
27
+ display_capacity :boolean
27
28
  waitlist :boolean
28
29
 
29
30
  category :string
@@ -68,7 +69,6 @@ module Effective
68
69
  validates :early_bird_price, numericality: { greater_than_or_equal_to: 0, allow_blank: true }
69
70
 
70
71
  validates :capacity, numericality: { greater_than_or_equal_to: 0, allow_blank: true }
71
- validates :capacity, numericality: { greater_than_or_equal_to: 1, message: 'must have a non-zero capacity when using waitlist' }, if: -> { waitlist? }
72
72
 
73
73
  def to_s
74
74
  title.presence || 'New Event Ticket'
@@ -1,4 +1,10 @@
1
1
  = effective_form_with(model: [:admin, event_addon], engine: true) do |f|
2
+ - if inline_datatable?
3
+ = f.hidden_field :event_id
4
+ - else
5
+ = f.select :event_id, Effective::Event.sorted.all,
6
+ 'data-load-ajax-url': effective_events.new_admin_event_addon_path,
7
+ 'data-load-ajax-div': '#effective-events-event-addon-ajax'
2
8
  = f.hidden_field :event_id
3
9
 
4
10
  - if f.object.new_record?
@@ -11,11 +17,10 @@
11
17
  - else
12
18
  = f.static_field :owner
13
19
 
14
- = render 'admin/event_addons/fields', f: f, event: event_addon.event
20
+ #effective-events-event-addon-ajax
21
+ - if f.object.event.present?
22
+ = render 'admin/event_addons/fields', f: f, event: event_addon.event
15
23
 
16
24
  = f.check_box :archived, label: "Archive this addon. It will be displayed as archived on the owner's event registration"
17
25
 
18
- - if f.object.new_record?
19
- = f.submit 'Save and Mark Registered'
20
- - else
21
- = f.submit 'Save'
26
+ = f.submit 'Save'
@@ -1,5 +1,10 @@
1
1
  = effective_form_with(model: [:admin, event_registrant], engine: true) do |f|
2
- = f.hidden_field :event_id
2
+ - if inline_datatable?
3
+ = f.hidden_field :event_id
4
+ - else
5
+ = f.select :event_id, Effective::Event.sorted.all,
6
+ 'data-load-ajax-url': effective_events.new_admin_event_registrant_path,
7
+ 'data-load-ajax-div': '#effective-events-event-registrant-ajax'
3
8
 
4
9
  - if f.object.new_record?
5
10
  -# User
@@ -13,11 +18,10 @@
13
18
 
14
19
  = f.datetime_field :registered_at, required: true
15
20
 
16
- = render 'effective/event_registrants/fields', f: f, event: event_registrant.event, namespace: :admin
21
+ #effective-events-event-registrant-ajax
22
+ - if f.object.event.present?
23
+ = render 'effective/event_registrants/fields', f: f, event: event_registrant.event, namespace: :admin
17
24
 
18
25
  = f.check_box :archived, label: "Archive this registrant. It will be displayed as archived on the owner's event registration"
19
26
 
20
- - if f.object.new_record?
21
- = f.submit 'Save and Mark Registered'
22
- - else
23
- = f.submit 'Save'
27
+ = f.submit 'Save'
@@ -11,26 +11,26 @@
11
11
  = f.show_if(:category, 'Regular') do
12
12
  .alert.alert-info.mb-4
13
13
  %strong Regular Ticket:
14
- Anyone will be able to purchase this ticket. They will be asked for a first name, last name and email. Will not display the dropdown list of related members. Only the regular price applies.
14
+ Anyone will be able to purchase this ticket. They will be asked for a first and last name. Will not display the dropdown list of all members. Only the regular price applies.
15
15
 
16
16
  = f.show_if(:category, 'Member Only') do
17
17
  .alert.alert-info.mb-4
18
18
  %strong Member Only Ticket:
19
- Only members will be able to purchase this ticket. They must select a member from the dropdown list of related members. Only the member price applies.
19
+ Only members will be able to purchase this ticket. They must select a member from the dropdown list of all members. Only the member price applies.
20
20
 
21
21
  = f.show_if(:category, 'Member or Non-Member') do
22
22
  .alert.alert-info.mb-4
23
23
  %strong Member or Non-Member Ticket:
24
- Anyone will be able to purchase this ticket. They can select a member from the dropdown list of related members to receive the member pricing.
25
- Or, they can enter a first name, last name and email to receive the regular pricing.
24
+ Anyone will be able to purchase this ticket. They can select a member from the dropdown list of all members to receive the member pricing or they can enter a first name and last name to receive the regular pricing.
26
25
 
27
26
  .col
28
- = f.number_field :capacity, hint: "The number of registrations will be limited to capacity.<br>Leave blank for unlimited capacity."
27
+ = f.number_field :capacity, hint: "The number of registrations will be limited to capacity. Leave blank for unlimited capacity."
28
+ = f.check_box :display_capacity, label: "Yes, display the remaining ticket capacity to users during registration", hint: "Leave blank to hide the capacity."
29
29
 
30
30
  - if f.object.event&.delayed?
31
31
  = f.check_box :waitlist,
32
32
  label: "Yes, add to waitlist once capacity is reached",
33
- hint: "requires a delayed payment event. Once capacity is reached, new registrations will be added to the waitlist. Payment information is collected but not charged for waitlisted registrants."
33
+ hint: "requires a delayed payment event. Once capacity is reached, new registrations will be added to the waitlist. Payment information is collected but not charged for waitlisted registrants. To waitlist everyone and promote later, set the capacity to zero."
34
34
  .row
35
35
  .col-md-6
36
36
  - if f.object.event&.early_bird_end_at.present?
@@ -5,7 +5,7 @@
5
5
  = f.hide_if(:save_as_draft, true) do
6
6
  .row
7
7
  .col-md-6
8
- = f.datetime_field :published_start_at, hint: 'The event will be available starting on this date and time.'
8
+ = f.datetime_field :published_start_at, hint: 'The event will be available starting on this date and time. Leave blank to publish immediately.'
9
9
  .col-md-6
10
10
  = f.datetime_field :published_end_at, hint: 'The event will no longer be available after this date and time. Leave blank for no end date.', date_linked: false
11
11
 
@@ -17,10 +17,6 @@
17
17
  - else
18
18
  = f.hidden_field :blank_registrant, value: false
19
19
 
20
- - if ticket.member_or_non_member?
21
- = f.show_if(:blank_registrant, true, nested: true) do
22
- = f.check_box :member_registrant, label: 'Yes, this ticket will be for a member'
23
-
24
20
  = f.show_if(:blank_registrant, false, nested: true) do
25
21
  %hr
26
22
 
@@ -1,3 +1,10 @@
1
- - # Choose member
2
- = f.hidden_field :user_type, value: current_user.class.name
3
- = f.select :user_id, effective_events_event_registrant_user_collection(f.object), required: true, hint: effective_events_event_registrant_user_hint()
1
+ - # Choose ANY member
2
+ - klass = (f.object.user || current_user).class
3
+ - ajax_url = (@select2_users_ajax_path || effective_memberships.member_users_membership_select2_ajax_index_path) unless Rails.env.test?
4
+
5
+ = f.hidden_field :user_type, value: klass.name
6
+ = f.select :user_id, klass.all, ajax_url: ajax_url, label: 'Member', required: true, hint: effective_events_event_registrant_user_hint()
7
+
8
+ - # Choose RELATED ORGANIZATION member
9
+ -# = f.hidden_field :user_type, value: current_user.class.name
10
+ -# = f.select :user_id, effective_events_event_registrant_user_collection(f.object), required: true, hint: effective_events_event_registrant_user_hint()
@@ -1,6 +1,13 @@
1
- - # Choose member
2
- = f.hidden_field :user_type, value: current_user.class.name
3
- = f.select :user_id, effective_events_event_registrant_user_collection(f.object), hint: effective_events_event_registrant_user_hint()
1
+ - # Choose ANY member
2
+ - klass = (f.object.user || current_user).class
3
+ - ajax_url = (@select2_users_ajax_path || effective_memberships.member_users_membership_select2_ajax_index_path) unless Rails.env.test?
4
+
5
+ = f.hidden_field :user_type, value: klass.name
6
+ = f.select :user_id, klass.all, ajax_url: ajax_url, label: 'Member', hint: effective_events_event_registrant_user_hint()
7
+
8
+ - # Choose RELATED ORGANIZATION member
9
+ -# = f.hidden_field :user_type, value: current_user.class.name
10
+ -# = f.select :user_id, effective_events_event_registrant_user_collection(f.object), hint: effective_events_event_registrant_user_hint()
4
11
 
5
12
  = f.show_if(:user_id, '', nested: true) do
6
13
  %p.text-center - or -
@@ -1,8 +1,8 @@
1
1
  - # Choose non-member
2
2
  .row
3
- .col-md= f.text_field :first_name, required: true
4
- .col-md= f.text_field :last_name, required: true
3
+ .col-md= f.text_field :first_name
4
+ .col-md= f.text_field :last_name
5
5
 
6
6
  .row
7
- .col-md= f.email_field :email, required: true
7
+ .col-md= f.email_field :email
8
8
  .col-md= f.text_field :company
@@ -13,14 +13,14 @@
13
13
  %th Ticket
14
14
  - if member_column
15
15
  %th Member Price
16
- %th #{'Regualar ' if member_column}Price
16
+ %th #{'Regular ' if member_column}Price
17
17
 
18
18
  %tbody
19
19
  - tickets.each do |ticket|
20
20
  %tr
21
21
  %td
22
22
  = ticket.to_s
23
- - if ticket.capacity.present?
23
+ - if ticket.capacity.present? && ticket.display_capacity?
24
24
  %br
25
25
  %small
26
26
  #{ticket.capacity_available} remaining
@@ -3,17 +3,16 @@
3
3
 
4
4
  - if resource.submit_order.deferred?
5
5
  = card do
6
- = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout), skip_order: resource.submit_order.delayed?)
6
+ = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
7
7
  - elsif resource.event.registerable? == false
8
8
  .alert.alert-danger Your selected event is no longer available for registration.
9
9
  - elsif resource.unavailable_event_tickets.present?
10
10
  .alert.alert-danger Your selected number of event tickets are no longer available.
11
11
  - elsif resource.unavailable_event_products.present?
12
12
  .alert.alert-danger Your selected number of event add-ons are no longer available.
13
-
14
13
  - else
15
14
  = card do
16
- = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout), skip_order: resource.submit_order.delayed?)
15
+ = render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:complete), deferred_url: wizard_path(:submitted), declined_url: wizard_path(:checkout))
17
16
 
18
17
  - if resource.submit_order.delayed? && resource.submit_order.deferred?
19
18
  = link_to 'Save and Continue', wizard_path(:submitted), class: 'btn btn-primary'
@@ -4,8 +4,8 @@
4
4
  - raise('expected a submitted event_registration') unless resource.submitted?
5
5
  - raise('expected a deffered event_registration submit_order') unless resource.submit_order&.deferred?
6
6
 
7
- - if resource.event.delayed?
8
- - raise('expected event delayed_payment_date to match order delayed_payment_date') unless resource.event.delayed_payment_date == resource.submit_order.delayed_payment_date
7
+ -# - if resource.event.delayed?
8
+ -# - raise('expected event delayed_payment_date to match order delayed_payment_date') unless resource.event.delayed_payment_date == resource.submit_order.delayed_payment_date
9
9
 
10
10
  .mb-4
11
11
  = link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
@@ -16,4 +16,5 @@
16
16
  .alert.alert-info If the price of your registration changes, your order will be automatically updated.
17
17
 
18
18
  %hr
19
- = f.save 'Save and Continue'
19
+ .mb-4
20
+ = f.save 'Save and Continue'
@@ -18,6 +18,10 @@ EffectiveEvents.setup do |config|
18
18
  # Hint text for event images attachments
19
19
  config.events_hint_text = 'Hint text that includes required image dimensions'
20
20
 
21
+ # Validations for Event Registrants
22
+ # config.event_registrant_required_fields = [:first_name, :last_name, :email, :company]
23
+ config.event_registrant_required_fields = [:first_name, :last_name, :email]
24
+
21
25
  # Mailer Settings
22
26
  # Please see config/initializers/effective_resources.rb for default effective_* gem mailer settings
23
27
  #
@@ -6,7 +6,7 @@ en:
6
6
  activerecord:
7
7
  models:
8
8
  effective/event: 'Event'
9
- effective/event_registrant: 'Event Registrant'
9
+ effective/event_registrant: 'Event registrant'
10
10
 
11
11
  attributes:
12
12
  effective/event_registrant:
data/config/routes.rb CHANGED
@@ -44,6 +44,8 @@ EffectiveEvents::Engine.routes.draw do
44
44
  resources :event_registrants, except: [:show] do
45
45
  post :promote, on: :member
46
46
  post :unpromote, on: :member
47
+ post :waitlist, on: :member
48
+ post :unwaitlist, on: :member
47
49
 
48
50
  post :archive, on: :member
49
51
  post :unarchive, on: :member
@@ -42,6 +42,8 @@ class CreateEffectiveEvents < ActiveRecord::Migration[6.0]
42
42
 
43
43
  t.string :title
44
44
  t.integer :capacity
45
+ t.boolean :display_capacity, default: false
46
+
45
47
  t.boolean :waitlist, default: false
46
48
  t.string :category
47
49
 
@@ -84,7 +86,6 @@ class CreateEffectiveEvents < ActiveRecord::Migration[6.0]
84
86
  t.text :notes
85
87
 
86
88
  t.boolean :blank_registrant, default: false
87
- t.boolean :member_registrant, default: false
88
89
 
89
90
  t.boolean :waitlisted, default: false
90
91
  t.boolean :promoted, default: false
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.16.0'.freeze
2
+ VERSION = '0.18.0'.freeze
3
3
  end
@@ -9,7 +9,7 @@ module EffectiveEvents
9
9
  :events_table_name, :event_registrants_table_name, :event_tickets_table_name,
10
10
  :event_registrations_table_name, :event_products_table_name, :event_addons_table_name, :event_notifications_table_name,
11
11
  :mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject,
12
- :layout, :per_page, :use_effective_roles, :categories, :events_hint_text,
12
+ :layout, :per_page, :use_effective_roles, :categories, :events_hint_text, :event_registrant_required_fields,
13
13
  :event_registration_class_name
14
14
  ]
15
15
  end
@@ -28,4 +28,8 @@ module EffectiveEvents
28
28
  Array(config[:categories]) - [nil, false, '']
29
29
  end
30
30
 
31
+ def event_registrant_required_fields
32
+ (Array(config[:event_registrant_required_fields]) - [nil, false, '']).map(&:to_sym)
33
+ end
34
+
31
35
  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.16.0
4
+ version: 0.18.0
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-06-28 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails