effective_cpd 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/admin/cpd_audit_levels_controller.rb +2 -2
- data/app/controllers/admin/cpd_audit_reviews_controller.rb +2 -2
- data/app/controllers/admin/cpd_audits_controller.rb +15 -1
- data/app/controllers/admin/cpd_statements_controller.rb +1 -1
- data/app/controllers/effective/cpd_audit_reviews_controller.rb +3 -39
- data/app/controllers/effective/cpd_audits_controller.rb +3 -41
- data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +3 -1
- data/app/datatables/admin/effective_cpd_audits_datatable.rb +11 -9
- data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +4 -4
- data/app/datatables/effective_cpd_available_audits_datatable.rb +1 -1
- data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +3 -3
- data/app/datatables/effective_cpd_completed_audits_datatable.rb +2 -2
- data/app/helpers/effective_cpd_audits_helper.rb +0 -32
- data/app/mailers/effective/cpd_mailer.rb +37 -24
- data/app/models/concerns/effective_cpd_audit.rb +235 -66
- data/app/models/concerns/effective_cpd_audit_level.rb +7 -4
- data/app/models/concerns/effective_cpd_audit_review.rb +121 -65
- data/app/models/concerns/effective_cpd_user.rb +10 -5
- data/app/models/effective/cpd_audit_level_question.rb +1 -1
- data/app/models/effective/cpd_audit_level_section.rb +4 -3
- data/app/models/effective/cpd_audit_response.rb +3 -2
- data/app/models/effective/cpd_audit_review_item.rb +1 -1
- data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +7 -1
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +2 -0
- data/app/views/admin/cpd_audit_reviews/_form.html.haml +4 -1
- data/app/views/admin/cpd_audits/_form.html.haml +1 -49
- data/app/views/admin/cpd_audits/{_form_determination.html.haml → _form_close.html.haml} +1 -1
- data/app/views/admin/cpd_audits/_form_complete.html.haml +17 -0
- data/app/views/admin/cpd_audits/_form_cpd_audit.html.haml +56 -0
- data/app/views/admin/cpd_audits/_form_deadlines.html.haml +8 -9
- data/app/views/admin/cpd_audits/_form_exemption.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_extension.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_files.html.haml +6 -0
- data/app/views/admin/cpd_audits/_form_missing_info.html.haml +11 -0
- data/app/views/admin/cpd_audits/_form_new.html.haml +3 -1
- data/app/views/admin/cpd_audits/_form_process.html.haml +18 -0
- data/app/views/admin/cpd_audits/_status.html.haml +48 -6
- data/app/views/effective/cpd/_dashboard.html.haml +15 -12
- data/app/views/effective/cpd_audit_level_questions/_cpd_audit_level_question.html.haml +2 -1
- data/app/views/effective/cpd_audit_reviews/_conflict.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_review.html.haml +3 -1
- data/app/views/effective/cpd_audit_reviews/_cpd_statement.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/_feedback.html.haml +9 -0
- data/app/views/effective/cpd_audit_reviews/_files.html.haml +12 -0
- data/app/views/effective/cpd_audit_reviews/_layout.html.haml +3 -0
- data/app/views/effective/cpd_audit_reviews/_recommendation.html.haml +6 -2
- data/app/views/effective/cpd_audit_reviews/_summary.html.haml +41 -14
- data/app/views/effective/cpd_audit_reviews/conflict.html.haml +5 -1
- data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +2 -2
- data/app/views/effective/cpd_audit_reviews/feedback.html.haml +16 -0
- data/app/views/effective/cpd_audit_reviews/files.html.haml +17 -0
- data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +5 -3
- data/app/views/effective/cpd_audit_reviews/start.html.haml +10 -3
- data/app/views/effective/cpd_audit_reviews/statements.html.haml +4 -5
- data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/submitted.html.haml +20 -0
- data/app/views/effective/cpd_audit_reviews/waiting.html.haml +1 -1
- data/app/views/effective/cpd_audits/_conflict.html.haml +1 -1
- data/app/views/effective/cpd_audits/_cpd.html.haml +1 -1
- data/app/views/effective/cpd_audits/_cpd_audit.html.haml +3 -1
- data/app/views/effective/cpd_audits/_cpd_audit_level_section.html.haml +1 -1
- data/app/views/effective/cpd_audits/_exemption.html.haml +1 -1
- data/app/views/effective/cpd_audits/_extension.html.haml +1 -1
- data/app/views/effective/cpd_audits/_files.html.haml +1 -1
- data/app/views/effective/cpd_audits/_missing_info.html.haml +19 -0
- data/app/views/effective/cpd_audits/_summary.html.haml +30 -12
- data/app/views/effective/cpd_audits/_waiting.html.haml +1 -1
- data/app/views/effective/cpd_audits/conflict.html.haml +5 -1
- data/app/views/effective/cpd_audits/cpd_audit_level_section.html.haml +1 -0
- data/app/views/effective/cpd_audits/start.html.haml +10 -4
- data/app/views/effective/cpd_audits/submit.html.haml +5 -2
- data/app/views/effective/cpd_audits/{complete.html.haml → submitted.haml} +13 -8
- data/app/views/effective/cpd_audits/waiting.html.haml +1 -1
- data/app/views/effective/cpd_mailer/cpd_audit_missing_info.liquid +15 -0
- data/app/views/effective/cpd_mailer/cpd_audit_review_ready.liquid +1 -1
- data/app/views/effective/cpd_mailer/cpd_audit_submitted.liquid +3 -1
- data/config/effective_cpd.rb +2 -2
- data/db/migrate/01_create_effective_cpd.rb.erb +25 -7
- data/lib/effective_cpd/version.rb +1 -1
- metadata +16 -5
- data/app/views/effective/cpd_audit_reviews/complete.html.haml +0 -20
@@ -0,0 +1,18 @@
|
|
1
|
+
%p
|
2
|
+
%span.badge.badge-secondary= cpd_audit.status_label
|
3
|
+
= cpd_audit.summary
|
4
|
+
|
5
|
+
%p Process audit:
|
6
|
+
|
7
|
+
= accordion do
|
8
|
+
- if EffectiveResources.authorized?(self, :complete, cpd_audit)
|
9
|
+
= collapse 'Complete this Audit' do
|
10
|
+
= render('admin/cpd_audits/form_complete', cpd_audit: cpd_audit)
|
11
|
+
|
12
|
+
- if EffectiveResources.authorized?(self, :missing, cpd_audit)
|
13
|
+
= collapse 'Missing Information' do
|
14
|
+
= render('admin/cpd_audits/form_missing_info', cpd_audit: cpd_audit)
|
15
|
+
|
16
|
+
- if EffectiveResources.authorized?(self, :close, cpd_audit)
|
17
|
+
= collapse 'Close Audit with Determination' do
|
18
|
+
= render('admin/cpd_audits/form_close', cpd_audit: cpd_audit)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%p=
|
1
|
+
%p= cpd_audit.summary
|
2
2
|
|
3
3
|
%table.table.table-striped
|
4
4
|
%thead
|
@@ -95,6 +95,42 @@
|
|
95
95
|
Done
|
96
96
|
%td
|
97
97
|
|
98
|
+
- # Waiting to Complete
|
99
|
+
- unless cpd_audit.was_completed?
|
100
|
+
%tr
|
101
|
+
%td Waiting to Complete
|
102
|
+
%td= cpd_audit.submitted_at&.strftime('%F') || '-'
|
103
|
+
%td
|
104
|
+
- cpd_audit.completed_requirements.each do |requirement, completed|
|
105
|
+
%p
|
106
|
+
= icon((completed ? 'check' : 'x'), class: 'small-1')
|
107
|
+
= requirement
|
108
|
+
|
109
|
+
%td
|
110
|
+
- if cpd_audit.submitted?
|
111
|
+
= link_to 'Complete Audit', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
112
|
+
|
113
|
+
- # Missing Information
|
114
|
+
%tr
|
115
|
+
%td Missing Information
|
116
|
+
%td= cpd_audit.missing_info_at&.strftime('%F') || '-'
|
117
|
+
%td
|
118
|
+
= cpd_audit.missing_info_reason
|
119
|
+
|
120
|
+
- if cpd_audit.was_missing_info? && cpd_audit.missing_info_reason.blank?
|
121
|
+
= icon('check', class: 'small-1')
|
122
|
+
Done
|
123
|
+
%td
|
124
|
+
|
125
|
+
%tr
|
126
|
+
%td Complete
|
127
|
+
%td= cpd_audit.completed_at&.strftime('%F') || '-'
|
128
|
+
%td
|
129
|
+
- if cpd_audit.was_completed?
|
130
|
+
= icon('check', class: 'small-1')
|
131
|
+
Done
|
132
|
+
%td
|
133
|
+
|
98
134
|
%tr
|
99
135
|
%td Reviewed
|
100
136
|
%td= cpd_audit.reviewed_at&.strftime('%F') || '-'
|
@@ -106,16 +142,22 @@
|
|
106
142
|
Reviews Completed
|
107
143
|
|
108
144
|
%td
|
109
|
-
- if cpd_audit.was_submitted? && !cpd_audit.was_reviewed?
|
145
|
+
- if cpd_audit.was_submitted? && !cpd_audit.was_reviewed? && !cpd_audit.closed?
|
110
146
|
= link_to 'Audit Reviews', '#audit-reviews', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
111
147
|
|
148
|
+
- unless cpd_audit.closed?
|
149
|
+
%tr
|
150
|
+
%td Waiting to Close
|
151
|
+
%td= cpd_audit.reviewed_at&.strftime('%F') || '-'
|
152
|
+
%td
|
153
|
+
%td
|
154
|
+
- if cpd_audit.was_reviewed?
|
155
|
+
= link_to 'Close Audit with Determination', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
156
|
+
|
112
157
|
%tr
|
113
158
|
%td Closed
|
114
159
|
%td= cpd_audit.closed_at&.strftime('%F') || '-'
|
115
160
|
%td
|
116
|
-
- if cpd_audit.
|
161
|
+
- if cpd_audit.done?
|
117
162
|
= cpd_audit.determination
|
118
|
-
|
119
163
|
%td
|
120
|
-
- if cpd_audit.reviewed? && !cpd_audit.completed?
|
121
|
-
= link_to 'Determination', '#determination', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
@@ -18,7 +18,7 @@
|
|
18
18
|
.mt-4
|
19
19
|
%p Please submit a CPD statement for the following available #{cpd_cycles_label}:
|
20
20
|
= render_datatable(available, simple: true)
|
21
|
-
-
|
21
|
+
- elsif current_user.try(:cpd_audit_cpd_required?)
|
22
22
|
%p There are no #{cpd_cycles_label} available to submit. When there are, we'll show them here.
|
23
23
|
|
24
24
|
- completed = EffectiveCpdCompletedStatementsDatatable.new(self)
|
@@ -27,15 +27,18 @@
|
|
27
27
|
%p You have completed these past statements:
|
28
28
|
= render_datatable(completed, simple: true)
|
29
29
|
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
.
|
34
|
-
|
35
|
-
|
30
|
+
- if current_user.try(:cpd_audit_reviewer?)
|
31
|
+
- # Auditor / Audit reviewer datatables (2)
|
32
|
+
- reviewing = EffectiveCpdAvailableAuditReviewsDatatable.new(self)
|
33
|
+
- if reviewing.present?
|
34
|
+
.mt-4
|
35
|
+
%p You have been selected to assess the following audits:
|
36
|
+
= render_datatable(reviewing, simple: true)
|
37
|
+
- else
|
38
|
+
%p There are no audits available to review. When there are, we'll show them here.
|
36
39
|
|
37
|
-
- reviewed = EffectiveCpdCompletedAuditReviewsDatatable.new(self)
|
38
|
-
- if reviewed.present?
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
- reviewed = EffectiveCpdCompletedAuditReviewsDatatable.new(self)
|
41
|
+
- if reviewed.present?
|
42
|
+
.mt-4
|
43
|
+
%p You have completed these past audit assessments:
|
44
|
+
= render_datatable(reviewed, simple: true)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
=
|
1
|
+
= wizard_card(cpd_audit_review) do
|
2
2
|
%table.table.table-hover
|
3
3
|
%thead
|
4
|
-
%th
|
5
|
-
%th #{cpd_audit_review.
|
4
|
+
%th Responses submitted by #{cpd_audit_review.cpd_audit.name}
|
5
|
+
%th Review by #{cpd_audit_review.name}
|
6
6
|
%tbody
|
7
7
|
- cpd_audit_level_section.cpd_audit_level_questions.each_with_index do |cpd_audit_level_question, index|
|
8
8
|
- cpd_audit_response = cpd_audit_review.cpd_audit.cpd_audit_response(cpd_audit_level_question)
|
@@ -2,9 +2,11 @@
|
|
2
2
|
= render('effective/cpd_audit_reviews/summary', cpd_audit_review: cpd_audit_review)
|
3
3
|
|
4
4
|
- steps = cpd_audit_review.required_steps.select { |step| cpd_audit_review.has_completed_step?(step) }
|
5
|
-
- blacklist = [:start, :information, :instructions, :waiting, :statements, :questionnaire, :submit, :
|
5
|
+
- blacklist = [:start, :information, :instructions, :waiting, :statements, :questionnaire, :submit, :submitted]
|
6
6
|
|
7
7
|
- (steps - blacklist).each do |step|
|
8
|
+
- cpd_audit_review.render_step = step
|
9
|
+
|
8
10
|
- if cpd_audit_review.dynamic_wizard_questionnaire_steps.keys.include?(step)
|
9
11
|
- cpd_audit_level_section = cpd_audit_review.cpd_audit_level_section(step) || raise("no cpd audit section for #{step}")
|
10
12
|
= render("effective/cpd_audit_reviews/cpd_audit_level_section", cpd_audit_review: cpd_audit_review, step: step, cpd_audit_level_section: cpd_audit_level_section)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
=
|
1
|
+
= wizard_card(cpd_audit_review) do
|
2
2
|
%table.table.table-hover
|
3
3
|
%thead
|
4
|
-
%th #{cpd_audit_review.cpd_audit.
|
5
|
-
%th #{cpd_audit_review.
|
4
|
+
%th #{cpd_audit_review.cpd_audit.name}'s #{cpd_statement}
|
5
|
+
%th #{cpd_audit_review.name}'s Review
|
6
6
|
|
7
7
|
%tbody
|
8
8
|
- cpd_statement.cpd_statement_activities.each do |cpd_statement_activity|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= wizard_card(cpd_audit_review) do
|
2
|
+
%table.table
|
3
|
+
%tbody
|
4
|
+
%tr
|
5
|
+
%th Files
|
6
|
+
%td
|
7
|
+
- if cpd_audit_review.cpd_audit.files.blank?
|
8
|
+
None
|
9
|
+
- else
|
10
|
+
%ul
|
11
|
+
- cpd_audit_review.cpd_audit.files.each do |file|
|
12
|
+
%li= link_to(file.filename, url_for(file), target: '_blank')
|
@@ -1,4 +1,4 @@
|
|
1
|
-
=
|
1
|
+
= wizard_card(cpd_audit_review) do
|
2
2
|
%table.table
|
3
3
|
%tbody
|
4
4
|
%tr
|
@@ -6,4 +6,8 @@
|
|
6
6
|
%td= cpd_audit_review.recommendation
|
7
7
|
|
8
8
|
%tr
|
9
|
-
%td{colspan: 2}
|
9
|
+
%td{colspan: 2}
|
10
|
+
- if cpd_audit_review.comments.present?
|
11
|
+
= simple_format(cpd_audit_review.comments)
|
12
|
+
- else
|
13
|
+
No comments
|
@@ -1,28 +1,55 @@
|
|
1
1
|
= card(cpd_audit_review) do
|
2
|
+
- cpd_audit = cpd_audit_review.cpd_audit
|
3
|
+
|
2
4
|
%table.table
|
3
5
|
%tbody
|
6
|
+
- if request.path.start_with?('/admin')
|
7
|
+
%tr
|
8
|
+
%th Audit
|
9
|
+
%td
|
10
|
+
= link_to(cpd_audit, effective_cpd.edit_admin_cpd_audit_path(cpd_audit), target: '_blank')
|
11
|
+
|
4
12
|
%tr
|
5
13
|
%th Audit Reviewer
|
6
14
|
%td
|
7
|
-
|
8
|
-
|
9
|
-
%small= mail_to cpd_audit_review.user.email
|
15
|
+
- if cpd_audit_review.anonymous?
|
16
|
+
%p= cpd_audit_review.anonymous_name
|
10
17
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
18
|
+
- if request.path.start_with?('/admin')
|
19
|
+
- url = (polymorphic_admin_path(cpd_audit_review.user) rescue "/admin/users/#{cpd_audit_review.user.to_param}/edit")
|
20
|
+
%p
|
21
|
+
= link_to(cpd_audit_review.user, url)
|
22
|
+
%br
|
23
|
+
%small= mail_to cpd_audit_review.user.email
|
24
|
+
|
25
|
+
- if cpd_audit_review.anonymous? == false
|
26
|
+
%p
|
27
|
+
= cpd_audit_review.user
|
28
|
+
%br
|
29
|
+
%small= mail_to cpd_audit_review.user.email
|
15
30
|
|
16
31
|
%tr
|
17
32
|
%th Auditee
|
18
33
|
%td
|
19
|
-
|
20
|
-
|
21
|
-
|
34
|
+
- if cpd_audit.anonymous?
|
35
|
+
%p= cpd_audit.anonymous_name
|
36
|
+
|
37
|
+
- if request.path.start_with?('/admin')
|
38
|
+
- url = (polymorphic_admin_path(cpd_audit.user) rescue "/admin/users/#{cpd_audit.user.to_param}/edit")
|
39
|
+
%p
|
40
|
+
= link_to(cpd_audit.user, url)
|
41
|
+
%br
|
42
|
+
%small= mail_to cpd_audit.user.email
|
43
|
+
|
44
|
+
- if cpd_audit.anonymous? == false
|
45
|
+
%p
|
46
|
+
= cpd_audit.user
|
47
|
+
%br
|
48
|
+
%small= mail_to cpd_audit.user.email
|
22
49
|
|
23
50
|
%tr
|
24
51
|
%th Date of notification
|
25
|
-
%td=
|
52
|
+
%td= cpd_audit.notification_date.strftime('%F')
|
26
53
|
|
27
54
|
%tr
|
28
55
|
%th Due date
|
@@ -42,6 +69,6 @@
|
|
42
69
|
%th Recommendation
|
43
70
|
%td= cpd_audit_review.recommendation.presence || '-'
|
44
71
|
|
45
|
-
|
46
|
-
|
47
|
-
|
72
|
+
%tr
|
73
|
+
%th Reviewer Comments
|
74
|
+
%td= cpd_audit_review.comments.presence || 'No comments'
|
@@ -2,7 +2,11 @@
|
|
2
2
|
%p You have been selected to conduct a #{resource.cpd_audit.cpd_audit_level} audit with the following auditee:
|
3
3
|
|
4
4
|
%ul
|
5
|
-
%li
|
5
|
+
%li
|
6
|
+
- if resource.anonymous?
|
7
|
+
= resource.cpd_audit.name
|
8
|
+
- else
|
9
|
+
#{resource.cpd_audit.user} <#{mail_to(resource.cpd_audit.user.email)}>
|
6
10
|
|
7
11
|
%p The deadline to declare a conflict of interest is: #{resource.deadline_to_conflict_of_interest.strftime('%F')}.
|
8
12
|
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
%table.table.table-hover
|
15
15
|
%thead
|
16
|
-
%th
|
17
|
-
%th #{resource.
|
16
|
+
%th Responses submitted by #{resource.cpd_audit.name}
|
17
|
+
%th Review by #{resource.name}
|
18
18
|
%tbody
|
19
19
|
- cpd_audit_level_section.cpd_audit_level_questions.each_with_index do |cpd_audit_level_question, index|
|
20
20
|
- cpd_audit_response = resource.cpd_audit.cpd_audit_response(cpd_audit_level_question)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
.mb-3
|
3
|
+
= collapse('Show audit...', card_class: '') do
|
4
|
+
.mt-4= render('effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit)
|
5
|
+
|
6
|
+
%p Please provide any feedback for #{resource.cpd_audit.name}:
|
7
|
+
|
8
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
9
|
+
= f.hidden_field :current_step
|
10
|
+
|
11
|
+
= f.text_area :feedback, label: 'Feedback for the auditee'
|
12
|
+
|
13
|
+
%hr
|
14
|
+
= f.text_area :comments, label: 'Reviewer comments'
|
15
|
+
|
16
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,17 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
3
|
+
= f.hidden_field :current_step
|
4
|
+
|
5
|
+
%p
|
6
|
+
The auditee attached the following files:
|
7
|
+
- if resource.cpd_audit.files.blank?
|
8
|
+
None
|
9
|
+
|
10
|
+
%ul
|
11
|
+
- resource.cpd_audit.files.each do |file|
|
12
|
+
%li= link_to(file.filename, url_for(file), target: '_blank')
|
13
|
+
|
14
|
+
%hr
|
15
|
+
= f.text_area :comments, label: 'Reviewer comments'
|
16
|
+
|
17
|
+
= f.submit 'Save and Continue', center: true
|
@@ -1,13 +1,15 @@
|
|
1
1
|
= render('layout') do
|
2
2
|
.mb-3
|
3
|
-
= collapse('Show
|
4
|
-
= render(resource)
|
3
|
+
= collapse('Show audit...', card_class: '') do
|
4
|
+
.mt-4= render('effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit)
|
5
5
|
|
6
|
-
%p Please provide your final recommendation on #{resource.cpd_audit.
|
6
|
+
%p Please provide your final recommendation on #{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
|
10
10
|
|
11
|
+
= f.text_area :feedback, label: 'Feedback for the auditee'
|
12
|
+
|
11
13
|
- recommendations = resource.cpd_audit_level.recommendations
|
12
14
|
|
13
15
|
- if recommendations.length > 3
|
@@ -1,8 +1,15 @@
|
|
1
1
|
= render('layout') do
|
2
|
-
%p You have been selected to conduct a #{resource.cpd_audit.cpd_audit_level} audit
|
2
|
+
%p You have been selected to conduct a #{resource.cpd_audit.cpd_audit_level} audit.
|
3
3
|
|
4
|
-
|
5
|
-
%
|
4
|
+
- if resource.cpd_audit_level.anonymous?
|
5
|
+
%p This is an anonymous audit, and you have been assigned the name #{resource.name}.
|
6
|
+
%p You have been matched with the auditee, #{resource.cpd_audit.name}.
|
7
|
+
|
8
|
+
- else
|
9
|
+
%p You have been matched with the auditee:
|
10
|
+
|
11
|
+
%ul
|
12
|
+
%li #{resource.cpd_audit.user} <#{mail_to(resource.cpd_audit.user.email)}>
|
6
13
|
|
7
14
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
8
15
|
= f.hidden_field :current_step
|
@@ -1,14 +1,13 @@
|
|
1
1
|
= render('layout') do
|
2
|
-
-
|
2
|
+
- cpd_audit = resource.cpd_audit
|
3
3
|
|
4
|
-
%
|
5
|
-
%p #{auditee} has submitted the following statements:
|
4
|
+
%p #{cpd_audit.name} has submitted the following statements:
|
6
5
|
|
7
|
-
- datatable = EffectiveCpdCompletedStatementsDatatable.new(
|
6
|
+
- datatable = EffectiveCpdCompletedStatementsDatatable.new(user: cpd_audit.user, actions: false)
|
8
7
|
|
9
8
|
- if datatable.blank?(self)
|
10
9
|
%p
|
11
|
-
%strong There are no completed CPD statements from #{
|
10
|
+
%strong There are no completed CPD statements from #{cpd_audit.name}.
|
12
11
|
- else
|
13
12
|
= render_datatable(datatable, simple: true)
|
14
13
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
%strong will not
|
7
7
|
be able to change your recommendation.
|
8
8
|
|
9
|
-
.mb-4= render(resource)
|
9
|
+
.mb-4= render('effective/cpd_audit_reviews/cpd_audit_review', cpd_audit_review: resource)
|
10
10
|
|
11
11
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
12
12
|
= f.hidden_field :current_step
|
@@ -0,0 +1,20 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- raise('expected a completed cpd_audit_review') unless resource.completed?
|
3
|
+
|
4
|
+
- if resource.completed?
|
5
|
+
.alert.alert-success.mb-4
|
6
|
+
This audit review was submitted on #{resource.submitted_at.strftime('%F')}
|
7
|
+
|
8
|
+
%p Thank you for your review.
|
9
|
+
|
10
|
+
= render 'effective/cpd_audit_reviews/summary', cpd_audit_review: resource
|
11
|
+
|
12
|
+
.mb-4
|
13
|
+
= collapse('Show audit review...', card_class: 'my-2') do
|
14
|
+
= render('effective/cpd_audit_reviews/cpd_audit_review', cpd_audit_review: resource)
|
15
|
+
|
16
|
+
.mb-4
|
17
|
+
= collapse('Show audit...', card_class: 'my-2') do
|
18
|
+
= render 'effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit
|
19
|
+
|
20
|
+
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
@@ -2,9 +2,11 @@
|
|
2
2
|
= render('effective/cpd_audits/summary', cpd_audit: cpd_audit)
|
3
3
|
|
4
4
|
- steps = cpd_audit.required_steps.select { |step| cpd_audit.has_completed_step?(step) }
|
5
|
-
- blacklist = [:start, :information, :instructions, :waiting, :questionnaire, :submit, :
|
5
|
+
- blacklist = [:start, :information, :instructions, :waiting, :questionnaire, :submit, :submitted]
|
6
6
|
|
7
7
|
- (steps - blacklist).each do |step|
|
8
|
+
- cpd_audit.render_step = step
|
9
|
+
|
8
10
|
- if cpd_audit.dynamic_wizard_steps.keys.include?(step)
|
9
11
|
- cpd_audit_level_section = cpd_audit.cpd_audit_level_section(step) || raise("no cpd audit section for #{step}")
|
10
12
|
= render("effective/cpd_audits/cpd_audit_level_section", cpd_audit: cpd_audit, step: step, cpd_audit_level_section: cpd_audit_level_section)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%h3 Missing Information
|
2
|
+
%p The following information is missing:
|
3
|
+
%ul
|
4
|
+
%li= resource.missing_info_reason
|
5
|
+
|
6
|
+
%p
|
7
|
+
Please revisit each wizard step and
|
8
|
+
= link_to 'Complete all missing information', wizard_path(:information), class: 'btn btn-primary'
|
9
|
+
for this audit.
|
10
|
+
|
11
|
+
%p
|
12
|
+
Once you're ready, click below to re-submit your audit with the updated information.
|
13
|
+
|
14
|
+
%p
|
15
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
16
|
+
= f.hidden_field :id
|
17
|
+
|
18
|
+
- # If you change this label, update EffectiveMemberships ApplicantsController
|
19
|
+
= f.save 'Resubmit Audit', 'data-confirm': "Really re-submit?", class: 'btn-sm'
|
@@ -4,23 +4,41 @@
|
|
4
4
|
%tr
|
5
5
|
%th Auditee
|
6
6
|
%td
|
7
|
-
|
8
|
-
|
9
|
-
%small= mail_to cpd_audit.user.email
|
7
|
+
- if cpd_audit.anonymous?
|
8
|
+
%p= cpd_audit.anonymous_name
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
- if request.path.start_with?('/admin')
|
11
|
+
- url = (polymorphic_admin_path(cpd_audit.user) rescue "/admin/users/#{cpd_audit.user.to_param}/edit")
|
12
|
+
%p
|
13
|
+
= link_to(cpd_audit.user, url)
|
14
|
+
%br
|
15
|
+
%small= mail_to cpd_audit.user.email
|
16
|
+
|
17
|
+
- if cpd_audit.anonymous? == false
|
18
|
+
%p
|
19
|
+
= cpd_audit.user
|
20
|
+
%br
|
21
|
+
%small= mail_to cpd_audit.user.email
|
15
22
|
|
16
23
|
%tr
|
17
24
|
%th Audit Reviewer
|
18
25
|
%td
|
19
26
|
- cpd_audit.cpd_audit_reviews.each do |cpd_audit_review|
|
20
|
-
|
21
|
-
= cpd_audit_review.
|
22
|
-
|
23
|
-
|
27
|
+
- if cpd_audit_review.anonymous?
|
28
|
+
%p= cpd_audit_review.anonymous_name
|
29
|
+
|
30
|
+
- if request.path.start_with?('/admin')
|
31
|
+
- url = (polymorphic_admin_path(cpd_audit_review.user) rescue "/admin/users/#{cpd_audit_review.user.to_param}/edit")
|
32
|
+
%p
|
33
|
+
= link_to(cpd_audit_review.user, url)
|
34
|
+
%br
|
35
|
+
%small= mail_to cpd_audit_review.user.email
|
36
|
+
|
37
|
+
- if cpd_audit_review.anonymous? == false
|
38
|
+
%p
|
39
|
+
= cpd_audit_review.user
|
40
|
+
%br
|
41
|
+
%small= mail_to cpd_audit_review.user.email
|
24
42
|
|
25
43
|
%tr
|
26
44
|
%th Date of notification
|
@@ -51,4 +69,4 @@
|
|
51
69
|
|
52
70
|
%tr
|
53
71
|
%th Summary
|
54
|
-
%td=
|
72
|
+
%td= cpd_audit.summary
|
@@ -3,7 +3,11 @@
|
|
3
3
|
|
4
4
|
%ul
|
5
5
|
- resource.cpd_audit_reviews.each do |cpd_audit_review|
|
6
|
-
%li
|
6
|
+
%li
|
7
|
+
- if cpd_audit_review.anonymous?
|
8
|
+
= cpd_audit_review.name
|
9
|
+
- else
|
10
|
+
#{cpd_audit_review.user} <#{mail_to(cpd_audit_review.user.email)}>
|
7
11
|
|
8
12
|
- if resource.deadline_to_conflict_of_interest.present? && !resource.ignore_deadlines?
|
9
13
|
%p The deadline to declare a conflict of interest is: #{resource.deadline_to_conflict_of_interest.strftime('%F')}.
|
@@ -12,6 +12,7 @@
|
|
12
12
|
- cpd_audit_response = resource.cpd_audit_response(cpd_audit_level_question)
|
13
13
|
|
14
14
|
= f.fields_for :cpd_audit_responses, cpd_audit_response do |fcar|
|
15
|
+
%hr
|
15
16
|
.mt-2= render('/effective/cpd_audit_responses/fields', f: fcar, cpd_audit_level_question: cpd_audit_level_question)
|
16
17
|
|
17
18
|
- if cpd_audit_level_section.bottom_content.present?
|