effective_cpd 0.0.1 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +89 -10
- data/app/controllers/admin/cpd_audit_level_questions_controller.rb +13 -0
- data/app/controllers/admin/cpd_audit_levels_controller.rb +13 -0
- data/app/controllers/admin/cpd_audit_reviews_controller.rb +13 -0
- data/app/controllers/admin/cpd_audits_controller.rb +41 -0
- data/app/controllers/effective/cpd_audit_reviews_controller.rb +60 -0
- data/app/controllers/effective/cpd_audits_controller.rb +55 -0
- data/app/controllers/effective/cpd_cycles_controller.rb +1 -0
- data/app/controllers/effective/cpd_statements_controller.rb +1 -3
- data/app/datatables/admin/effective_cpd_audit_level_questions_datatable.rb +30 -0
- data/app/datatables/admin/effective_cpd_audit_levels_datatable.rb +34 -0
- data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +29 -0
- data/app/datatables/admin/effective_cpd_audits_datatable.rb +67 -0
- data/app/datatables/admin/effective_cpd_statements_datatable.rb +3 -3
- data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +37 -0
- data/app/datatables/effective_cpd_available_audits_datatable.rb +30 -0
- data/app/datatables/{effective_cpd_datatable.rb → effective_cpd_available_cycles_datatable.rb} +3 -4
- data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +32 -0
- data/app/datatables/effective_cpd_completed_audits_datatable.rb +24 -0
- data/app/datatables/effective_cpd_completed_statements_datatable.rb +28 -0
- data/app/helpers/effective_cpd_audits_helper.rb +48 -0
- data/app/mailers/effective/cpd_mailer.rb +155 -3
- data/app/models/effective/cpd_activity.rb +16 -3
- data/app/models/effective/cpd_audit.rb +380 -0
- data/app/models/effective/cpd_audit_level.rb +87 -0
- data/app/models/effective/cpd_audit_level_question.rb +91 -0
- data/app/models/effective/cpd_audit_level_question_option.rb +34 -0
- data/app/models/effective/cpd_audit_level_section.rb +50 -0
- data/app/models/effective/cpd_audit_response.rb +86 -0
- data/app/models/effective/cpd_audit_response_option.rb +6 -0
- data/app/models/effective/cpd_audit_review.rb +222 -0
- data/app/models/effective/cpd_audit_review_item.rb +34 -0
- data/app/models/effective/cpd_category.rb +12 -3
- data/app/models/effective/cpd_cycle.rb +7 -0
- data/app/models/effective/cpd_rule.rb +3 -1
- data/app/models/effective/cpd_statement.rb +15 -8
- data/app/views/admin/cpd_activities/_form.html.haml +1 -1
- data/app/views/admin/cpd_audit_level_questions/_form.html.haml +100 -0
- data/app/views/admin/cpd_audit_levels/_form.html.haml +24 -0
- data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +15 -0
- data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +15 -0
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +52 -0
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +10 -0
- data/app/views/admin/cpd_audit_reviews/_cpd_audit_review.html.haml +1 -0
- data/app/views/admin/cpd_audit_reviews/_form.html.haml +13 -0
- data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +2 -0
- data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -0
- data/app/views/admin/cpd_audits/_form.html.haml +46 -0
- data/app/views/admin/cpd_audits/_form_conflict.html.haml +24 -0
- data/app/views/admin/cpd_audits/_form_determination.html.haml +10 -0
- data/app/views/admin/cpd_audits/_form_exemption.html.haml +24 -0
- data/app/views/admin/cpd_audits/_form_extension.html.haml +24 -0
- data/app/views/admin/cpd_audits/_form_new.html.haml +28 -0
- data/app/views/admin/cpd_audits/_status.html.haml +121 -0
- data/app/views/admin/cpd_categories/_form.html.haml +1 -1
- data/app/views/admin/cpd_cycles/_form.html.haml +4 -4
- data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +3 -0
- data/app/views/admin/cpd_statements/_cpd_statement.html.haml +7 -0
- data/app/views/effective/cpd_audit_level_questions/_cpd_audit_level_question.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/_cpd_audit_response.html.haml +4 -0
- data/app/views/effective/cpd_audit_responses/_fields.html.haml +13 -0
- data/app/views/effective/cpd_audit_responses/fields/_choose_one.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_date.html.haml +2 -0
- data/app/views/effective/cpd_audit_responses/fields/_email.html.haml +2 -0
- data/app/views/effective/cpd_audit_responses/fields/_long_answer.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_number.html.haml +2 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_all_that_apply.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_up_to_1.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_up_to_2.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_up_to_3.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_up_to_4.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_select_up_to_5.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_short_answer.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/fields/_upload_file.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_choose_one.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_date.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_email.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_long_answer.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_number.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_all_that_apply.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_up_to_1.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_up_to_2.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_up_to_3.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_up_to_4.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/responses/_select_up_to_5.html.haml +5 -0
- data/app/views/effective/cpd_audit_responses/responses/_short_answer.html.haml +1 -0
- data/app/views/effective/cpd_audit_responses/responses/_upload_file.html.haml +4 -0
- data/app/views/effective/cpd_audit_review_items/_cpd_audit_review_item.html.haml +6 -0
- data/app/views/effective/cpd_audit_review_items/_fields.html.haml +11 -0
- data/app/views/effective/cpd_audit_reviews/_conflict.html.haml +15 -0
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +23 -0
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_review.html.haml +17 -0
- data/app/views/effective/cpd_audit_reviews/_cpd_statement.html.haml +15 -0
- data/app/views/effective/cpd_audit_reviews/_layout.html.haml +24 -0
- data/app/views/effective/cpd_audit_reviews/_recommendation.html.haml +9 -0
- data/app/views/effective/cpd_audit_reviews/_summary.html.haml +47 -0
- data/app/views/effective/cpd_audit_reviews/complete.html.haml +20 -0
- data/app/views/effective/cpd_audit_reviews/conflict.html.haml +21 -0
- data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +43 -0
- data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +35 -0
- data/app/views/effective/cpd_audit_reviews/information.html.haml +5 -0
- data/app/views/effective/cpd_audit_reviews/instructions.html.haml +10 -0
- data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +8 -0
- data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +21 -0
- data/app/views/effective/cpd_audit_reviews/start.html.haml +10 -0
- data/app/views/effective/cpd_audit_reviews/statements.html.haml +29 -0
- data/app/views/effective/cpd_audit_reviews/submit.html.haml +14 -0
- data/app/views/effective/cpd_audit_reviews/waiting.html.haml +9 -0
- data/app/views/effective/cpd_audits/_conflict.html.haml +15 -0
- data/app/views/effective/cpd_audits/_cpd_audit.html.haml +12 -0
- data/app/views/effective/cpd_audits/_cpd_audit_level_section.html.haml +14 -0
- data/app/views/effective/cpd_audits/_exemption.html.haml +26 -0
- data/app/views/effective/cpd_audits/_extension.html.haml +30 -0
- data/app/views/effective/cpd_audits/_files.html.haml +12 -0
- data/app/views/effective/cpd_audits/_layout.html.haml +33 -0
- data/app/views/effective/cpd_audits/_summary.html.haml +54 -0
- data/app/views/effective/cpd_audits/_waiting.html.haml +6 -0
- data/app/views/effective/cpd_audits/complete.html.haml +24 -0
- data/app/views/effective/cpd_audits/conflict.html.haml +22 -0
- data/app/views/effective/cpd_audits/cpd_audit_level_section.html.haml +20 -0
- data/app/views/effective/cpd_audits/exemption.html.haml +19 -0
- data/app/views/effective/cpd_audits/extension.html.haml +21 -0
- data/app/views/effective/cpd_audits/files.html.haml +7 -0
- data/app/views/effective/cpd_audits/information.html.haml +5 -0
- data/app/views/effective/cpd_audits/instructions.html.haml +5 -0
- data/app/views/effective/cpd_audits/questionnaire.html.haml +5 -0
- data/app/views/effective/cpd_audits/start.html.haml +11 -0
- data/app/views/effective/cpd_audits/submit.html.haml +15 -0
- data/app/views/effective/cpd_audits/waiting.html.haml +24 -0
- data/app/views/effective/cpd_mailer/README.md +1 -0
- data/app/views/effective/cpd_mailer/cpd_audit_closed.liquid +15 -0
- data/app/views/effective/cpd_mailer/cpd_audit_conflict_resolved.liquid +15 -0
- data/app/views/effective/cpd_mailer/cpd_audit_conflicted.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_exemption_denied.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_exemption_granted.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_exemption_request.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_extension_denied.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_extension_granted.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_extension_request.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_opened.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_review_opened.liquid +15 -0
- data/app/views/effective/cpd_mailer/cpd_audit_review_ready.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_review_submitted.liquid +11 -0
- data/app/views/effective/cpd_mailer/cpd_audit_reviewed.liquid +13 -0
- data/app/views/effective/cpd_mailer/cpd_audit_submitted.liquid +13 -0
- data/app/views/effective/cpd_statement_activities/_cpd_statement_activity.html.haml +65 -0
- data/app/views/effective/cpd_statement_activities/_form.html.haml +9 -10
- data/app/views/effective/cpd_statements/_activities.html.haml +3 -64
- data/app/views/effective/cpd_statements/_activities_edit.html.haml +2 -0
- data/app/views/effective/cpd_statements/_activities_table.html.haml +64 -0
- data/app/views/effective/cpd_statements/_agreements.html.haml +19 -5
- data/app/views/effective/cpd_statements/_cpd_statement.html.haml +6 -3
- data/app/views/effective/cpd_statements/_summary.html.haml +26 -31
- data/app/views/effective/cpd_statements/activities.html.haml +1 -1
- data/app/views/effective/cpd_statements/agreements.html.haml +7 -1
- data/app/views/effective/cpd_statements/submit.html.haml +1 -1
- data/config/effective_cpd.rb +47 -10
- data/config/routes.rb +18 -1
- data/db/migrate/01_create_effective_cpd.rb.erb +157 -1
- data/db/seeds.rb +2 -1
- data/lib/effective_cpd.rb +42 -3
- data/lib/effective_cpd/version.rb +1 -1
- data/lib/generators/effective_cpd/install_generator.rb +16 -3
- metadata +168 -9
- data/app/datatables/effective_cpd_statements_datatable.rb +0 -23
- data/app/views/admin/cpd_statements/_form.html.haml +0 -6
@@ -0,0 +1,26 @@
|
|
1
|
+
= card(cpd_audit.wizard_step_title(step)) do
|
2
|
+
%table.table
|
3
|
+
%tbody
|
4
|
+
%tr
|
5
|
+
%th Exemption
|
6
|
+
%td
|
7
|
+
- if cpd_audit.was_exemption_requested?
|
8
|
+
Yes, an exemption has been requested
|
9
|
+
- else
|
10
|
+
No exemption request
|
11
|
+
|
12
|
+
- if cpd_audit.was_exemption_requested?
|
13
|
+
%tr
|
14
|
+
%th Reason
|
15
|
+
%td= cpd_audit.exemption_request_reason
|
16
|
+
|
17
|
+
%tr
|
18
|
+
%th Status
|
19
|
+
%td
|
20
|
+
%span.badge.badge-secondary
|
21
|
+
- if cpd_audit.exemption_requested?
|
22
|
+
Requested
|
23
|
+
- elsif cpd_audit.was_exemption_granted?
|
24
|
+
Granted
|
25
|
+
- elsif cpd_audit.was_exemption_denied?
|
26
|
+
Denied
|
@@ -0,0 +1,30 @@
|
|
1
|
+
= card(cpd_audit.wizard_step_title(step)) do
|
2
|
+
%table.table
|
3
|
+
%tbody
|
4
|
+
%tr
|
5
|
+
%th Extension
|
6
|
+
%td
|
7
|
+
- if cpd_audit.was_extension_requested?
|
8
|
+
Yes, an extension has been requested
|
9
|
+
- else
|
10
|
+
No extension request
|
11
|
+
|
12
|
+
- if cpd_audit.was_extension_requested?
|
13
|
+
%tr
|
14
|
+
%th Requested Date
|
15
|
+
%td= cpd_audit.extension_request_date&.strftime('%F')
|
16
|
+
|
17
|
+
%tr
|
18
|
+
%th Reason
|
19
|
+
%td= cpd_audit.exemption_request_reason
|
20
|
+
|
21
|
+
%tr
|
22
|
+
%th Status
|
23
|
+
%td
|
24
|
+
%span.badge.badge-secondary
|
25
|
+
- if cpd_audit.extension_requested?
|
26
|
+
Requested
|
27
|
+
- elsif cpd_audit.was_extension_granted?
|
28
|
+
Granted
|
29
|
+
- elsif cpd_audit.was_extension_denied?
|
30
|
+
Denied
|
@@ -0,0 +1,33 @@
|
|
1
|
+
.row
|
2
|
+
.col-3
|
3
|
+
= render_wizard_sidebar(resource)
|
4
|
+
|
5
|
+
- last_3_cycles = Effective::CpdCycle.sorted.where('start_at <= ?', Time.zone.now).last(3)
|
6
|
+
- last_3_scores = Effective::CpdStatement.where(cpd_cycle: last_3_cycles, user: resource.user).sum(&:score)
|
7
|
+
|
8
|
+
%table.table.mt-4
|
9
|
+
%tbody
|
10
|
+
- if resource.due_date.present? && !resource.was_submitted?
|
11
|
+
%tr{title: "#{resource} is due on #{resource.due_date.strftime('%F')}"}
|
12
|
+
%td
|
13
|
+
%h4= (resource.due_date - Time.zone.now.to_date).to_i.abs
|
14
|
+
|
15
|
+
%td
|
16
|
+
= (Time.zone.now > resource.due_date) ? 'days overdue' : 'days left to submit'
|
17
|
+
|
18
|
+
%tr
|
19
|
+
%td
|
20
|
+
%h4= last_3_scores.to_i
|
21
|
+
|
22
|
+
%td #{cpd_credits_label} in last 3 #{cpd_cycles_label} (including this #{cpd_cycle_label})
|
23
|
+
|
24
|
+
.col-9
|
25
|
+
%h1= @page_title
|
26
|
+
|
27
|
+
- if resource.cpd_audit_level.rich_text_all_steps_audit_content.present?
|
28
|
+
.mb-2= resource.cpd_audit_level.rich_text_all_steps_audit_content
|
29
|
+
|
30
|
+
- if resource.cpd_audit_level.send("rich_text_#{step}_audit_content").present?
|
31
|
+
.mb-2= resource.cpd_audit_level.send("rich_text_#{step}_audit_content")
|
32
|
+
|
33
|
+
= yield
|
@@ -0,0 +1,54 @@
|
|
1
|
+
= card(cpd_audit) do
|
2
|
+
%table.table
|
3
|
+
%tbody
|
4
|
+
%tr
|
5
|
+
%th Auditee
|
6
|
+
%td
|
7
|
+
= cpd_audit.user
|
8
|
+
%br
|
9
|
+
%small= mail_to cpd_audit.user.email
|
10
|
+
|
11
|
+
- if request.path.start_with?('/admin') && respond_to?(:edit_admin_user_path)
|
12
|
+
%tr
|
13
|
+
%th User
|
14
|
+
%td= link_to(cpd_audit.user, edit_admin_user_path(cpd_audit.user))
|
15
|
+
|
16
|
+
%tr
|
17
|
+
%th Audit Reviewer
|
18
|
+
%td
|
19
|
+
- cpd_audit.cpd_audit_reviews.each do |cpd_audit_review|
|
20
|
+
%p
|
21
|
+
= cpd_audit_review.user
|
22
|
+
%br
|
23
|
+
%small= mail_to cpd_audit_review.user.email
|
24
|
+
|
25
|
+
%tr
|
26
|
+
%th Date of notification
|
27
|
+
%td= cpd_audit.notification_date.strftime('%F')
|
28
|
+
|
29
|
+
- if cpd_audit.extension_date.present?
|
30
|
+
%tr
|
31
|
+
%th Approved date of extension
|
32
|
+
%td= cpd_audit.extension_date.strftime('%F')
|
33
|
+
|
34
|
+
%tr
|
35
|
+
%th Due date
|
36
|
+
%td= cpd_audit.due_date.strftime('%F')
|
37
|
+
|
38
|
+
- if cpd_audit.completed?
|
39
|
+
%tr
|
40
|
+
%th Submitted on
|
41
|
+
%td= cpd_audit.submitted_at.strftime('%F')
|
42
|
+
|
43
|
+
%tr
|
44
|
+
%th Status
|
45
|
+
%td
|
46
|
+
%span.badge.badge-secondary= cpd_audit.status
|
47
|
+
|
48
|
+
%tr
|
49
|
+
%th Determination
|
50
|
+
%td= cpd_audit.determination.presence || '-'
|
51
|
+
|
52
|
+
%tr
|
53
|
+
%th Summary
|
54
|
+
%td= cpd_audit_summary_text(cpd_audit)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- raise('expected a submitted cpd_audit') unless resource.was_submitted?
|
3
|
+
|
4
|
+
.text-center
|
5
|
+
.row
|
6
|
+
.col-2
|
7
|
+
.col-8
|
8
|
+
.alert.alert-success Audit Submitted!
|
9
|
+
|
10
|
+
%p
|
11
|
+
The following audit was successfully submitted at
|
12
|
+
= succeed('.') do
|
13
|
+
= resource.submitted_at.strftime('%F')
|
14
|
+
|
15
|
+
- unless resource.determination.present?
|
16
|
+
Your audit must be reviewed and a final determination made.
|
17
|
+
We will send
|
18
|
+
%strong= resource.user.email
|
19
|
+
an email notifying you of the determination.
|
20
|
+
|
21
|
+
.mb-4= render(resource)
|
22
|
+
|
23
|
+
%br
|
24
|
+
.text-center= link_to 'Home', root_path, class: 'btn btn-primary'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%p You have been selected for #{resource.cpd_audit_level} audit and matched with:
|
3
|
+
|
4
|
+
%ul
|
5
|
+
- resource.cpd_audit_reviews.each do |cpd_audit_review|
|
6
|
+
%li #{cpd_audit_review.user} <#{mail_to(cpd_audit_review.user.email)}>
|
7
|
+
|
8
|
+
%p The deadline to declare a conflict of interest is: #{resource.deadline_to_conflict_of_interest.strftime('%F')}.
|
9
|
+
|
10
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
11
|
+
= f.hidden_field :current_step
|
12
|
+
|
13
|
+
= f.radios :conflict_of_interest, cpd_audit_conflict_of_interest_collection,
|
14
|
+
inline: true, required: true
|
15
|
+
|
16
|
+
= f.show_if :conflict_of_interest, true do
|
17
|
+
= f.text_area :conflict_of_interest_reason, required: true
|
18
|
+
|
19
|
+
= f.show_if :conflict_of_interest, false do
|
20
|
+
= f.hidden_field :conflict_of_interest_reason, value: ''
|
21
|
+
|
22
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,20 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- cpd_audit_level_section = resource.cpd_audit_level_section(step)
|
3
|
+
- raise("no cpd audit section for #{step}") if cpd_audit_level_section.blank?
|
4
|
+
|
5
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
6
|
+
= f.hidden_field :current_step
|
7
|
+
|
8
|
+
- if cpd_audit_level_section.top_content.present?
|
9
|
+
.mb-2= cpd_audit_level_section.top_content
|
10
|
+
|
11
|
+
- cpd_audit_level_section.cpd_audit_level_questions.each do |cpd_audit_level_question|
|
12
|
+
- cpd_audit_response = resource.cpd_audit_response(cpd_audit_level_question)
|
13
|
+
|
14
|
+
= f.fields_for :cpd_audit_responses, cpd_audit_response do |fcar|
|
15
|
+
= render('/effective/cpd_audit_responses/fields', f: fcar, cpd_audit_level_question: cpd_audit_level_question)
|
16
|
+
|
17
|
+
- if cpd_audit_level_section.bottom_content.present?
|
18
|
+
.mb-2= cpd_audit_level_section.bottom_content
|
19
|
+
|
20
|
+
= f.submit 'Start', center: true
|
@@ -0,0 +1,19 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- if resource.was_exemption_requested?
|
3
|
+
= render('effective/cpd_audits/exemption', cpd_audit: resource, step: :exemption)
|
4
|
+
|
5
|
+
%p The deadline to request an exemption is: #{resource.deadline_to_exemption.strftime('%F')}.
|
6
|
+
|
7
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
8
|
+
= f.hidden_field :current_step
|
9
|
+
|
10
|
+
= f.radios :exemption_request, cpd_audit_exemption_request_collection,
|
11
|
+
inline: true, required: true
|
12
|
+
|
13
|
+
= f.show_if :exemption_request, true do
|
14
|
+
= f.text_area :exemption_request_reason, required: true
|
15
|
+
|
16
|
+
= f.show_if :exemption_request, false do
|
17
|
+
= f.hidden_field :exemption_request_reason, value: ''
|
18
|
+
|
19
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,21 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- if resource.was_extension_requested?
|
3
|
+
= render('effective/cpd_audits/extension', cpd_audit: resource, step: :extension)
|
4
|
+
|
5
|
+
%p The deadline to request an extension is: #{resource.deadline_to_extension.strftime('%F')}.
|
6
|
+
|
7
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
8
|
+
= f.hidden_field :current_step
|
9
|
+
|
10
|
+
= f.radios :extension_request, cpd_audit_extension_request_collection,
|
11
|
+
inline: true, required: true
|
12
|
+
|
13
|
+
= f.show_if :extension_request, true do
|
14
|
+
= f.date_field :extension_request_date, required: true
|
15
|
+
= f.text_area :extension_request_reason, required: true
|
16
|
+
|
17
|
+
= f.show_if :extension_request, false do
|
18
|
+
= f.hidden_field :extension_request_date, value: ''
|
19
|
+
= f.hidden_field :extension_request_reason, value: ''
|
20
|
+
|
21
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%p You have been selected for #{resource.cpd_audit_level} audit and matched with:
|
3
|
+
|
4
|
+
%ul
|
5
|
+
- resource.cpd_audit_reviews.each do |cpd_audit_review|
|
6
|
+
%li #{cpd_audit_review.user} <#{mail_to(cpd_audit_review.user.email)}>
|
7
|
+
|
8
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
9
|
+
= f.hidden_field :current_step
|
10
|
+
|
11
|
+
= f.submit 'Start', center: true
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%p
|
3
|
+
Please review your audit before submitting.
|
4
|
+
|
5
|
+
%p
|
6
|
+
Once submitted you
|
7
|
+
%strong will not
|
8
|
+
be able to change your submission
|
9
|
+
|
10
|
+
.mb-4= render(resource)
|
11
|
+
|
12
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
13
|
+
= f.hidden_field :current_step
|
14
|
+
|
15
|
+
= f.submit 'Submit Audit', center: true
|
@@ -0,0 +1,24 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
- if resource.conflict_of_interest?
|
3
|
+
%h2 Conflict of Interest
|
4
|
+
%p You have indicated there is a conflict of interest with the following match:
|
5
|
+
|
6
|
+
%ul
|
7
|
+
- resource.cpd_audit_reviews.each do |cpd_audit_review|
|
8
|
+
%li #{cpd_audit_review.user} <#{mail_to(cpd_audit_review.user.email)}>
|
9
|
+
|
10
|
+
= render("effective/cpd_audits/conflict", cpd_audit: resource, step: :conflict)
|
11
|
+
|
12
|
+
- if resource.exemption_request?
|
13
|
+
%h2 Exemption Request
|
14
|
+
%p You have requested an exemption from this audit.
|
15
|
+
= render("effective/cpd_audits/exemption", cpd_audit: resource, step: :exemption)
|
16
|
+
|
17
|
+
- if resource.extension_request?
|
18
|
+
%h2 Extension Request
|
19
|
+
%p You have requested an extension to the deadline.
|
20
|
+
= render("effective/cpd_audits/extension", cpd_audit: resource, step: :extension)
|
21
|
+
|
22
|
+
%h2 Next Step
|
23
|
+
%p= cpd_audit_summary_text(resource)
|
24
|
+
%p You may not continue at this time. Please wait for an email with further instructions. Thank you.
|
@@ -0,0 +1 @@
|
|
1
|
+
If you're not using effective_email_templates each of these views needs to be written.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
subject: 'Your CPD Audit has been closed with a determination'
|
3
|
+
from: 'admin@example.com'
|
4
|
+
---
|
5
|
+
Hello {{ auditee.name }},
|
6
|
+
|
7
|
+
Your {{ audit.title }} has been closed.
|
8
|
+
|
9
|
+
The following determination was made: {{ audit.determination }}
|
10
|
+
|
11
|
+
Please check below for any additional details
|
12
|
+
|
13
|
+
{{ url }}
|
14
|
+
|
15
|
+
Thank you
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
subject: 'Your CPD Audit conflict of interest has been resolved'
|
3
|
+
from: 'admin@example.com'
|
4
|
+
---
|
5
|
+
Hello {{ auditee.name }},
|
6
|
+
|
7
|
+
The conflict of intereset has been resolved.
|
8
|
+
|
9
|
+
You have been assigned new reviewers.
|
10
|
+
|
11
|
+
Please continue your audit here
|
12
|
+
|
13
|
+
{{ url }}
|
14
|
+
|
15
|
+
Thank you
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
subject: 'CPD Audit conflict of interest from {{ auditee.name }}'
|
3
|
+
from: 'admin@example.com'
|
4
|
+
---
|
5
|
+
Hello Admin,
|
6
|
+
|
7
|
+
The auditee {{ auditee.name }} has indicated a conflict of interest.
|
8
|
+
|
9
|
+
Please process this conflict of interest.
|
10
|
+
|
11
|
+
{{ url }}
|
12
|
+
|
13
|
+
Thank you
|