effective_cpd 1.7.1 → 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: 502981a987e34f6022514dacb5bc5bbcc9f07a3290b607932c97f057a9a73ed0
4
- data.tar.gz: 47d5f95962bdede3f7590d956c48fc5bded7fd1db9e3f2127400cf049f8f47d7
3
+ metadata.gz: 75542716498f715da71c8a166b9a38c5477329c9a44516222eb0fc2dc45e00b2
4
+ data.tar.gz: 6a1d3fe6ebd4aa13e4780ee9602dd12c15673688355526668589ebadba0c449b
5
5
  SHA512:
6
- metadata.gz: 8368077022f74fd35ea5d2a33daa93f88315bbf7400f42ff4c9ff93144c361ac6f827740e6a7ef232520b1daae9fe3c00d5622d7779b22da10be26cade9c0577
7
- data.tar.gz: 1ae3852f5a4cce0e49744e464f1fa912602496b440fcb8f3aaec8173fc768df1e85c85a81c3058ff41c26c044d3c0ada2d844970cc94ebe018e7b62787578f26
6
+ metadata.gz: d0a806c2098125510d69c5a13e4d89bf89e5b482f10bd776d9b597b19d1e35d98c153471d8cbef4804c5f1ddc2c5facfc050c9fc17303063a1d0ad061d0428d8
7
+ data.tar.gz: 0f1459d6954098fe7794118c28bd4f42333d2496f7ec884b676c72dd37ac528d75570a362777f13334787c6448d6f936aca7eb1f425cc17cda44606257018396
@@ -217,10 +217,13 @@ module Effective
217
217
  level: @cpd_audit.cpd_audit_level.to_s,
218
218
  determination: @cpd_audit.determination.to_s,
219
219
  missing_info_reason: @cpd_audit.missing_info_reason.to_s,
220
- feedback: @cpd_audit.feedback.to_s,
220
+ feedback: (@cpd_audit.feedback.presence || 'No feedback was provided'),
221
221
  },
222
222
  auditee: {
223
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,
224
227
  email: (@cpd_audit.user.email unless @cpd_audit.anonymous?).to_s
225
228
  }
226
229
  }
@@ -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
 
@@ -666,7 +667,7 @@ module EffectiveCpdAudit
666
667
  end
667
668
 
668
669
  def feedback
669
- cpd_audit_reviews.map(&:feedback).join('\n')
670
+ (cpd_audit_reviews.map(&:feedback) - [nil, '', ' ']).join("\n")
670
671
  end
671
672
 
672
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,7 +2,7 @@
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
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.7.1'
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.1
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-24 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