effective_events 0.2.2 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/effective/event_registrations_controller.rb +0 -33
- data/app/datatables/admin/effective_event_registrants_datatable.rb +1 -1
- data/app/datatables/effective_event_registrants_datatable.rb +1 -1
- data/app/views/effective/event_registrants/_fields.html.haml +1 -1
- data/db/seeds.rb +6 -0
- data/lib/effective_events/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab282b6e5ef6cd139915119d5bce34cb49192c0f1b4779af718a1ecbc89e79b
|
4
|
+
data.tar.gz: 68a979b44d79a825b38b66ae1ff65d015a0b105d962dcaddf1d16eaca16dea0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b94ed2cc8d1fa22fa47797fee3c33871fb5bf5a89896eb9dc686de50563e184bd42feb07888d3f410e29a345cce9b3b5fcd2c79f8191423a81bb1791927faf0
|
7
|
+
data.tar.gz: 3a511dc708dbee72c8803ce7f990d236043c30b2379bc1733c9fc26a888b3e302500712ecd5b3f4c3c0dee14b1555bc18ad8df4ac222c2ac695979ede4c503c1
|
@@ -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
|
@@ -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
|
@@ -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
|
data/db/seeds.rb
CHANGED
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.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: 2022-
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|