effective_events 0.2.0 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/effective/event_registrations_controller.rb +0 -33
- data/app/controllers/effective/events_controller.rb +0 -15
- data/app/datatables/admin/effective_event_registrants_datatable.rb +2 -2
- data/app/datatables/admin/effective_event_registrations_datatable.rb +2 -2
- data/app/datatables/admin/effective_event_tickets_datatable.rb +0 -6
- data/app/datatables/admin/effective_events_datatable.rb +12 -9
- data/app/datatables/effective_event_registrants_datatable.rb +2 -2
- data/app/datatables/effective_events_datatable.rb +1 -5
- data/app/helpers/effective_events_helper.rb +0 -4
- data/app/models/concerns/effective_events_event_registration.rb +1 -9
- data/app/views/effective/event_registrants/_fields.html.haml +1 -1
- data/app/views/effective/event_registrations/_addons.html.haml +1 -1
- data/app/views/effective/event_registrations/_event_registration.html.haml +1 -6
- data/app/views/effective/event_registrations/{_tickets.haml → _tickets.html.haml} +1 -1
- data/app/views/effective/event_registrations/submitted.html.haml +1 -0
- data/app/views/effective/event_registrations/{tickets.haml → tickets.html.haml} +0 -0
- data/app/views/effective/events/_event.html.haml +37 -17
- data/app/views/effective/events/index.html.haml +5 -8
- data/app/views/effective/events/show.html.haml +9 -13
- data/lib/effective_events/version.rb +1 -1
- metadata +4 -6
- data/app/views/effective/events/_layout.html.haml +0 -1
- data/app/views/effective/events/_spacer.html.haml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf5e9e89cd746cd636f6153093f165bda6bc8c92657248478264355487e68c0
|
4
|
+
data.tar.gz: d12f3cf6889c9e26f0c4cd1aa188ff47f7f709c6e42c17df1b39586e8996194c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 295fed0aaac7ff09e8049eff6dca55fec779e234f56f85fcad32ce60ae7a3c82d942044e3b792366dd01d453ce683980f0e1c6a28c8d70ea62b93e45ddf88681
|
7
|
+
data.tar.gz: 66b52f3bfaaba6765795cca10dab5202a119f4b4048bf0d185d763591f9e6278b8a5f695db878001508c5ae72801ef8291a0c87f7b47d69550f5c67e50e80df0
|
data/README.md
CHANGED
@@ -9,38 +9,5 @@ module Effective
|
|
9
9
|
EffectiveEvents.EventRegistration.deep.where(owner: current_user, event: event)
|
10
10
|
}
|
11
11
|
|
12
|
-
# Allow only 1 in-progress event registration at a time
|
13
|
-
before_action(only: [:new, :show], unless: -> { resource&.done? }) do
|
14
|
-
existing = resource_scope.in_progress.where.not(id: resource).first
|
15
|
-
|
16
|
-
if existing.present?
|
17
|
-
flash[:success] = "You have been redirected to your existing in progress event registration"
|
18
|
-
redirect_to effective_events.event_event_registration_build_path(existing.event, existing, existing.next_step)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
after_save do
|
23
|
-
flash.now[:success] = ''
|
24
|
-
end
|
25
|
-
|
26
|
-
# The default redirect doesn't respect nested resources here
|
27
|
-
def new
|
28
|
-
self.resource ||= (find_wizard_resource || resource_scope.new)
|
29
|
-
EffectiveResources.authorize!(self, :new, resource)
|
30
|
-
|
31
|
-
redirect_to effective_events.event_event_registration_build_path(
|
32
|
-
resource.event,
|
33
|
-
(resource.to_param || :new),
|
34
|
-
(resource.first_uncompleted_step || resource_wizard_steps.first)
|
35
|
-
)
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def permitted_params
|
41
|
-
model = (params.key?(:effective_event_registration) ? :effective_event_registration : :event_registration)
|
42
|
-
params.require(model).permit!.except(:status, :status_steps, :wizard_steps, :submitted_at)
|
43
|
-
end
|
44
|
-
|
45
12
|
end
|
46
13
|
end
|
@@ -7,21 +7,6 @@ module Effective
|
|
7
7
|
Effective::Event.events(user: current_user, unpublished: unpublished)
|
8
8
|
}
|
9
9
|
|
10
|
-
def index
|
11
|
-
@events ||= resource_scope.published
|
12
|
-
|
13
|
-
@events = @events.paginate(page: params[:page])
|
14
|
-
|
15
|
-
# if params[:search].present?
|
16
|
-
# search = params[:search].permit(EffectiveEvents.permitted_params).delete_if { |k, v| v.blank? }
|
17
|
-
# @events = @events.where(search) if search.present?
|
18
|
-
# end
|
19
|
-
|
20
|
-
EffectiveResources.authorize!(self, :index, Effective::Event)
|
21
|
-
|
22
|
-
@page_title ||= ['Events', (" - Page #{params[:page]}" if params[:page])].compact.join
|
23
|
-
end
|
24
|
-
|
25
10
|
def show
|
26
11
|
@event = resource_scope.find(params[:id])
|
27
12
|
|
@@ -16,13 +16,13 @@ module Admin
|
|
16
16
|
col :event_ticket, search: :string
|
17
17
|
end
|
18
18
|
|
19
|
-
col :purchased_order
|
19
|
+
col :purchased_order, visible: false
|
20
20
|
|
21
21
|
col :first_name
|
22
22
|
col :last_name
|
23
23
|
col :email
|
24
24
|
col :company
|
25
|
-
col :number
|
25
|
+
col :number, label: 'Designations'
|
26
26
|
col :notes, label: 'Restrictions and notes'
|
27
27
|
|
28
28
|
actions_col
|
@@ -12,8 +12,8 @@ class Admin::EffectiveEventRegistrationsDatatable < Effective::Datatable
|
|
12
12
|
col :event, search: :string
|
13
13
|
col :owner
|
14
14
|
|
15
|
-
col :event_registrants, search: :string
|
16
|
-
col :event_addons, search: :string
|
15
|
+
col :event_registrants, search: :string, visible: false
|
16
|
+
col :event_addons, search: :string, visible: false
|
17
17
|
col :orders, label: 'Order'
|
18
18
|
|
19
19
|
actions_col
|
@@ -25,12 +25,6 @@ module Admin
|
|
25
25
|
col :capacity, visible: false
|
26
26
|
col :capacity_available, visible: false
|
27
27
|
|
28
|
-
col :purchased_event_registrants, label: 'Registrants' do |ticket|
|
29
|
-
ticket.purchased_event_registrants.sort_by(&:last_name).map do |registrant|
|
30
|
-
content_tag(:div, registrant.last_first_name, class: 'col-resource_item')
|
31
|
-
end.join.html_safe
|
32
|
-
end
|
33
|
-
|
34
28
|
actions_col
|
35
29
|
end
|
36
30
|
|
@@ -13,19 +13,21 @@ module Admin
|
|
13
13
|
col :created_at, visible: false
|
14
14
|
col :id, visible: false
|
15
15
|
|
16
|
-
col :title
|
17
|
-
|
16
|
+
col :title do |event|
|
17
|
+
link_to event.title, effective_events.edit_admin_event_path(event)
|
18
|
+
end
|
18
19
|
|
20
|
+
col :slug, visible: false
|
19
21
|
col :draft
|
20
|
-
col :start_at, label: '
|
21
|
-
col :end_at, label: '
|
22
|
+
col :start_at, label: 'Start', visible: false
|
23
|
+
col :end_at, label: 'End', visible: false
|
22
24
|
col :excerpt, visible: false
|
23
25
|
|
24
26
|
col :registration_start_at, label: 'Registration opens', visible: false
|
25
27
|
col :registration_end_at, label: 'Registration closes', visible: false
|
26
28
|
col :early_bird_end_at, label: 'Early bird ends', visible: false
|
27
29
|
|
28
|
-
col :early_bird do |event|
|
30
|
+
col :early_bird, visible: false do |event|
|
29
31
|
if event.early_bird?
|
30
32
|
content_tag(:span, event.early_bird_status, class: 'badge badge-success')
|
31
33
|
else
|
@@ -33,10 +35,11 @@ module Admin
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
36
|
-
|
37
|
-
col :
|
38
|
-
col :
|
39
|
-
col :
|
38
|
+
# These show too much information to be useful to admins, rely on the edit screen
|
39
|
+
# col :event_tickets, search: :string
|
40
|
+
# col :event_products, search: :string
|
41
|
+
# col :event_registrants, search: :string
|
42
|
+
# col :event_addons, search: :string
|
40
43
|
|
41
44
|
col :roles, visible: false
|
42
45
|
col :authenticate_user, visible: false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Used on the Event Registrations
|
1
|
+
# Used on the Event Registrations tickets step
|
2
2
|
|
3
3
|
class EffectiveEventRegistrantsDatatable < Effective::Datatable
|
4
4
|
datatable do
|
@@ -13,7 +13,7 @@ class EffectiveEventRegistrantsDatatable < Effective::Datatable
|
|
13
13
|
col :last_name, visible: false
|
14
14
|
col :email, visible: false
|
15
15
|
col :company, visible: false
|
16
|
-
col :number, visible: false
|
16
|
+
col :number, visible: false, label: 'Designations'
|
17
17
|
|
18
18
|
col :price, as: :price
|
19
19
|
col :notes
|
@@ -13,11 +13,7 @@ class EffectiveEventsDatatable < Effective::Datatable
|
|
13
13
|
col :start_at, label: 'Date', as: :date
|
14
14
|
|
15
15
|
col :title, label: 'Title' do |event|
|
16
|
-
|
17
|
-
link_to(event.to_s, effective_events.new_event_event_registration_path(event))
|
18
|
-
else
|
19
|
-
event.to_s
|
20
|
-
end
|
16
|
+
link_to(event.to_s, effective_events.event_path(event))
|
21
17
|
end
|
22
18
|
|
23
19
|
col :registration_start_at, visible: false
|
@@ -15,14 +15,6 @@ module EffectiveEventsEventRegistration
|
|
15
15
|
|
16
16
|
module ClassMethods
|
17
17
|
def effective_events_event_registration?; true; end
|
18
|
-
|
19
|
-
def all_wizard_steps
|
20
|
-
const_get(:WIZARD_STEPS).keys
|
21
|
-
end
|
22
|
-
|
23
|
-
def required_wizard_steps
|
24
|
-
[:start, :summary, :billing, :checkout, :submitted]
|
25
|
-
end
|
26
18
|
end
|
27
19
|
|
28
20
|
included do
|
@@ -90,7 +82,7 @@ module EffectiveEventsEventRegistration
|
|
90
82
|
validates :owner, presence: true
|
91
83
|
validates :event, presence: true
|
92
84
|
|
93
|
-
#
|
85
|
+
# Tickets Step
|
94
86
|
validate(if: -> { current_step == :tickets }) do
|
95
87
|
self.errors.add(:event_registrants, "can't be blank") unless present_event_registrants.present?
|
96
88
|
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
.row
|
9
9
|
.col-lg= f.text_field :first_name
|
10
10
|
.col-lg= f.text_field :last_name
|
11
|
-
.col-lg= f.text_field :number, label: '
|
11
|
+
.col-lg= f.text_field :number, label: 'Professional Designations', hint: 'Include member or registrant number, if applicable.'
|
12
12
|
|
13
13
|
.row
|
14
14
|
.col-lg= f.email_field :email
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.col-sm
|
4
4
|
%h5.card-title= event_registration.wizard_step_title(:addons)
|
5
5
|
.col-sm-auto.text-right
|
6
|
-
= link_to('Edit', wizard_path(:addons)) if
|
6
|
+
= link_to('Edit', wizard_path(:addons)) if edit_effective_wizard?
|
7
7
|
|
8
8
|
- datatable = EffectiveEventAddonsDatatable.new(event_registration: event_registration)
|
9
9
|
.mb-4= render_simple_datatable(datatable)
|
@@ -1,8 +1,3 @@
|
|
1
1
|
.effective-event-registration
|
2
|
-
-
|
3
|
-
- steps = event_registration.required_steps - blacklist
|
4
|
-
|
5
|
-
= render "effective/event_registrations/summary", event_registration: event_registration
|
6
|
-
|
7
|
-
- steps.select { |step| event_registration.has_completed_step?(step) }.each do |partial|
|
2
|
+
- event_registration.render_steps.each do |partial|
|
8
3
|
= render "effective/event_registrations/#{partial}", event_registration: event_registration, step: partial
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.col-sm
|
4
4
|
%h5.card-title= event_registration.wizard_step_title(:tickets)
|
5
5
|
.col-sm-auto.text-right
|
6
|
-
= link_to('Edit', wizard_path(:tickets)) if
|
6
|
+
= link_to('Edit', wizard_path(:tickets)) if edit_effective_wizard?
|
7
7
|
|
8
8
|
- datatable = EffectiveEventRegistrantsDatatable.new(event_registration: event_registration)
|
9
9
|
.mb-4= render_simple_datatable(datatable)
|
@@ -9,6 +9,7 @@
|
|
9
9
|
|
10
10
|
= link_to "Return to Dashboard", root_path, class: 'btn btn-lg btn-primary mb-4'
|
11
11
|
|
12
|
+
= render 'effective/event_registrations/summary', event_registration: resource
|
12
13
|
= render 'effective/event_registrations/event_registration', event_registration: resource
|
13
14
|
= render 'effective/event_registrations/orders', event_registration: resource
|
14
15
|
|
File without changes
|
@@ -1,21 +1,41 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%table.table.effective-events-table
|
4
|
+
%tbody
|
5
|
+
%tr
|
6
|
+
%th Dates
|
7
|
+
%td
|
8
|
+
Starts: #{event.start_at&.strftime('%F %R')}
|
9
|
+
%br
|
10
|
+
Ends: #{event.end_at&.strftime('%F %R')}
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
%tr
|
13
|
+
%th Registration Closes
|
14
|
+
%td= event.registration_end_at.strftime('%F %R')
|
11
15
|
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
%tr
|
17
|
+
%th Early Bird
|
18
|
+
%td
|
19
|
+
Status: #{event.early_bird_status}
|
20
|
+
%br
|
21
|
+
Ends: #{event.early_bird_end_at&.strftime('%F %R')}
|
15
22
|
|
16
|
-
|
17
|
-
|
18
|
-
|
23
|
+
%tr
|
24
|
+
%th Tickets
|
25
|
+
%td
|
26
|
+
%ul.pl-3
|
27
|
+
- event.event_tickets.each do |ticket|
|
28
|
+
%li= "#{ticket} (#{price_to_currency(ticket.price)})"
|
19
29
|
|
20
|
-
|
21
|
-
|
30
|
+
- if event.event_products.present?
|
31
|
+
%tr
|
32
|
+
%th Add-ons
|
33
|
+
%td
|
34
|
+
%ul.pl-0
|
35
|
+
- event.event_products.each do |product|
|
36
|
+
%li= "#{product} (#{price_to_currency(product.price)})"
|
37
|
+
|
38
|
+
- if event.body.present?
|
39
|
+
%tr
|
40
|
+
%th Description
|
41
|
+
%td= event.body
|
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
=
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
%nav.d-flex.justify-content-center
|
8
|
-
= bootstrap_paginate(@events, per_page: EffectiveEvents.per_page)
|
1
|
+
= card do
|
2
|
+
- if @datatable.present?(self)
|
3
|
+
= render_datatable(@datatable, simple: true)
|
4
|
+
- else
|
5
|
+
%p There are no events open for registration. When there are, we'll show them here.
|
@@ -1,16 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
-
|
4
|
-
.alert.alert-warning This event is sold out.
|
1
|
+
.effective-event
|
2
|
+
- if @event.sold_out?
|
3
|
+
.alert.alert-warning This event is sold out.
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
- if @event.closed?
|
6
|
+
.alert.alert-warning This event is no longer available.
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
- if @event.registerable?
|
9
|
+
.resource-buttons
|
10
|
+
= link_to 'Register', effective_events.new_event_event_registration_path(@event), class: 'btn btn-primary'
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
.event-body.event-content
|
16
|
-
= @event.body
|
12
|
+
= render 'effective/events/event', event: @event
|
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.2.
|
4
|
+
version: 0.2.4
|
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: 2022-
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -243,18 +243,16 @@ files:
|
|
243
243
|
- app/views/effective/event_registrations/_layout.html.haml
|
244
244
|
- app/views/effective/event_registrations/_orders.html.haml
|
245
245
|
- app/views/effective/event_registrations/_summary.html.haml
|
246
|
-
- app/views/effective/event_registrations/_tickets.haml
|
246
|
+
- app/views/effective/event_registrations/_tickets.html.haml
|
247
247
|
- app/views/effective/event_registrations/addons.html.haml
|
248
248
|
- app/views/effective/event_registrations/billing.html.haml
|
249
249
|
- app/views/effective/event_registrations/checkout.html.haml
|
250
250
|
- app/views/effective/event_registrations/start.html.haml
|
251
251
|
- app/views/effective/event_registrations/submitted.html.haml
|
252
252
|
- app/views/effective/event_registrations/summary.html.haml
|
253
|
-
- app/views/effective/event_registrations/tickets.haml
|
253
|
+
- app/views/effective/event_registrations/tickets.html.haml
|
254
254
|
- app/views/effective/events/_dashboard.html.haml
|
255
255
|
- app/views/effective/events/_event.html.haml
|
256
|
-
- app/views/effective/events/_layout.html.haml
|
257
|
-
- app/views/effective/events/_spacer.html.haml
|
258
256
|
- app/views/effective/events/index.html.haml
|
259
257
|
- app/views/effective/events/show.html.haml
|
260
258
|
- app/views/effective/events_mailer/event_registrant_purchased.liquid
|
@@ -1 +0,0 @@
|
|
1
|
-
= yield
|
@@ -1 +0,0 @@
|
|
1
|
-
%hr
|