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,24 @@
|
|
1
|
+
- raise('expected a conflicted cpd audit') unless cpd_audit.conflicted? || cpd_audit.errors.present?
|
2
|
+
|
3
|
+
%h2 Conflict of Interest
|
4
|
+
%p The auditee has indicated a conflict of interest:
|
5
|
+
= render('effective/cpd_audits/conflict', cpd_audit: cpd_audit, step: :conflict)
|
6
|
+
|
7
|
+
%h2 Resolve Conflict of Interest
|
8
|
+
%p
|
9
|
+
Please use the table below to delete any conflicting audit reviews, and create another reviewer.
|
10
|
+
|
11
|
+
= card('Update Audit Reviewers') do
|
12
|
+
%p There should be at least one audit reviewer.
|
13
|
+
|
14
|
+
- datatable = Admin::EffectiveCpdAuditReviewsDatatable.new(cpd_audit_id: cpd_audit.id)
|
15
|
+
= render_datatable(datatable, inline: true, simple: true)
|
16
|
+
|
17
|
+
= card('Mark Resolved') do
|
18
|
+
%p Once resolved, the auditee will be ready to continue their audit questionnaire.
|
19
|
+
|
20
|
+
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
21
|
+
%p Send email
|
22
|
+
= email_form_fields(f, :cpd_audit_conflict_resolved)
|
23
|
+
|
24
|
+
= f.submit 'Resolve Conflict of Interest', center: true
|
@@ -0,0 +1,10 @@
|
|
1
|
+
= card('Determination') do
|
2
|
+
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
3
|
+
%p This action will complete this audit and mark it as closed.
|
4
|
+
|
5
|
+
= f.select :determination, cpd_audit.cpd_audit_level.determinations
|
6
|
+
|
7
|
+
%h2 Email to Send
|
8
|
+
= email_form_fields(f, :cpd_audit_closed)
|
9
|
+
|
10
|
+
= f.submit 'Close Audit', center: true
|
@@ -0,0 +1,24 @@
|
|
1
|
+
- raise('expected an exemption requested cpd audit') unless cpd_audit.exemption_requested? || cpd_audit.errors.present?
|
2
|
+
|
3
|
+
%h2 Exemption Request
|
4
|
+
%p The auditee has requested an exemption:
|
5
|
+
= render('effective/cpd_audits/exemption', cpd_audit: cpd_audit, step: :exemption)
|
6
|
+
|
7
|
+
%h2 Resolve Exemption Request
|
8
|
+
%p Please grant or deny the request. If granted, this audit will be closed.
|
9
|
+
|
10
|
+
= card('Exemption Request') do
|
11
|
+
%p The exemption request shall be
|
12
|
+
|
13
|
+
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
14
|
+
= f.radios :admin_process_request, Effective::CpdAudit::ADMIN_PROCESS_REQUEST_OPTIONS, label: false, buttons: true, required: true
|
15
|
+
|
16
|
+
= f.show_if :admin_process_request, 'Granted' do
|
17
|
+
%p Send email
|
18
|
+
= email_form_fields(f, :cpd_audit_exemption_granted)
|
19
|
+
|
20
|
+
= f.show_if :admin_process_request, 'Denied' do
|
21
|
+
%p Send email
|
22
|
+
= email_form_fields(f, :cpd_audit_exemption_denied)
|
23
|
+
|
24
|
+
= f.submit 'Process Exemption Request', center: true
|
@@ -0,0 +1,24 @@
|
|
1
|
+
- raise('expected an extension requested cpd audit') unless cpd_audit.extension_requested? || cpd_audit.errors.present?
|
2
|
+
|
3
|
+
%h2 Extension Request
|
4
|
+
%p The auditee has requested an extension:
|
5
|
+
= render('effective/cpd_audits/extension', cpd_audit: cpd_audit, step: :extension)
|
6
|
+
|
7
|
+
%h2 Resolve Extension Request
|
8
|
+
%p Please grant or deny the request. If granted, the auditee's deadline will be updated.
|
9
|
+
|
10
|
+
= card('Extension Request') do
|
11
|
+
%p The extension request shall be
|
12
|
+
|
13
|
+
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
14
|
+
= f.radios :admin_process_request, Effective::CpdAudit::ADMIN_PROCESS_REQUEST_OPTIONS, label: false, buttons: true, required: true
|
15
|
+
|
16
|
+
= f.show_if :admin_process_request, 'Granted' do
|
17
|
+
%p Send email
|
18
|
+
= email_form_fields(f, :cpd_audit_extension_granted)
|
19
|
+
|
20
|
+
= f.show_if :admin_process_request, 'Denied' do
|
21
|
+
%p Send email
|
22
|
+
= email_form_fields(f, :cpd_audit_extension_denied)
|
23
|
+
|
24
|
+
= f.submit 'Process Extension Request', center: true
|
@@ -0,0 +1,28 @@
|
|
1
|
+
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
2
|
+
|
3
|
+
%h2 Audit
|
4
|
+
= f.select :cpd_audit_level_id, Effective::CpdAuditLevel.all.sorted, label: 'Audit level'
|
5
|
+
|
6
|
+
= f.date_field :notification_date, label: 'Date of notification', required: false,
|
7
|
+
hint: "the starting date for any deadline calculations. leave blank for today's date"
|
8
|
+
|
9
|
+
%h2 Auditee
|
10
|
+
= card('Auditee') do
|
11
|
+
%p.text-muted The auditee is the person being audited
|
12
|
+
= render('admin/cpd_audits/auditee_fields', form: f, f: f)
|
13
|
+
|
14
|
+
%p Send email
|
15
|
+
= email_form_fields(f, :cpd_audit_opened)
|
16
|
+
|
17
|
+
%h2 Audit Reviewers
|
18
|
+
%p.text-muted An audit review will be created for each selected auditor.
|
19
|
+
|
20
|
+
= f.has_many :cpd_audit_reviews, class: 'tight' do |fr|
|
21
|
+
= card('Audit Reviewer') do
|
22
|
+
%p.text-muted The audit reviewer is the person reviewing an audit
|
23
|
+
= render('admin/cpd_audits/audit_reviewer_fields', form: fr, f: fr)
|
24
|
+
|
25
|
+
%p Send email
|
26
|
+
= email_form_fields(fr, :cpd_audit_review_opened)
|
27
|
+
|
28
|
+
= f.submit 'Open Audit', center: true
|
@@ -0,0 +1,121 @@
|
|
1
|
+
%p= cpd_audit_summary_text(cpd_audit)
|
2
|
+
|
3
|
+
%table.table.table-striped
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
%th Status
|
7
|
+
%th Date Reached
|
8
|
+
%th Details
|
9
|
+
%th
|
10
|
+
%tbody
|
11
|
+
%tr
|
12
|
+
%td Opened
|
13
|
+
%td= cpd_audit.opened_at.strftime('%F') || '-'
|
14
|
+
%td #{icon('check', class: 'small-1')} Done
|
15
|
+
%td
|
16
|
+
|
17
|
+
%tr
|
18
|
+
%td Started
|
19
|
+
%td= cpd_audit.started_at&.strftime('%F') || '-'
|
20
|
+
%td
|
21
|
+
- if cpd_audit.was_submitted?
|
22
|
+
= icon('check', class: 'small-1')
|
23
|
+
Done
|
24
|
+
- elsif cpd_audit.was_started?
|
25
|
+
= icon('check', class: 'small-1')
|
26
|
+
In Progress
|
27
|
+
%td
|
28
|
+
|
29
|
+
- if cpd_audit.cpd_audit_level.conflict_of_interest?
|
30
|
+
%tr
|
31
|
+
%td Conflict of Interest
|
32
|
+
%td= cpd_audit.conflicted_at&.strftime('%F') || '-'
|
33
|
+
%td
|
34
|
+
- if cpd_audit.conflicted?
|
35
|
+
= icon('x', class: 'small-1')
|
36
|
+
Auditee has indicated conflict of interest
|
37
|
+
- elsif cpd_audit.was_conflicted_resolved?
|
38
|
+
= icon('check', class: 'small-1')
|
39
|
+
Resolved
|
40
|
+
- elsif cpd_audit.was_submitted?
|
41
|
+
= icon('check', class: 'small-1')
|
42
|
+
No Conflict
|
43
|
+
%td
|
44
|
+
- if cpd_audit.conflicted?
|
45
|
+
= link_to 'Process Conflict of Interest', '#process-conflict-of-interest', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
46
|
+
|
47
|
+
- if cpd_audit.cpd_audit_level.can_request_exemption?
|
48
|
+
%tr
|
49
|
+
%td Exemption Request
|
50
|
+
%td= cpd_audit.exemption_requested_at&.strftime('%F') || '-'
|
51
|
+
%td
|
52
|
+
- if cpd_audit.exemption_requested?
|
53
|
+
= icon('x', class: 'small-1')
|
54
|
+
Auditee has requested an exemption
|
55
|
+
- elsif cpd_audit.was_exemption_granted?
|
56
|
+
= icon('check', class: 'small-1')
|
57
|
+
Exemption Granted
|
58
|
+
- elsif cpd_audit.was_exemption_denied?
|
59
|
+
= icon('check', class: 'small-1')
|
60
|
+
Exemption Denied
|
61
|
+
- elsif cpd_audit.was_submitted?
|
62
|
+
= icon('check', class: 'small-1')
|
63
|
+
No Exemption
|
64
|
+
%td
|
65
|
+
- if cpd_audit.exemption_requested?
|
66
|
+
= link_to 'Process Exemption Request', '#process-exemption-request', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
67
|
+
|
68
|
+
- if cpd_audit.cpd_audit_level.can_request_extension?
|
69
|
+
%tr
|
70
|
+
%td Extension Request
|
71
|
+
%td= cpd_audit.extension_requested_at&.strftime('%F') || '-'
|
72
|
+
%td
|
73
|
+
- if cpd_audit.extension_requested?
|
74
|
+
= icon('x', class: 'small-1')
|
75
|
+
Auditee has requested an extension
|
76
|
+
- elsif cpd_audit.was_extension_granted?
|
77
|
+
= icon('check', class: 'small-1')
|
78
|
+
Extension Granted
|
79
|
+
- elsif cpd_audit.was_extension_denied?
|
80
|
+
= icon('check', class: 'small-1')
|
81
|
+
Extension Denied
|
82
|
+
- elsif cpd_audit.was_submitted?
|
83
|
+
= icon('check', class: 'small-1')
|
84
|
+
No Extension
|
85
|
+
%td
|
86
|
+
- if cpd_audit.extension_requested?
|
87
|
+
= link_to 'Process Extension Request', '#process-extension-request', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
88
|
+
|
89
|
+
%tr
|
90
|
+
%td Submitted
|
91
|
+
%td= cpd_audit.submitted_at&.strftime('%F') || '-'
|
92
|
+
%td
|
93
|
+
- if cpd_audit.was_submitted?
|
94
|
+
= icon('check', class: 'small-1')
|
95
|
+
Done
|
96
|
+
%td
|
97
|
+
|
98
|
+
%tr
|
99
|
+
%td Reviewed
|
100
|
+
%td= cpd_audit.reviewed_at&.strftime('%F') || '-'
|
101
|
+
%td
|
102
|
+
= cpd_audit.cpd_audit_reviews.count { |review| review.completed? }
|
103
|
+
= '/'
|
104
|
+
= cpd_audit.cpd_audit_reviews.count
|
105
|
+
|
106
|
+
Reviews Completed
|
107
|
+
|
108
|
+
%td
|
109
|
+
- if cpd_audit.was_submitted? && !cpd_audit.was_reviewed?
|
110
|
+
= link_to 'Audit Reviews', '#audit-reviews', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
111
|
+
|
112
|
+
%tr
|
113
|
+
%td Closed
|
114
|
+
%td= cpd_audit.closed_at&.strftime('%F') || '-'
|
115
|
+
%td
|
116
|
+
- if cpd_audit.completed?
|
117
|
+
= cpd_audit.determination
|
118
|
+
|
119
|
+
%td
|
120
|
+
- if cpd_audit.reviewed? && !cpd_audit.completed?
|
121
|
+
= link_to 'Determination', '#determination', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
@@ -3,15 +3,15 @@
|
|
3
3
|
= render 'admin/cpd_cycles/form_cpd_cycle', cpd_cycle: cpd_cycle
|
4
4
|
|
5
5
|
- if cpd_cycle.persisted?
|
6
|
-
= tab 'Content' do
|
7
|
-
= render 'admin/cpd_cycles/form_content', cpd_cycle: cpd_cycle
|
8
|
-
|
9
6
|
= tab 'Category and Activity Rules' do
|
10
7
|
= tabs do
|
11
8
|
- Effective::CpdCategory.deep.sorted.each do |cpd_category|
|
12
9
|
= tab(cpd_category.to_s) do
|
13
10
|
= render 'admin/cpd_cycles/form_cpd_rules', cpd_cycle: cpd_cycle, cpd_category: cpd_category
|
14
11
|
|
12
|
+
= tab 'Content' do
|
13
|
+
= render 'admin/cpd_cycles/form_content', cpd_cycle: cpd_cycle
|
14
|
+
|
15
15
|
- if cpd_cycle.respond_to?(:log_changes_datatable)
|
16
16
|
= tab 'Logs' do
|
17
|
-
=
|
17
|
+
= render_inline_datatable(cpd_cycle.log_changes_datatable)
|
@@ -8,6 +8,9 @@
|
|
8
8
|
= f.date_field :end_at,
|
9
9
|
hint: "The last date statements may be created for this #{cpd_cycle_label}. leave blank for no end date."
|
10
10
|
|
11
|
+
= f.number_field :required_score,
|
12
|
+
hint: "The minimum required #{cpd_credits_label} to submit statements for this #{cpd_cycle_label}. leave blank to submit any score."
|
13
|
+
|
11
14
|
- if f.object.new_record?
|
12
15
|
- latest_cycle = Effective::CpdCycle.latest_cycle
|
13
16
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= tabs do
|
2
|
+
= tab 'Statement' do
|
3
|
+
= render('effective/cpd_statements/cpd_statement', cpd_statement: cpd_statement)
|
4
|
+
|
5
|
+
- if cpd_statement.persisted? && cpd_statement.respond_to?(:log_changes_datatable)
|
6
|
+
= tab 'Logs' do
|
7
|
+
= render_inline_datatable(cpd_statement.log_changes_datatable)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
.row
|
2
|
+
.col
|
3
|
+
= render(cpd_audit_level_question)
|
4
|
+
|
5
|
+
%p.text-muted
|
6
|
+
%small= cpd_audit_level_question.category
|
7
|
+
|
8
|
+
= f.hidden_field :cpd_audit_id
|
9
|
+
= f.hidden_field :cpd_audit_level_question_id
|
10
|
+
|
11
|
+
- cpd_audit_response = f.object
|
12
|
+
- partial = 'effective/cpd_audit_responses/fields/' + cpd_audit_level_question.category_partial
|
13
|
+
= render(partial, f: f, cpd_audit_response: cpd_audit_response, cpd_audit_level_question: cpd_audit_level_question)
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.radios :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.text_area :long_answer, label: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, actions: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, actions: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, actions: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, actions: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.checks :cpd_audit_level_question_option_ids, cpd_audit_level_question.cpd_audit_level_question_options, label: false, actions: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.text_field :short_answer, label: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.file_field :upload_file, label: false, required: cpd_audit_level_question.required?
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response.presence || '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response&.strftime('%F') || '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response.present? ? mail_to(cpd_audit_response.response) : '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response.presence || '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response.presence || '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response&.title || '-'
|
@@ -0,0 +1 @@
|
|
1
|
+
= cpd_audit_response.response.presence || '-'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= f.hidden_field :item_id
|
2
|
+
= f.hidden_field :item_type
|
3
|
+
|
4
|
+
- recommendations = cpd_audit_review.cpd_audit_level.recommendations
|
5
|
+
|
6
|
+
- if recommendations.length > 3
|
7
|
+
= f.select :recommendation, recommendations
|
8
|
+
- else
|
9
|
+
= f.radios :recommendation, recommendations, inline: true
|
10
|
+
|
11
|
+
= f.text_area :comments
|