effective_cpd 1.7.0 → 1.7.2

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: 94c7c2fc57c5109c37e1ae0216f297eebb6556210e96db897e6592cd357b49e7
4
- data.tar.gz: 2561bc3bae5ca830c72ad9b3499b0e303db66fa5121c685b2d15fb3a5743da85
3
+ metadata.gz: 75542716498f715da71c8a166b9a38c5477329c9a44516222eb0fc2dc45e00b2
4
+ data.tar.gz: 6a1d3fe6ebd4aa13e4780ee9602dd12c15673688355526668589ebadba0c449b
5
5
  SHA512:
6
- metadata.gz: 750ffcaba4258184debafb988238cbe47774b19a74a494656d600dff4234fc1e94d057040f177f9c07348e81ad2f32258abe52f76b4d4e3a53fa163562586d97
7
- data.tar.gz: 6571b2816b5616a2fd00928d3ebf142cf7ada391eccd5b7bfa9ca18e5ecc1708ba2d3728e5a67fe046b21879158d04ed2b45a5a3352faaae5dbcbfcc2bf28453
6
+ metadata.gz: d0a806c2098125510d69c5a13e4d89bf89e5b482f10bd776d9b597b19d1e35d98c153471d8cbef4804c5f1ddc2c5facfc050c9fc17303063a1d0ad061d0428d8
7
+ data.tar.gz: 0f1459d6954098fe7794118c28bd4f42333d2496f7ec884b676c72dd37ac528d75570a362777f13334787c6448d6f936aca7eb1f425cc17cda44606257018396
@@ -216,10 +216,14 @@ module Effective
216
216
  title: @cpd_audit.to_s,
217
217
  level: @cpd_audit.cpd_audit_level.to_s,
218
218
  determination: @cpd_audit.determination.to_s,
219
- missing_info_reason: @cpd_audit.missing_info_reason.to_s
219
+ missing_info_reason: @cpd_audit.missing_info_reason.to_s,
220
+ feedback: (@cpd_audit.feedback.presence || 'No feedback was provided'),
220
221
  },
221
222
  auditee: {
222
223
  name: @cpd_audit.name,
224
+ real_name: @cpd_audit.user.to_s,
225
+ real_first_name: @cpd_audit.user.first_name,
226
+ real_last_name: @cpd_audit.user.last_name,
223
227
  email: (@cpd_audit.user.email unless @cpd_audit.anonymous?).to_s
224
228
  }
225
229
  }
@@ -228,7 +232,8 @@ module Effective
228
232
  {
229
233
  review: {
230
234
  title: @cpd_audit_review.to_s,
231
- recommendation: @cpd_audit_review.recommendation.to_s
235
+ recommendation: @cpd_audit_review.recommendation.to_s,
236
+ feedback: @cpd_audit_review.feedback.to_s,
232
237
  },
233
238
  reviewer: {
234
239
  name: @cpd_audit_review.name,
@@ -248,6 +248,7 @@ module EffectiveCpdAudit
248
248
  end
249
249
 
250
250
  def wizard_step_title(step)
251
+ return 'Closed' if step == :submitted && closed?
251
252
  self.class::WIZARD_STEPS[step] || dynamic_wizard_steps.fetch(step)
252
253
  end
253
254
 
@@ -665,4 +666,8 @@ module EffectiveCpdAudit
665
666
  (current_user || user).class.send(EffectiveCpd.audit_reviewer_user_scope).sorted_by_in_progress_cpd_audit_reviews
666
667
  end
667
668
 
669
+ def feedback
670
+ (cpd_audit_reviews.map(&:feedback) - [nil, '', ' ']).join("\n")
671
+ end
672
+
668
673
  end
@@ -67,6 +67,13 @@
67
67
  %th Determination
68
68
  %td= cpd_audit.determination.presence || '-'
69
69
 
70
+ - if cpd_audit.closed?
71
+ %tr
72
+ %th Feedback
73
+ %td
74
+ - feedback = cpd_audit.feedback.presence || 'No feedback was provided'
75
+ = simple_format(feedback)
76
+
70
77
  %tr
71
78
  %th Summary
72
79
  %td= cpd_audit.summary
@@ -1,9 +1,9 @@
1
1
  = render('layout') do
2
2
  - raise('expected a submitted or conflicted cpd_audit') unless (resource.was_submitted? || resource.was_conflicted? || resource.closed?)
3
3
 
4
- - if resource.was_submitted?
4
+ - if resource.closed?
5
5
  .alert.alert-success.mb-4
6
- This #{cpd_audit_label} was submitted on #{resource.submitted_at.strftime('%F')}
6
+ This #{cpd_audit_label} was closed on #{resource.closed_at.strftime('%F')}
7
7
 
8
8
  - if resource.missing_info?
9
9
  = card do
@@ -2,12 +2,16 @@
2
2
  subject: 'Your CPD Audit has been closed with a determination'
3
3
  from: 'admin@example.com'
4
4
  ---
5
- Hello {{ auditee.name }},
5
+ Hello {{ auditee.real_first_name }},
6
6
 
7
7
  Your {{ audit.title }} has been closed.
8
8
 
9
9
  The following determination was made: {{ audit.determination }}
10
10
 
11
+ The following feedback was provided by the reviewer:
12
+
13
+ {{ audit.feedback }}
14
+
11
15
  Please check below for any additional details
12
16
 
13
17
  {{ url }}
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.2'
3
3
  end
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: 1.7.0
4
+ version: 1.7.2
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: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,20 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: psych
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "<"
214
+ - !ruby/object:Gem::Version
215
+ version: '4'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "<"
221
+ - !ruby/object:Gem::Version
222
+ version: '4'
209
223
  description: Continuing professional development and audits rails engine
210
224
  email:
211
225
  - info@codeandeffect.com
@@ -483,7 +497,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
483
497
  - !ruby/object:Gem::Version
484
498
  version: '0'
485
499
  requirements: []
486
- rubygems_version: 3.4.10
500
+ rubygems_version: 3.3.7
487
501
  signing_key:
488
502
  specification_version: 4
489
503
  summary: Continuing professional development and audits rails engine