effective_cpd 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6bed34a47adc51ccbd8130374137416ce8c7eb58ad7d3594db16b4498ee889c
|
|
4
|
+
data.tar.gz: 8ef171411108e7e5d203c72733e12c597b99fed21ab7bb74f27097d6da4f797c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dda9b3ec1334ebe58aad35f13e47cca0a69c9711018046454a49aa0ae3d293b2813b871678681c360d2057923877103f2f9831ed02787e0dfadd66a93a435ae9
|
|
7
|
+
data.tar.gz: c7e0f49c69d1fc1c1513fc4bee4d5acd16ff4c28833c6d56179c805db928f5a0efe2bd4c35ee8af5f688c2a2a51745b62a2a967b5dbdab5bdb49a64a04257434
|
|
@@ -2,8 +2,8 @@ module Admin
|
|
|
2
2
|
class EffectiveCpdAuditReviewsDatatable < Effective::Datatable
|
|
3
3
|
filters do
|
|
4
4
|
scope :all
|
|
5
|
-
scope :available, label: 'In Progress'
|
|
6
5
|
scope :completed
|
|
6
|
+
scope :available, label: 'In Progress'
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
datatable do
|
|
@@ -12,7 +12,14 @@ module Admin
|
|
|
12
12
|
col :id, visible: false
|
|
13
13
|
|
|
14
14
|
col :cpd_audit
|
|
15
|
+
|
|
16
|
+
col :auditee do |cpd_audit_review|
|
|
17
|
+
user = cpd_audit_review.cpd_audit.user
|
|
18
|
+
link_to(user, edit_admin_user_path(user))
|
|
19
|
+
end
|
|
20
|
+
|
|
15
21
|
col :user, label: 'Audit Reviewer'
|
|
22
|
+
|
|
16
23
|
col :due_date
|
|
17
24
|
col :submitted_at, as: :date, label: 'Submitted'
|
|
18
25
|
col :conflict_of_interest
|
|
@@ -47,6 +47,29 @@ module Admin
|
|
|
47
47
|
col :due_date
|
|
48
48
|
|
|
49
49
|
col :status
|
|
50
|
+
|
|
51
|
+
col(:cpd_audit_recommendations, label: 'Recommendation', visible: false) do |cpd_audit|
|
|
52
|
+
cpd_audit.cpd_audit_reviews.map(&:recommendation).map do |recommendation|
|
|
53
|
+
content_tag(:div, recommendation.to_s, class: 'col-resource_item')
|
|
54
|
+
end.join.html_safe
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
col(:cpd_audit_reveiw_item_recommendations, label: 'Item Recommendations', search: :string, visible: false) do |cpd_audit|
|
|
58
|
+
recommendations = cpd_audit.cpd_audit_reviews.map(&:recommendation)
|
|
59
|
+
item_recommendations = cpd_audit.cpd_audit_reviews.flat_map { |r| r.cpd_audit_review_items.map(&:recommendation) }
|
|
60
|
+
|
|
61
|
+
reviews = ((recommendations + item_recommendations) - ['', nil]).uniq
|
|
62
|
+
reviews.to_sentence
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
col(:cpd_audit_comments, label: 'Reviewer Comments', search: :string, visible: false) do |cpd_audit|
|
|
66
|
+
item_comments = cpd_audit.cpd_audit_reviews.flat_map { |r| r.cpd_audit_review_items.map(&:comments) }.join
|
|
67
|
+
|
|
68
|
+
cpd_audit.cpd_audit_reviews.map(&:comments).map do |comments|
|
|
69
|
+
content_tag(:div, simple_format(comments.to_s + item_comments), class: 'col-resource_item')
|
|
70
|
+
end.join.html_safe
|
|
71
|
+
end
|
|
72
|
+
|
|
50
73
|
col :determination
|
|
51
74
|
|
|
52
75
|
col(:auditee_cpd_statements, label: 'Auditee Statements', visible: false) do |cpd_audit|
|
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.3.
|
|
4
|
+
version: 0.3.3
|
|
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-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|