effective_cpd 1.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/admin/cpd_audits_controller.rb +7 -0
  3. data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +1 -1
  4. data/app/helpers/effective_cpd_audits_helper.rb +18 -0
  5. data/app/models/concerns/effective_cpd_audit.rb +43 -3
  6. data/app/models/concerns/effective_cpd_audit_review.rb +4 -1
  7. data/app/models/concerns/effective_cpd_user.rb +10 -0
  8. data/app/models/effective/cpd_audit_response_option.rb +5 -0
  9. data/app/views/admin/cpd_audit_reviews/_form.html.haml +4 -1
  10. data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +2 -2
  11. data/app/views/admin/cpd_audits/_form_chat.html.haml +9 -0
  12. data/app/views/admin/cpd_audits/_form_close.html.haml +1 -1
  13. data/app/views/admin/cpd_audits/_form_complete.html.haml +25 -9
  14. data/app/views/admin/cpd_audits/_form_deadlines.html.haml +3 -3
  15. data/app/views/admin/cpd_audits/_form_new.html.haml +2 -0
  16. data/app/views/admin/cpd_audits/_form_new_fields.html.haml +1 -0
  17. data/app/views/admin/cpd_audits/_form_process.html.haml +2 -2
  18. data/app/views/admin/cpd_audits/_status.html.haml +8 -3
  19. data/app/views/effective/cpd/_dashboard.html.haml +4 -0
  20. data/app/views/effective/cpd_audit_review_items/_fields.html.haml +1 -1
  21. data/app/views/effective/cpd_audit_reviews/_feedback.html.haml +1 -1
  22. data/app/views/effective/cpd_audit_reviews/_summary.html.haml +6 -2
  23. data/app/views/effective/cpd_audit_reviews/conflict.html.haml +1 -1
  24. data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +1 -1
  25. data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +1 -1
  26. data/app/views/effective/cpd_audit_reviews/feedback.html.haml +2 -2
  27. data/app/views/effective/cpd_audit_reviews/files.html.haml +1 -1
  28. data/app/views/effective/cpd_audit_reviews/instructions.html.haml +2 -2
  29. data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +1 -1
  30. data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +1 -1
  31. data/app/views/effective/cpd_audit_reviews/statements.html.haml +1 -1
  32. data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
  33. data/app/views/effective/cpd_audits/_missing_info.html.haml +1 -1
  34. data/app/views/effective/cpd_audits/_summary.html.haml +2 -0
  35. data/app/views/effective/cpd_audits/_summary_fields.html.haml +1 -0
  36. data/app/views/effective/cpd_audits/submit.html.haml +2 -2
  37. data/db/migrate/01_create_effective_cpd.rb.erb +2 -0
  38. data/lib/effective_cpd/version.rb +1 -1
  39. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13796b4516c32b7fd046c28fdaa1f034446e31e244c3012e9d6a0e1018feadac
4
- data.tar.gz: 0a6b9cefe19dc6b61194037bfd2856f90dc74d09033b78a3edcbb508cbd92239
3
+ metadata.gz: eed65d1a331a6a09e8f5435d1f200f646680773b271d0000358438c09122d29e
4
+ data.tar.gz: 117455812ab24c1d74a19ba95ca4eccfebc3d2085094c394b272c47464ca9907
5
5
  SHA512:
6
- metadata.gz: ceaa617e8d6f772d12dd08009b00df480098c268ff65dc03e5ee11da3a556353cd4ae507324497c8a1b1610810a9cc4ac811803c7c02b6d28749f3715a19fe45
7
- data.tar.gz: 6bae554b970a8edb702b57fb18a401191fc7da6ff5acddaf21db76c1d6a4ab452a7f53e8c72178d7ed451a94ed72f155d2f7e5f5a4e6d0abdfb794eeab7e8cf1
6
+ metadata.gz: fa0036e716e1c6b8871d4f149eb8e3f5c372d32888e8c4fd21c5bcda4763adb2eb069e4eaa77ff210172d4dcfff3c746fcc86c5e8720f83a133aa238a4481eb7
7
+ data.tar.gz: baca0a12db533c7f1fc5dbb1ba9f1ae180b44aa18f30aa0bd360cff51898a4d1e24028f5f30a763e1cd01448bcabff2c3a5a533f6410dbfd0b6eece12ab32f40
@@ -43,6 +43,13 @@ module Admin
43
43
  ].compact.join(' ')
