effective_cpd 0.1.15 → 0.1.19
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe768cdc3715d62c09b0c829d6823db4ce8587fd603244dceb4243976006bb02
|
4
|
+
data.tar.gz: 0540bd3c67a6df4c5fbc2d612ccbc67f834ff46d96a605c2200ac8866f21dfbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00701f9319d26d59b192bf831d7072441661798a2202ba728cdf474b798fc9cfc5e3a013b5b725a45d58f6861192d48684acb6b3aec7508a7787d2e3608433c4
|
7
|
+
data.tar.gz: a363248b7decc2a56fcc86d29748c3c29b97fe6ea256406a10f5a41af69064301158871851e8b3dbe2227e3bd40a8009e95a8f16601a4da8f629027d53e65470
|
@@ -3,6 +3,7 @@ module Effective
|
|
3
3
|
before_action(:authenticate_user!) if defined?(Devise)
|
4
4
|
|
5
5
|
include Effective::WizardController
|
6
|
+
include EffectiveCpdHelper
|
6
7
|
|
7
8
|
resource_scope do
|
8
9
|
cycle = Effective::CpdCycle.find(params[:cpd_cycle_id])
|
@@ -18,11 +19,7 @@ module Effective
|
|
18
19
|
cycle = Effective::CpdCycle.find(params[:cpd_cycle_id])
|
19
20
|
existing = Effective::CpdStatement.where(cpd_cycle: cycle, user: current_user).where.not(id: resource).first
|
20
21
|
|
21
|
-
if existing
|
22
|
-
flash[:danger] = "You have already completed a statement for this #{cpd_cycle_label}."
|
23
|
-
redirect_to(root_path)
|
24
|
-
elsif existing.present?
|
25
|
-
flash[:success] = "You have been redirected to the #{resource_wizard_step_title(existing, existing.next_step)} step."
|
22
|
+
if existing.present?
|
26
23
|
redirect_to effective_cpd.cpd_cycle_cpd_statement_build_path(existing.cpd_cycle, existing, existing.next_step)
|
27
24
|
end
|
28
25
|
end
|
@@ -30,6 +30,16 @@ module Admin
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end.join.html_safe
|
33
|
+
end.search do |collection, term, column, sql_column|
|
34
|
+
user_klass = Effective::CpdAudit.first.user&.class
|
35
|
+
|
36
|
+
if user_klass.present?
|
37
|
+
users = Effective::Resource.new(user_klass).search_any(term)
|
38
|
+
cpd_audit_reviews = Effective::CpdAuditReview.where(user_id: users)
|
39
|
+
collection.where(id: cpd_audit_reviews.select('cpd_audit_id AS id'))
|
40
|
+
else
|
41
|
+
collection.where(id: nil)
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
45
|
col :notification_date, label: 'Date of Notification'
|
@@ -161,7 +161,10 @@ module Effective
|
|
161
161
|
description: existing.description,
|
162
162
|
)
|
163
163
|
|
164
|
-
existing.files.each
|
164
|
+
existing.files.each do |file|
|
165
|
+
blob = EffectiveResources.clone_blob(file.blob)
|
166
|
+
activity.files.attach(blob)
|
167
|
+
end
|
165
168
|
|
166
169
|
activity.assign_attributes(
|
167
170
|
carry_over: existing.carry_forward,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_cpd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
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: 2021-
|
11
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|