44
44
  }
45
45
 
46
+ submit :complete, 'Ready to Review', success: -> {
47
+ [
48
+ "Successfully completed #{resource}",
49
+ ("and sent reviewers an audit ready notification" unless resource.email_form_skip)
50
+ ].compact.join(' ')
51
+ }
52
+
46
53
  submit :missing, 'Missing Info', success: -> {
47
54
  [
48
55
  "Successfully marked #{resource} as missing info",
@@ -26,7 +26,7 @@ module Admin
26
26
  col :submitted_at, as: :date, label: 'Submitted'
27
27
  col :conflict_of_interest
28
28
  col :recommendation
29
- col :comments
29
+ col :comments, label: 'Reviewer notes'
30
30
 
31
31
  actions_col(edit: false)
32
32
  end
@@ -12,5 +12,23 @@ module EffectiveCpdAuditsHelper
12
12
  [['Yes, I would like to request an extension', true], ['No extension request', false]]
13
13
  end
14
14
 
15
+ def cpd_audit_new_reviewer_collection(cpd_audit = nil)
16
+ cpd_audit ||= EffectiveCpd.CpdAudit.new
17
+ raise('expected a cpd audit') unless cpd_audit.class.respond_to?(:effective_cpd_audit?)
18
+
19
+ cpd_audit.current_user = current_user
20
+ users = cpd_audit.suggested_cpd_audit_reviewers()
21
+
22
+ users.map do |user|
23
+ in_progress = content_tag(:span, class: 'badge badge-info') do
24
+ reviews = user.cpd_audit_reviews.count { |review| review.in_progress? }
25
+ "#{pluralize(reviews, 'review')} in progress"
26
+ end
27
+
28
+ html = content_tag(:div, "#{user} #{in_progress}")
29
+
30
+ [user.to_s, user.to_param, { 'data-html': html }]
31
+ end
32
+ end
15
33
 
16
34
  end
@@ -36,6 +36,10 @@ module EffectiveCpdAudit
36
36
  [:opened, :started, :conflicted_resolved, :exemption_denied, :extension_granted, :extension_denied]
37
37
  end
38
38
 
39
+ def chat_permissions
40
+ ['Can send messages until closed', 'Always send messages', 'Never send messages']
41
+ end
42
+
39
43
  end
40
44
 
41
45
  included do
@@ -150,6 +154,9 @@ module EffectiveCpdAudit
150
154
  reviewed_at :datetime, permitted: false
151
155
  closed_at :datetime, permitted: false
152
156
 
157
+ # To control permission of sending messages
158
+ chat_permission :string, permitted: false
159
+
153
160
  # Acts as tokyyened
154
161
  token :string, permitted: false
155
162
 
@@ -181,6 +188,7 @@ module EffectiveCpdAudit
181
188
  before_validation(if: -> { new_record? }) do
182
189
  self.notification_date ||= Time.zone.now
183
190
  self.due_date ||= deadline_to_submit()
191
+ self.chat_permission ||= self.class.chat_permissions.first
184
192
  end
185
193
 
186
194
  with_options(if: -> { cpd_audit_level&.anonymous? }) do
@@ -222,6 +230,12 @@ module EffectiveCpdAudit
222
230
  end
223
231
  end
224
232
 
233
+ validate(if: -> { chat_permission.present? }) do
234
+ unless self.class.chat_permissions.include?(chat_permission)
235
+ self.errors.add(:chat_permission, 'is invalid')
236
+ end
237
+ end
238
+
225
239
  # If we're submitted. Check if we can go into reviewed?
226
240
  before_save(if: -> { submitted? }) { try_complete! }
227
241
  before_save(if: -> { completed? }) { try_review! }
@@ -289,6 +303,14 @@ module EffectiveCpdAudit
289
303
  chat
290
304
  end
291
305
 
306
+ def chat_url(chat:, user:, root_url:)
307
+ resource = if user.try(:cpd_audit_reviewer?)
308
+ cpd_audit_reviews.find { |review| review.user == user } || raise('expected to find existing reviewer')
309
+ end || self
310
+
311
+ [root_url.chomp('/'), resource.class.table_name, resource.to_param, 'chat'].join('/')
312
+ end
313
+
292
314
  end
293
315
 
294
316
  def to_s
@@ -323,6 +345,18 @@ module EffectiveCpdAudit
323
345
  was_completed?
324
346
  end
325
347
 
348
+ def chat_until_closed?
349
+ chat_permission == 'Can send messages until closed'
350
+ end
351
+
352
+ def chat_always?
353
+ chat_permission == 'Always send messages'
354
+ end
355
+
356
+ def chat_never?
357
+ chat_permission == 'Never send messages'
358
+ end
359
+
326
360
  def status_label
327
361
  (status_was || status).to_s.gsub('_', ' ')
328
362
  end
@@ -352,11 +386,11 @@ module EffectiveCpdAudit
352
386
  when 'submitted'
353
387
  summary = "Auditee has submitted their audit wizard."
354
388
  tasks = "The following tasks remain before it can be completed:"
355
- approval = "Waiting on complete, review and determination."
389
+ approval = "Waiting on completeness check, review and determination."
356
390
  items = completed_requirements.map { |item, done| "<li>#{item}: #{done ? 'Complete' : 'Incomplete'}</li>" }.join
357
391
  completed_requirements.present? ? "<p>#{summary} #{tasks}</p><ul>#{items}</ul>" : "#{summary} #{approval}"
358
392
  when 'completed'
359
- "All required materials have been provided. This audit will transition to 'reviewed' after all reviewers have finished."
393
+ "All required materials have been provided. Ready to review. This audit will transition to 'reviewed' after all reviewers have finished."
360
394
  when 'missing_info'
361
395
  "Missing the following information: <ul><li>#{missing_info_reason}</li></ul>"
362
396
  when 'reviewed'
@@ -508,11 +542,13 @@ module EffectiveCpdAudit
508
542
  def complete!
509
543
  raise('audit must have been submitted to complete!') unless was_submitted?
510
544
 
545
+ existing = cpd_audit_reviews.select { |cpd_audit_review| cpd_audit_review.persisted? }
546
+
511
547
  assign_attributes(missing_info_reason: nil)
512
548
  completed!
513
549
 
514
550
  # Each of these sends a cpd_audit_review_ready email
515
- cpd_audit_reviews.each { |cpd_audit_review| cpd_audit_review.ready! }
551
+ existing.each { |cpd_audit_review| cpd_audit_review.ready! }
516
552
 
517
553
  true
518
554
  end
@@ -616,4 +652,8 @@ module EffectiveCpdAudit
616
652
  assign_attributes(anonymous_number: number, anonymous_name: name)
617
653
  end
618
654
 
655
+ def suggested_cpd_audit_reviewers
656
+ (current_user || user).class.send(EffectiveCpd.audit_reviewer_user_scope).sorted_by_in_progress_cpd_audit_reviews
657
+ end
658
+
619
659
  end
@@ -125,7 +125,10 @@ module EffectiveCpdAuditReview
125
125
  validates :anonymous_number, presence: true
126
126
  end
127
127
 
128
- after_commit(on: :create) { send_email(:cpd_audit_review_opened) }
128
+ after_commit(on: :create) {
129
+ send_email(cpd_audit.was_completed? ? :cpd_audit_review_ready : :cpd_audit_review_opened)
130
+ }
131
+
129
132
  after_commit(on: :destroy) { cpd_audit.try_review! }
130
133
 
131
134
  def dynamic_wizard_statement_steps
@@ -26,6 +26,16 @@ module EffectiveCpdUser
26
26
 
27
27
  scope :cpd_audit_auditees, -> { without_role(:cpd_audit_reviewer).without_role(:admin) }
28
28
  scope :cpd_audit_reviewers, -> { with_role(:cpd_audit_reviewer) }
29
+
30
+ scope :sorted_by_in_progress_cpd_audit_reviews, -> {
31
+ left_joins(:cpd_audit_reviews)
32
+ .where(cpd_audit_reviews: { submitted_at: nil})
33
+ .includes(:cpd_audit_reviews)
34
+ .group(:id)
35
+ .order('COUNT(cpd_audit_reviews.id) ASC')
36
+ .order('MAX(cpd_audit_reviews.created_at) ASC')
37
+ .order('id ASC')
38
+ }
29
39
  end
30
40
 
31
41
  # This one will actually be enforced or displayed first
@@ -2,5 +2,10 @@ module Effective
2
2
  class CpdAuditResponseOption < ActiveRecord::Base
3
3
  belongs_to :cpd_audit_response
4
4
  belongs_to :cpd_audit_level_question_option
5
+
6
+ def to_s
7
+ cpd_audit_level_question_option.to_s
8
+ end
9
+
5
10
  end
6
11
  end
@@ -11,6 +11,9 @@
11
11
  = render('admin/cpd_audits/audit_reviewer_fields', f: f)
12
12
 
13
13
  %p Send email
14
- = email_form_fields(f, :cpd_audit_review_opened)
14
+ - if cpd_audit_review.cpd_audit&.was_completed?
15
+ = email_form_fields(f, :cpd_audit_review_ready)
16
+ - else
17
+ = email_form_fields(f, :cpd_audit_review_opened)
15
18
 
16
19
  = effective_submit(f)
@@ -1,2 +1,2 @@
1
- - collection = current_user.class.send(EffectiveCpd.audit_reviewer_user_scope)
2
- = f.select :user, { 'Audit Reviewers' => collection }, label: 'Audit Reviewer', polymorphic: true
1
+ = f.hidden_field :user_type, value: current_user.class.name
2
+ = f.select :user_id, cpd_audit_new_reviewer_collection(f.object.cpd_audit), label: 'Audit Reviewer'
@@ -1,3 +1,12 @@
1
+ = card('Chat Permission') do
2
+ = effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
3
+ %p By default, auditees and reviewers can send messages until the audit is closed.
4
+
5
+ .row
6
+ .col-sm-6
7
+ = f.select :chat_permission, cpd_audit.class.chat_permissions, label: false
8
+ = f.submit 'Save', center: true, border: false
9
+
1
10
  - if cpd_audit.chat.present?
2
11
  = render('effective/chats/chat', chat: cpd_audit.chat)
3
12
  - else
@@ -1,6 +1,6 @@
1
1
  = card('Determination') do
2
2
  = effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
3
- %p This action will close this audit with the following determination:
3
+ %p This action will <strong>close</strong> this audit with the following determination:
4
4
 
5
5
  = f.select :determination, cpd_audit.cpd_audit_level.determinations
6
6
 
@@ -1,17 +1,33 @@
1
1
  = effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
2
2
  = f.hidden_field :id
3
3
 
4
- %p The #{cpd_audit} will be marked <strong>completed</strong>. All deliverables have been received and all requirements completed.
4
+ %p This audit will be marked as <strong>completed information</strong> and <strong>ready for review</strong>.
5
5
 
6
- %p The audit reviewer(s) will be notified that this audit is ready to review.
6
+ - reviewers = cpd_audit.cpd_audit_reviews
7
7
 
8
- %h3 Email to send
9
- %p
8
+ - if reviewers.present?
9
+ %h3 Email to send
10
+ %p
11
+ - email = Effective::EmailTemplate.where(template_name: :cpd_audit_review_ready).first!
10
12
 
11
- An
12
- - email = Effective::EmailTemplate.where(template_name: :cpd_audit_review_ready).first!
13
- = link_to('cpd_audit_review_ready email', effective_email_templates.edit_admin_email_template_path(email))
13
+ The existing
14
+ = link_to(pluralize(reviewers.length, 'assigned reviewer'), '#audit-reviews', 'data-click-tab': true)
15
+ will be sent an
16
+ = link_to('cpd_audit_review_ready email', effective_email_templates.edit_admin_email_template_path(email))
17
+ email.
14
18
 
15
- email will be sent to each reviewer.
19
+ - if reviewers.blank?
20
+ %p Please assign one or more reviewers:
16
21
 
17
- = f.submit 'Complete Audit', border: false, center: true, 'data-confirm': "Complete #{f.object}?"
22
+ - # Pre-select the first reviewer if present
23
+ - if f.object.cpd_audit_reviews.blank?
24
+ - f.object.cpd_audit_reviews.build(user: cpd_audit.suggested_cpd_audit_reviewers.first)
25
+
26
+ = f.has_many :cpd_audit_reviews, class: 'tight' do |fr|
27
+ = card('Reviewer') do
28
+ = render('admin/cpd_audits/audit_reviewer_fields', form: fr, f: fr)
29
+
30
+ %p Send email
31
+ = email_form_fields(fr, :cpd_audit_review_ready)
32
+
33
+ = f.submit 'Ready to Review', border: false, center: true, 'data-confirm': "Complete #{f.object}?"
@@ -2,9 +2,9 @@
2
2
  %p The audittee has the following deadlines:
3
3
 
4
4
  %ul
5
- %li To declare conflict of interest: #{f.object.deadline_to_conflict_of_interest}
6
- %li To request exemption: #{f.object.deadline_to_exemption}
7
- %li To request extension: #{f.object.deadline_to_extension}
5
+ %li To declare conflict of interest: #{f.object.deadline_to_conflict_of_interest.presence || 'None'}
6
+ %li To request exemption: #{f.object.deadline_to_exemption.presence || 'None'}
7
+ %li To request extension: #{f.object.deadline_to_extension.presence || 'None'}
8
8
 
9
9
  = f.check_box :ignore_deadlines, label: 'Yes, ignore audittee deadlines and allow these actions to be performed'
10
10
 
@@ -8,6 +8,8 @@
8
8
  = f.date_field :notification_date, label: 'Date of notification', required: false,
9
9
  hint: "the starting date for any deadline calculations. leave blank for today's date"
10
10
 
11
+ = render('admin/cpd_audits/form_new_fields', form: f, f: f)
12
+
11
13
  %h2 Auditee
12
14
  = card('Auditee') do
13
15
  %p.text-muted The auditee is the person being audited
@@ -0,0 +1 @@
1
+ -# Intentionally blank
@@ -6,7 +6,7 @@
6
6
 
7
7
  = accordion do
8
8
  - if EffectiveResources.authorized?(self, :complete, cpd_audit)
9
- = collapse 'Complete this Audit' do
9
+ = collapse 'Ready for Review' do
10
10
  = render('admin/cpd_audits/form_complete', cpd_audit: cpd_audit)
11
11
 
12
12
  - if EffectiveResources.authorized?(self, :missing, cpd_audit)
@@ -14,5 +14,5 @@
14
14
  = render('admin/cpd_audits/form_missing_info', cpd_audit: cpd_audit)
15
15
 
16
16
  - if EffectiveResources.authorized?(self, :close, cpd_audit)
17
- = collapse 'Close Audit with Determination' do
17
+ = collapse 'Close with Determination' do
18
18
  = render('admin/cpd_audits/form_close', cpd_audit: cpd_audit)
@@ -98,7 +98,7 @@
98
98
  - # Waiting to Complete
99
99
  - unless cpd_audit.was_completed?
100
100
  %tr
101
- %td Waiting to Complete
101
+ %td Ready Check
102
102
  %td= cpd_audit.submitted_at&.strftime('%F') || '-'
103
103
  %td
104
104
  - cpd_audit.completed_requirements.each do |requirement, completed|
@@ -108,7 +108,7 @@
108
108
 
109
109
  %td
110
110
  - if cpd_audit.submitted?
111
- = link_to 'Complete Audit', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
111
+ = link_to 'Process: Ready or Missing Info', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
112
112
 
113
113
  - # Missing Information
114
114
  %tr
@@ -120,10 +120,15 @@
120
120
  - if cpd_audit.was_missing_info? && cpd_audit.missing_info_reason.blank?
121
121
  = icon('check', class: 'small-1')
122
122
  Done
123
+
124
+ - if cpd_audit.was_completed? && !cpd_audit.was_missing_info?
125
+ = icon('check', class: 'small-1')
126
+ No Missing Info
127
+
123
128
  %td
124
129
 
125
130
  %tr
126
- %td Complete
131
+ %td Ready for Review
127
132
  %td= cpd_audit.completed_at&.strftime('%F') || '-'
128
133
  %td
129
134
  - if cpd_audit.was_completed?
@@ -40,6 +40,10 @@
40
40
  %p You have completed these past statements:
41
41
  = render_datatable(completed, simple: true)
42
42
 
43
+ - unless current_user.try(:cpd_audit_reviewer?)
44
+ - if auditing.blank? && audited.blank? && available.blank? && completed.blank?
45
+ %p There are no activities available right now. When there are, we'll show them here.
46
+
43
47
  - if current_user.try(:cpd_audit_reviewer?)
44
48
  - # Auditor / Audit reviewer datatables (2)
45
49
  - reviewing = EffectiveCpdAvailableAuditReviewsDatatable.new(self)
@@ -8,4 +8,4 @@
8
8
  - else
9
9
  = f.radios :recommendation, recommendations, inline: true
10
10
 
11
- = f.text_area :comments
11
+ = f.text_area :comments, label: 'Notes'
@@ -2,7 +2,7 @@
2
2
  %table.table
3
3
  %tbody
4
4
  %tr
5
- %td{colspan: 2}
5
+ %td
6
6
  - if cpd_audit_review.feedback.present?
7
7
  = simple_format(cpd_audit_review.feedback)
8
8
  - else
@@ -70,5 +70,9 @@
70
70
  %td= cpd_audit_review.recommendation.presence || '-'
71
71
 
72
72
  %tr
73
- %th Reviewer Comments
74
- %td= cpd_audit_review.comments.presence || 'No comments'
73
+ %th Reviewer Notes
74
+ %td
75
+ - if cpd_audit_review.comments.present?
76
+ = simple_format(cpd_audit_review.comments)
77
+ - else
78
+ = '-'
@@ -20,6 +20,6 @@
20
20
  = f.text_area :conflict_of_interest_reason, required: true
21
21
 
22
22
  %hr
23
- = f.text_area :comments, label: 'Reviewer comments'
23
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
24
24
 
25
25
  = f.submit 'Save and Continue', center: true
@@ -38,6 +38,6 @@
38
38
  .mb-2= cpd_audit_level_section.bottom_content.to_s
39
39
 
40
40
  %hr
41
- = f.text_area :comments, label: 'Reviewer comments'
41
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
42
42
 
43
43
  = f.submit 'Save and Continue', center: true
@@ -30,6 +30,6 @@
30
30
  = render('/effective/cpd_audit_review_items/fields', f: fi, cpd_audit_review: resource)
31
31
 
32
32
  %hr
33
- = f.text_area :comments, label: 'Reviewer comments'
33
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
34
34
 
35
35
  = f.submit 'Save and Continue', center: true
@@ -3,7 +3,7 @@
3
3
  = collapse('Show audit...', card_class: '') do
4
4
  .mt-4= render('effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit)
5
5
 
6
- %p Please provide any feedback for #{resource.cpd_audit.name}:
6
+ %p Please provide any final feedback for #{resource.cpd_audit.name}:
7
7
 
8
8
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
9
9
  = f.hidden_field :current_step
@@ -11,6 +11,6 @@
11
11
  = f.text_area :feedback, label: 'Feedback for the auditee'
12
12
 
13
13
  %hr
14
- = f.text_area :comments, label: 'Reviewer comments'
14
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
15
15
 
16
16
  = f.submit 'Save and Continue', center: true
@@ -12,6 +12,6 @@
12
12
  %li= link_to(file.filename, url_for(file), target: '_blank')
13
13
 
14
14
  %hr
15
- = f.text_area :comments, label: 'Reviewer comments'
15
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
16
16
 
17
17
  = f.submit 'Save and Continue', center: true
@@ -4,7 +4,7 @@
4
4
 
5
5
  %hr
6
6
 
7
- %p The following rolling comments will be displayed for your use on each step.
8
- = f.text_area :comments, label: 'Reviewer comments'
7
+ %p The following rolling notes will be displayed for your use on each step.
8
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
9
9
 
10
10
  = f.submit 'Save and Continue', center: true
@@ -3,6 +3,6 @@
3
3
  = f.hidden_field :current_step
4
4
 
5
5
  %hr
6
- = f.text_area :comments, label: 'Reviewer comments'
6
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
7
7
 
8
8
  = f.submit 'Save and Continue', center: true
@@ -18,6 +18,6 @@
18
18
  = f.radios :recommendation, recommendations, inline: true
19
19
 
20
20
  %hr
21
- = f.text_area :comments, label: 'Reviewer comments'
21
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
22
22
 
23
23
  = f.submit 'Save and Continue', center: true
@@ -23,6 +23,6 @@
23
23
  = f.hidden_field :current_step
24
24
 
25
25
  %hr
26
- = f.text_area :comments, label: 'Reviewer comments'
26
+ = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
27
27
 
28
28
  = f.submit 'Save and Continue', center: true
@@ -11,4 +11,4 @@
11
11
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
12
12
  = f.hidden_field :current_step
13
13
 
14
- = f.submit 'Submit Audit Review', center: true
14
+ = f.submit 'Submit Audit Review', center: true, 'data-confirm': "Really Submit Audit Review?"
@@ -5,7 +5,7 @@
5
5
 
6
6
  %p
7
7
  Please revisit each wizard step and
8
- = link_to 'Complete all missing information', wizard_path(:information), class: 'btn btn-primary'
8
+ = link_to 'Complete all missing information', wizard_path(:instructions), class: 'btn btn-primary'
9
9
  for this audit.
10
10
 
11
11
  %p
@@ -40,6 +40,8 @@
40
40
  %br
41
41
  %small= mail_to cpd_audit_review.user.email
42
42
 
43
+ = render('effective/cpd_audits/summary_fields', cpd_audit: cpd_audit)
44
+
43
45
  %tr
44
46
  %th Date of notification
45
47
  %td= cpd_audit.notification_date.strftime('%F')
@@ -0,0 +1 @@
1
+ - # Intentionally blank
@@ -13,6 +13,6 @@
13
13
  = f.hidden_field :current_step
14
14
 
15
15
  - if EffectiveResources.authorized?(self, :resubmit, resource)
16
- = f.submit 'Resubmit Audit', center: true
16
+ = f.submit 'Resubmit Audit', center: true, 'data-confirm': "Really Resubmit Audit?"
17
17
  - else
18
- = f.submit 'Submit Audit', center: true
18
+ = f.submit 'Submit Audit', center: true, 'data-confirm': "Really Submit Audit?"
@@ -227,6 +227,8 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
227
227
 
228
228
  t.string :token
229
229
 
230
+ t.string :chat_permission
231
+
230
232
  t.datetime :updated_at
231
233
  t.datetime :created_at
232
234
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.3'
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.2.1
4
+ version: 1.2.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: 2023-01-23 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -311,6 +311,7 @@ files:
311
311
  - app/views/admin/cpd_audits/_form_files.html.haml
312
312
  - app/views/admin/cpd_audits/_form_missing_info.html.haml
313
313
  - app/views/admin/cpd_audits/_form_new.html.haml
314
+ - app/views/admin/cpd_audits/_form_new_fields.html.haml
314
315
  - app/views/admin/cpd_audits/_form_process.html.haml
315
316
  - app/views/admin/cpd_audits/_status.html.haml
316
317
  - app/views/admin/cpd_bulk_audits/_form.html.haml
@@ -393,6 +394,7 @@ files:
393
394
  - app/views/effective/cpd_audits/_layout.html.haml
394
395
  - app/views/effective/cpd_audits/_missing_info.html.haml
395
396
  - app/views/effective/cpd_audits/_summary.html.haml
397
+ - app/views/effective/cpd_audits/_summary_fields.html.haml
396
398
  - app/views/effective/cpd_audits/_waiting.html.haml
397
399
  - app/views/effective/cpd_audits/chat.html.haml
398
400
  - app/views/effective/cpd_audits/conflict.html.haml