effective_cpd 1.2.4 → 1.3.1
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_audits_controller.rb +4 -4
- data/app/controllers/admin/cpd_statement_activities_controller.rb +3 -5
- data/app/controllers/admin/cpd_statements_controller.rb +0 -2
- data/app/controllers/effective/cpd_audits_controller.rb +1 -1
- data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +6 -6
- data/app/datatables/admin/effective_cpd_audits_datatable.rb +10 -10
- data/app/datatables/admin/effective_cpd_bulk_audits_datatable.rb +3 -4
- data/app/datatables/admin/effective_cpd_rules_datatable.rb +4 -4
- data/app/datatables/admin/effective_cpd_special_rules_datatable.rb +2 -2
- data/app/datatables/admin/effective_cpd_statement_activities_datatable.rb +3 -3
- data/app/datatables/admin/effective_cpd_statements_datatable.rb +1 -1
- data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +2 -2
- data/app/datatables/effective_cpd_available_audits_datatable.rb +1 -1
- data/app/datatables/effective_cpd_available_cycles_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/datatables/effective_cpd_completed_statements_datatable.rb +3 -3
- data/app/helpers/effective_cpd_audits_helper.rb +1 -2
- data/app/helpers/effective_cpd_helper.rb +58 -6
- data/app/models/concerns/effective_cpd_audit.rb +21 -16
- data/app/models/concerns/effective_cpd_audit_level.rb +1 -1
- data/app/models/concerns/effective_cpd_audit_review.rb +1 -1
- data/app/models/concerns/effective_cpd_bulk_audit.rb +1 -1
- data/app/models/concerns/effective_cpd_statement.rb +1 -1
- data/app/models/effective/cpd_activity.rb +1 -1
- data/app/models/effective/cpd_audit_level_question.rb +1 -1
- data/app/models/effective/cpd_audit_level_question_option.rb +1 -1
- data/app/models/effective/cpd_audit_level_section.rb +1 -1
- data/app/models/effective/cpd_audit_response.rb +1 -1
- data/app/models/effective/cpd_audit_review_item.rb +1 -1
- data/app/models/effective/cpd_category.rb +1 -1
- data/app/models/effective/cpd_cycle.rb +1 -1
- data/app/models/effective/cpd_scorer.rb +1 -0
- data/app/models/effective/cpd_special_rule.rb +1 -1
- data/app/models/effective/cpd_statement_activity.rb +1 -1
- data/app/views/admin/cpd_activities/_form.html.haml +1 -1
- data/app/views/admin/cpd_audit_level_questions/_form.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form.html.haml +4 -4
- 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 +25 -18
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +1 -1
- data/app/views/admin/cpd_audit_reviews/_form.html.haml +2 -2
- data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +1 -1
- data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_chat.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_close.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_complete.html.haml +4 -4
- data/app/views/admin/cpd_audits/_form_conflict.html.haml +5 -5
- data/app/views/admin/cpd_audits/_form_cpd_audit.html.haml +6 -6
- data/app/views/admin/cpd_audits/_form_deadlines.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_exemption.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_extension.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_files.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_missing_info.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_new.html.haml +10 -12
- data/app/views/admin/cpd_audits/_form_process.html.haml +1 -1
- data/app/views/admin/cpd_audits/_status.html.haml +7 -10
- data/app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml +6 -6
- data/app/views/admin/cpd_categories/_form.html.haml +2 -2
- data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +5 -5
- data/app/views/admin/cpd_special_rules/_form.html.haml +2 -2
- data/app/views/admin/cpd_statements/_cpd_statement.html.haml +2 -2
- data/app/views/admin/users/_form_cpd.html.haml +2 -2
- data/app/views/admin/users/_form_cpd_audits.html.haml +4 -4
- data/app/views/effective/cpd/_dashboard.html.haml +10 -10
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/_summary.html.haml +3 -3
- 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 +1 -1
- data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/feedback.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/files.html.haml +2 -2
- data/app/views/effective/cpd_audit_reviews/instructions.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/start.html.haml +4 -4
- data/app/views/effective/cpd_audit_reviews/statements.html.haml +6 -6
- data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/submitted.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/waiting.html.haml +1 -1
- data/app/views/effective/cpd_audits/_missing_info.html.haml +3 -3
- data/app/views/effective/cpd_audits/_summary.html.haml +2 -2
- data/app/views/effective/cpd_audits/conflict.html.haml +2 -2
- data/app/views/effective/cpd_audits/start.html.haml +2 -2
- data/app/views/effective/cpd_audits/submit.html.haml +3 -3
- data/app/views/effective/cpd_audits/submitted.haml +4 -4
- data/app/views/effective/cpd_audits/waiting.html.haml +1 -1
- data/app/views/effective/cpd_statements/_activities_new.html.haml +1 -1
- data/app/views/effective/cpd_statements/_activities_table.html.haml +2 -2
- data/app/views/effective/cpd_statements/_summary.html.haml +1 -1
- data/app/views/effective/cpd_statements/agreements.html.haml +1 -1
- data/app/views/effective/cpd_statements/submit.html.haml +1 -1
- data/config/effective_cpd.rb +0 -5
- data/config/locales/effective_cpd.en.yml +28 -0
- data/config/routes.rb +1 -1
- data/lib/effective_cpd/version.rb +1 -1
- data/lib/effective_cpd.rb +1 -1
- data/lib/generators/effective_cpd/install_generator.rb +4 -0
- metadata +3 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
- if inline_datatable?
|
3
3
|
= f.hidden_field :cpd_audit_level_section_id
|
4
4
|
- else
|
5
|
-
= f.select :cpd_audit_level_section_id, Effective::CpdAuditLevelSection.sorted.all
|
5
|
+
= f.select :cpd_audit_level_section_id, Effective::CpdAuditLevelSection.sorted.all, label: 'Section'
|
6
6
|
|
7
7
|
= f.text_field :title, label: 'Question Title'
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
= tabs do
|
2
|
-
= tab
|
2
|
+
= tab(cpd_audit_level) do
|
3
3
|
= render 'admin/cpd_audit_levels/form_cpd_audit_level', cpd_audit_level: cpd_audit_level
|
4
4
|
|
5
5
|
- if cpd_audit_level.persisted?
|
6
6
|
= tab 'Sections and Questions' do
|
7
7
|
%p
|
8
|
-
Each of the following sections is a step on the
|
8
|
+
Each of the following sections is a step on the #{cpd_audit_label} wizard.
|
9
9
|
The All Steps content will be displayed as well as the top and bottom content.
|
10
10
|
|
11
11
|
= tabs do
|
@@ -13,10 +13,10 @@
|
|
13
13
|
= tab(cpd_audit_level_section.to_s) do
|
14
14
|
= render 'admin/cpd_audit_levels/form_cpd_audit_level_section', cpd_audit_level: cpd_audit_level, cpd_audit_level_section: cpd_audit_level_section
|
15
15
|
|
16
|
-
= tab
|
16
|
+
= tab "#{cpd_audits_label} Wizard" do
|
17
17
|
= render 'admin/cpd_audit_levels/form_content_audit', cpd_audit_level: cpd_audit_level
|
18
18
|
|
19
|
-
= tab
|
19
|
+
= tab "#{cpd_audit_reviews_label} Wizard" do
|
20
20
|
= render 'admin/cpd_audit_levels/form_content_audit_review', cpd_audit_level: cpd_audit_level
|
21
21
|
|
22
22
|
- if cpd_audit_level.respond_to?(:log_changes_datatable)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%p Each of the following content areas will be displayed on the
|
1
|
+
%p Each of the following content areas will be displayed on the #{cpd_auditee_label} wizard.
|
2
2
|
|
3
3
|
= effective_form_with(model: [:admin, cpd_audit_level], engine: true) do |f|
|
4
4
|
= card("All Steps Content") do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%p Each of the following content areas will be displayed on the
|
1
|
+
%p Each of the following content areas will be displayed on the #{cpd_reviewers_label} wizard.
|
2
2
|
|
3
3
|
= effective_form_with(model: [:admin, cpd_audit_level], engine: true) do |f|
|
4
4
|
= card("All Steps Content") do
|
@@ -1,25 +1,32 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_audit_level], engine: true) do |f|
|
2
|
-
= f.text_field :title
|
2
|
+
= f.text_field :title
|
3
3
|
|
4
|
-
= f.check_box :anonymous, label:
|
4
|
+
= f.check_box :anonymous, label: "Yes, this is an anonymous #{cpd_audit_label}"
|
5
5
|
|
6
6
|
= f.show_if(:anonymous, true) do
|
7
7
|
.row
|
8
|
-
.col
|
9
|
-
|
8
|
+
.col
|
9
|
+
= f.text_field :anonymous_audits_prefix,
|
10
|
+
label: "Anonymous #{cpd_audits_label} prefix",
|
11
|
+
hint: "Used to prefix #{cpd_audits_label}. Something like A23"
|
12
|
+
|
13
|
+
.col
|
14
|
+
= f.text_field :anonymous_audit_reviews_prefix,
|
15
|
+
label: "Anonymous #{cpd_audit_reviews_label} prefix",
|
16
|
+
hint: "Used to prefix #{cpd_audit_reviews_label}. Something like R23"
|
10
17
|
|
11
18
|
= f.select :recommendations, f.object.recommendations,
|
12
|
-
label:
|
13
|
-
hint:
|
19
|
+
label: "#{cpd_audit_review_label} recommendation choices", tags: true, placeholder: 'Type to add item...',
|
20
|
+
hint: "The recommendation made by the #{cpd_reviewer_label} when reviewing the #{cpd_audit_label}. Begin typing and then press enter to add a choice"
|
14
21
|
|
15
22
|
= f.select :determinations, f.object.determinations,
|
16
|
-
label:
|
17
|
-
hint:
|
23
|
+
label: "#{cpd_audit_label} determination choices", tags: true, placeholder: 'Type to add item...',
|
24
|
+
hint: "The final determination made when closing the #{cpd_audit_label}. Begin typing and then press enter to add a choice."
|
18
25
|
|
19
26
|
%h2 Sections
|
20
27
|
%p
|
21
28
|
Please add at least one section.
|
22
|
-
Each section is a step on the
|
29
|
+
Each section is a step on the #{cpd_audit_label} wizard with its own content and questions.
|
23
30
|
|
24
31
|
= f.has_many :cpd_audit_level_sections, class: 'tight' do |fas|
|
25
32
|
= fas.text_field :title, label: false
|
@@ -27,32 +34,32 @@
|
|
27
34
|
%h2 Deadlines
|
28
35
|
%p.text-muted Leave blank for no deadlines
|
29
36
|
.row
|
30
|
-
.col= f.text_field :days_to_submit, label:
|
31
|
-
.col= f.text_field :days_to_review, label:
|
37
|
+
.col= f.text_field :days_to_submit, label: "Days for #{cpd_auditee_label} to submit", hint: "The number of business days from the date of notification or approved extension that the #{cpd_auditee_label} has to submit their #{cpd_audit_label}."
|
38
|
+
.col= f.text_field :days_to_review, label: "Days for #{cpd_reviewer_label} to review", hint: "The number of business days from the #{cpd_auditee_label}'s deadline that the #{cpd_reviewer_label} has submit their #{cpd_audit_review_label}."
|
32
39
|
|
33
40
|
%h2 Workflows
|
34
|
-
%p.text-muted Each of these workflows will be displayed to the
|
41
|
+
%p.text-muted Each of these workflows will be displayed to the #{cpd_auditee_label} and/or #{cpd_reviewer_label} on their wizard steps. Leave blank for no deadlines.
|
35
42
|
|
36
43
|
.row
|
37
44
|
.col
|
38
45
|
%h3 Conflict of Interest
|
39
|
-
= f.check_box :conflict_of_interest, label:
|
46
|
+
= f.check_box :conflict_of_interest, label: "Yes, the #{cpd_auditee_label} and #{cpd_reviewer_label} may declare a conflict of interest with their matching"
|
40
47
|
|
41
48
|
= f.show_if :conflict_of_interest, true do
|
42
|
-
= f.text_field :days_to_declare_conflict, label: 'Days to declare conflict of interest', hint: "The number of business days from the date of notification that an
|
49
|
+
= f.text_field :days_to_declare_conflict, label: 'Days to declare conflict of interest', hint: "The number of business days from the date of notification that an #{cpd_auditee_label} and #{cpd_reviewer_label} have to declare a conflict of interest with the matching."
|
43
50
|
|
44
51
|
.col
|
45
52
|
%h3 Exemption
|
46
|
-
= f.check_box :can_request_exemption, label: "Yes, the
|
53
|
+
= f.check_box :can_request_exemption, label: "Yes, the #{cpd_auditee_label} may request an exemption<br><br>".html_safe
|
47
54
|
|
48
55
|
= f.show_if :can_request_exemption, true do
|
49
|
-
= f.text_field :days_to_request_exemption, label: 'Days to request exemption', hint: "The number of business days from the date of notification that
|
56
|
+
= f.text_field :days_to_request_exemption, label: 'Days to request exemption', hint: "The number of business days from the date of notification that the #{cpd_auditee_label} may request an exemption."
|
50
57
|
|
51
58
|
.col
|
52
59
|
%h3 Extension
|
53
|
-
= f.check_box :can_request_extension, label: "Yes, the
|
60
|
+
= f.check_box :can_request_extension, label: "Yes, the #{cpd_auditee_label} may request an extension<br><br>"
|
54
61
|
|
55
62
|
= f.show_if :can_request_extension, true do
|
56
|
-
= f.text_field :days_to_request_extension, label: 'Days to request extension', hint: "The number of business days from the date of notification that
|
63
|
+
= f.text_field :days_to_request_extension, label: 'Days to request extension', hint: "The number of business days from the date of notification that the #{cpd_auditee_label} may request an extension."
|
57
64
|
|
58
65
|
= effective_submit(f)
|
@@ -7,7 +7,7 @@
|
|
7
7
|
= fas.rich_text_area :top_content
|
8
8
|
= fas.rich_text_area :bottom_content
|
9
9
|
|
10
|
-
= fas.check_box :skip_review, label:
|
10
|
+
= fas.check_box :skip_review, label: "Do not display this section to #{cpd_reviewers_label}"
|
11
11
|
|
12
12
|
= f.submit
|
13
13
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
= f.hidden_field :cpd_audit_id
|
4
4
|
= f.hidden_field :cpd_audit_type
|
5
5
|
|
6
|
-
= f.static_field :cpd_audit
|
6
|
+
= f.static_field :cpd_audit
|
7
7
|
- else
|
8
8
|
= f.hidden_field :cpd_audit_type, value: EffectiveCpd.CpdAudit.class.name
|
9
|
-
= f.select :cpd_audit_id, EffectiveCpd.CpdAudit.available.sorted.all
|
9
|
+
= f.select :cpd_audit_id, EffectiveCpd.CpdAudit.available.sorted.all, label: cpd_audit_label
|
10
10
|
|
11
11
|
= render('admin/cpd_audits/audit_reviewer_fields', f: f)
|
12
12
|
|
@@ -1,2 +1,2 @@
|
|
1
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)
|
2
|
+
= f.select :user_id, cpd_audit_new_reviewer_collection(f.object.cpd_audit)
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
= f.select :
|
1
|
+
= f.hidden_field :user_type, value: current_user.class.name
|
2
|
+
= f.select :user_id, current_user.class.send(EffectiveCpd.auditee_user_scope)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
= card('Chat Permission') do
|
2
2
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
3
|
-
%p By default,
|
3
|
+
%p By default, #{cpd_auditees_label} and #{cpd_reviewers_label} can send messages until the #{cpd_audit_label} is closed.
|
4
4
|
|
5
5
|
.row
|
6
6
|
.col-sm-6
|
@@ -10,4 +10,4 @@
|
|
10
10
|
- if cpd_audit.chat.present?
|
11
11
|
= render('effective/chats/chat', chat: cpd_audit.chat)
|
12
12
|
- else
|
13
|
-
%p No
|
13
|
+
%p No messages
|
@@ -1,10 +1,10 @@
|
|
1
1
|
= card('Determination') do
|
2
2
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
3
|
-
%p This action will <strong>close</strong> this
|
3
|
+
%p This action will <strong>close</strong> this #{cpd_audit_label} with the following determination:
|
4
4
|
|
5
5
|
= f.select :determination, cpd_audit.cpd_audit_level.determinations
|
6
6
|
|
7
7
|
%h2 Email to Send
|
8
8
|
= email_form_fields(f, :cpd_audit_closed)
|
9
9
|
|
10
|
-
= f.submit 'Close
|
10
|
+
= f.submit 'Close', center: true, 'data-confirm': "Really close #{cpd_audit}?"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
2
2
|
= f.hidden_field :id
|
3
3
|
|
4
|
-
%p This
|
4
|
+
%p This #{cpd_audit_label} will be marked as <strong>completed information</strong> and <strong>ready for review</strong>.
|
5
5
|
|
6
6
|
- reviewers = cpd_audit.cpd_audit_reviews
|
7
7
|
|
@@ -11,20 +11,20 @@
|
|
11
11
|
- email = Effective::EmailTemplate.where(template_name: :cpd_audit_review_ready).first!
|
12
12
|
|
13
13
|
The existing
|
14
|
-
= link_to(pluralize(reviewers.length,
|
14
|
+
= link_to(pluralize(reviewers.length, cpd_reviewers_label), '#' + cpd_reviewers_label.parameterize, 'data-click-tab': true)
|
15
15
|
will be sent an
|
16
16
|
= link_to('cpd_audit_review_ready email', effective_email_templates.edit_admin_email_template_path(email))
|
17
17
|
email.
|
18
18
|
|
19
19
|
- if reviewers.blank?
|
20
|
-
%p Please assign one or more
|
20
|
+
%p Please assign one or more #{cpd_reviewers_label}:
|
21
21
|
|
22
22
|
- # Pre-select the first reviewer if present
|
23
23
|
- if f.object.cpd_audit_reviews.blank?
|
24
24
|
- f.object.cpd_audit_reviews.build(user: cpd_audit.suggested_cpd_audit_reviewers.first)
|
25
25
|
|
26
26
|
= f.has_many :cpd_audit_reviews, class: 'tight' do |fr|
|
27
|
-
= card(
|
27
|
+
= card(cpd_reviewer_label) do
|
28
28
|
= render('admin/cpd_audits/audit_reviewer_fields', form: fr, f: fr)
|
29
29
|
|
30
30
|
%p Send email
|
@@ -1,21 +1,21 @@
|
|
1
1
|
- raise('expected a conflicted cpd audit') unless cpd_audit.conflicted? || cpd_audit.errors.present?
|
2
2
|
|
3
3
|
%h2 Conflict of Interest
|
4
|
-
%p The
|
4
|
+
%p The #{cpd_auditee_label} has indicated a conflict of interest:
|
5
5
|
= render('effective/cpd_audits/conflict', cpd_audit: cpd_audit, step: :conflict)
|
6
6
|
|
7
7
|
%h2 Resolve Conflict of Interest
|
8
8
|
%p
|
9
|
-
Please use the table below to delete any conflicting
|
9
|
+
Please use the table below to delete any conflicting #{cpd_reviewers_label}, and create another #{cpd_reviewer_label}.
|
10
10
|
|
11
|
-
= card(
|
12
|
-
%p There should be at least one
|
11
|
+
= card("Update #{cpd_reviewers_label}") do
|
12
|
+
%p There should be at least one #{cpd_reviewer_label}.
|
13
13
|
|
14
14
|
- datatable = Admin::EffectiveCpdAuditReviewsDatatable.new(cpd_audit_id: cpd_audit.id)
|
15
15
|
= render_datatable(datatable, inline: true, simple: true)
|
16
16
|
|
17
17
|
= card('Mark Resolved') do
|
18
|
-
%p Once resolved, the
|
18
|
+
%p Once resolved, the #{cpd_auditee_label} will be ready to continue their #{cpd_audit_label} questionnaire.
|
19
19
|
|
20
20
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
21
21
|
%p Send email
|
@@ -1,11 +1,11 @@
|
|
1
1
|
= tabs do
|
2
2
|
- if cpd_audit.new_record?
|
3
|
-
= tab
|
3
|
+
= tab(cpd_audit) do
|
4
4
|
= render 'admin/cpd_audits/form_new', cpd_audit: cpd_audit
|
5
5
|
|
6
6
|
- if cpd_audit.persisted?
|
7
7
|
- if cpd_audit.completed?
|
8
|
-
= tab
|
8
|
+
= tab(cpd_audit) do
|
9
9
|
= render 'effective/cpd_audits/cpd_audit', cpd_audit: cpd_audit
|
10
10
|
|
11
11
|
= tab 'Status' do
|
@@ -14,7 +14,7 @@
|
|
14
14
|
= tab 'Status' do
|
15
15
|
= render 'admin/cpd_audits/status', cpd_audit: cpd_audit
|
16
16
|
|
17
|
-
= tab
|
17
|
+
= tab(cpd_audit) do
|
18
18
|
= render 'effective/cpd_audits/cpd_audit', cpd_audit: cpd_audit
|
19
19
|
|
20
20
|
- if cpd_audit.conflicted?
|
@@ -43,16 +43,16 @@
|
|
43
43
|
= render 'admin/cpd_audits/form_files', cpd_audit: cpd_audit
|
44
44
|
|
45
45
|
- if cpd_audit.user_cpd_required?
|
46
|
-
= tab
|
46
|
+
= tab(cpd_audit.cpd_audit_reviews) do
|
47
47
|
- datatable = Admin::EffectiveCpdStatementsDatatable.new(user: cpd_audit.user)
|
48
48
|
= render_datatable(datatable, inline: true, simple: true)
|
49
49
|
|
50
|
-
= tab
|
50
|
+
= tab(cpd_audit.cpd_audit_reviews) do
|
51
51
|
- datatable = EffectiveResources.best('Admin::EffectiveCpdAuditReviewsDatatable').new(cpd_audit: cpd_audit)
|
52
52
|
= render_datatable(datatable, inline: true, simple: true)
|
53
53
|
|
54
54
|
- if EffectiveCpd.use_effective_messaging?
|
55
|
-
= tab
|
55
|
+
= tab(cpd_audit.chats) do
|
56
56
|
= render 'admin/cpd_audits/form_chat', cpd_audit: cpd_audit
|
57
57
|
|
58
58
|
- if cpd_audit.respond_to?(:log_changes_datatable)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
2
|
-
%p The
|
2
|
+
%p The #{cpd_auditee_label} has the following deadlines:
|
3
3
|
|
4
4
|
%ul
|
5
5
|
%li To declare conflict of interest: #{f.object.deadline_to_conflict_of_interest.presence || 'None'}
|
6
6
|
%li To request exemption: #{f.object.deadline_to_exemption.presence || 'None'}
|
7
7
|
%li To request extension: #{f.object.deadline_to_extension.presence || 'None'}
|
8
8
|
|
9
|
-
= f.check_box :ignore_deadlines, label:
|
9
|
+
= f.check_box :ignore_deadlines, label: "Yes, ignore deadlines and allow these actions to be performed"
|
10
10
|
|
11
11
|
= f.submit 'Save', center: true
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- raise('expected an exemption requested cpd audit') unless cpd_audit.exemption_requested? || cpd_audit.errors.present?
|
2
2
|
|
3
3
|
%h2 Exemption Request
|
4
|
-
%p The
|
4
|
+
%p The #{cpd_auditee_label} has requested an exemption:
|
5
5
|
= render('effective/cpd_audits/exemption', cpd_audit: cpd_audit, step: :exemption)
|
6
6
|
|
7
7
|
%h2 Resolve Exemption Request
|
8
|
-
%p Please grant or deny the request. If granted, this
|
8
|
+
%p Please grant or deny the request. If granted, this #{cpd_audit_label} will be closed.
|
9
9
|
|
10
10
|
= card('Exemption Request') do
|
11
11
|
%p The exemption request shall be
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- raise('expected an extension requested cpd audit') unless cpd_audit.extension_requested? || cpd_audit.errors.present?
|
2
2
|
|
3
3
|
%h2 Extension Request
|
4
|
-
%p The
|
4
|
+
%p The #{cpd_auditee_label} has requested an extension:
|
5
5
|
= render('effective/cpd_audits/extension', cpd_audit: cpd_audit, step: :extension)
|
6
6
|
|
7
7
|
%h2 Resolve Extension Request
|
8
|
-
%p Please grant or deny the request. If granted, the
|
8
|
+
%p Please grant or deny the request. If granted, the #{cpd_auditee_label}'s deadline will be updated.
|
9
9
|
|
10
10
|
= card('Extension Request') do
|
11
11
|
%p The extension request shall be
|
@@ -1,5 +1,5 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
2
|
-
%p This
|
2
|
+
%p This #{cpd_audit_label} will be marked as <strong>missing information</strong> with the following:
|
3
3
|
|
4
4
|
= f.text_field :missing_info_reason, required: true, label: 'Explanation of missing info'
|
5
5
|
|
@@ -1,32 +1,30 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_audit], engine: true) do |f|
|
2
|
-
|
3
|
-
%h2 Audit
|
4
2
|
= f.hidden_field :cpd_audit_level_type, value: EffectiveCpd.CpdAuditLevel.name
|
5
3
|
|
6
|
-
= f.select :cpd_audit_level_id, EffectiveCpd.CpdAuditLevel.new_cpd_audit_level_collection, label:
|
4
|
+
= f.select :cpd_audit_level_id, EffectiveCpd.CpdAuditLevel.new_cpd_audit_level_collection, label: cpd_audit_label
|
7
5
|
|
8
|
-
= f.date_field :notification_date,
|
6
|
+
= f.date_field :notification_date, required: false,
|
9
7
|
hint: "the starting date for any deadline calculations. leave blank for today's date"
|
10
8
|
|
11
9
|
= render('admin/cpd_audits/form_new_fields', form: f, f: f)
|
12
10
|
|
13
|
-
%h2
|
14
|
-
|
15
|
-
|
11
|
+
%h2 Select #{cpd_auditee_label}
|
12
|
+
%p.text-muted Please select one #{cpd_auditee_label.downcase}
|
13
|
+
= card(cpd_auditee_label) do
|
16
14
|
= render('admin/cpd_audits/auditee_fields', form: f, f: f)
|
17
15
|
|
18
16
|
%p Send email
|
19
17
|
= email_form_fields(f, :cpd_audit_opened)
|
20
18
|
|
21
|
-
%h2
|
22
|
-
%p.text-muted
|
19
|
+
%h2 Select #{cpd_reviewers_label}
|
20
|
+
%p.text-muted Please select one or more #{cpd_reviewer_label}
|
23
21
|
|
24
22
|
= f.has_many :cpd_audit_reviews, class: 'tight' do |fr|
|
25
|
-
= card(
|
26
|
-
%p.text-muted The
|
23
|
+
= card(cpd_reviewer_label) do
|
24
|
+
%p.text-muted The #{cpd_reviewer_label} is the person reviewing a #{cpd_auditee_label.downcase}
|
27
25
|
= render('admin/cpd_audits/audit_reviewer_fields', form: fr, f: fr)
|
28
26
|
|
29
27
|
%p Send email
|
30
28
|
= email_form_fields(fr, :cpd_audit_review_opened)
|
31
29
|
|
32
|
-
= f.submit
|
30
|
+
= f.submit "Open #{cpd_audit_label}", center: true
|
@@ -33,7 +33,7 @@
|
|
33
33
|
%td
|
34
34
|
- if cpd_audit.conflicted?
|
35
35
|
= icon('x', class: 'small-1')
|
36
|
-
|
36
|
+
#{cpd_auditee_label} has indicated conflict of interest
|
37
37
|
- elsif cpd_audit.was_conflicted_resolved?
|
38
38
|
= icon('check', class: 'small-1')
|
39
39
|
Resolved
|
@@ -51,7 +51,7 @@
|
|
51
51
|
%td
|
52
52
|
- if cpd_audit.exemption_requested?
|
53
53
|
= icon('x', class: 'small-1')
|
54
|
-
|
54
|
+
#{cpd_auditee_label} has requested an exemption
|
55
55
|
- elsif cpd_audit.was_exemption_granted?
|
56
56
|
= icon('check', class: 'small-1')
|
57
57
|
Exemption Granted
|
@@ -72,7 +72,7 @@
|
|
72
72
|
%td
|
73
73
|
- if cpd_audit.extension_requested?
|
74
74
|
= icon('x', class: 'small-1')
|
75
|
-
|
75
|
+
#{cpd_auditee_label} has requested an extension
|
76
76
|
- elsif cpd_audit.was_extension_granted?
|
77
77
|
= icon('check', class: 'small-1')
|
78
78
|
Extension Granted
|
@@ -105,10 +105,9 @@
|
|
105
105
|
%p
|
106
106
|
= icon((completed ? 'check' : 'x'), class: 'small-1')
|
107
107
|
= requirement
|
108
|
-
|
109
108
|
%td
|
110
109
|
- if cpd_audit.submitted?
|
111
|
-
= link_to 'Process: Ready or Missing Info', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
110
|
+
= link_to 'Process: Ready for Review or Missing Info', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
112
111
|
|
113
112
|
- # Missing Information
|
114
113
|
%tr
|
@@ -124,7 +123,6 @@
|
|
124
123
|
- if cpd_audit.was_completed? && !cpd_audit.was_missing_info?
|
125
124
|
= icon('check', class: 'small-1')
|
126
125
|
No Missing Info
|
127
|
-
|
128
126
|
%td
|
129
127
|
|
130
128
|
%tr
|
@@ -147,8 +145,8 @@
|
|
147
145
|
Reviews Completed
|
148
146
|
|
149
147
|
%td
|
150
|
-
- if cpd_audit.was_submitted? && !cpd_audit.was_reviewed? && !cpd_audit.closed?
|
151
|
-
= link_to
|
148
|
+
- if cpd_audit.was_submitted? && !cpd_audit.was_reviewed? && !cpd_audit.closed? && cpd_audit.cpd_audit_reviews.present?
|
149
|
+
= link_to "#{cpd_audit_reviews_label}", '#' + cpd_audit_reviews_label.parameterize, 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
152
150
|
|
153
151
|
- unless cpd_audit.closed?
|
154
152
|
%tr
|
@@ -157,8 +155,7 @@
|
|
157
155
|
%td
|
158
156
|
%td
|
159
157
|
- if cpd_audit.was_reviewed?
|
160
|
-
= link_to
|
161
|
-
|
158
|
+
= link_to "Process: Close with Determination", '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
162
159
|
%tr
|
163
160
|
%td Closed
|
164
161
|
%td= cpd_audit.closed_at&.strftime('%F') || '-'
|
@@ -1,16 +1,16 @@
|
|
1
1
|
%h2 Bulk Create Audits
|
2
2
|
|
3
3
|
= effective_form_with(model: [:admin, cpd_bulk_audit], engine: true, url: effective_cpd.admin_cpd_bulk_audits_path) do |f|
|
4
|
-
= f.number_field :audits, label:
|
4
|
+
= f.number_field :audits, label: "How many #{cpd_audits_label} to create", placeholder: 100
|
5
5
|
= f.number_field :audit_reviewers_per_audit, label: 'How many reviewers should be assigned to each audit', placeholder: 1
|
6
6
|
|
7
7
|
= f.hidden_field :cpd_audit_level_type, value: EffectiveCpd.CpdAuditLevel.name
|
8
|
-
= f.select :cpd_audit_level_id, EffectiveCpd.CpdAuditLevel.new_cpd_audit_level_collection, label:
|
8
|
+
= f.select :cpd_audit_level_id, EffectiveCpd.CpdAuditLevel.new_cpd_audit_level_collection, label: cpd_audit_label
|
9
9
|
|
10
10
|
= f.date_field :notification_date, label: 'Date of notification', required: false, placeholder: Time.zone.now.strftime('%F'),
|
11
11
|
hint: "the starting date for any deadline calculations. leave blank for today's date"
|
12
12
|
|
13
|
-
%h3 Eligible
|
13
|
+
%h3 Eligible #{cpd_auditee_label}
|
14
14
|
- datatable = EffectiveResources.best('Admin::EffectiveCpdBulkAuditAuditeesDatatable').new(self)
|
15
15
|
- raise('expected an auditees datatable') unless datatable.present?
|
16
16
|
|
@@ -18,12 +18,12 @@
|
|
18
18
|
= collapse('Show auditees...', card_class: '') do
|
19
19
|
= render_datatable(datatable)
|
20
20
|
|
21
|
-
%h3 Eligible
|
21
|
+
%h3 Eligible Reviewers
|
22
22
|
- datatable = EffectiveResources.best('Admin::EffectiveCpdBulkAuditAuditReviewersDatatable').new(self)
|
23
23
|
- raise('expected an auditees datatable') unless datatable.present?
|
24
24
|
|
25
|
-
%p The following #{pluralize(datatable.collection.count,
|
26
|
-
= collapse(
|
25
|
+
%p The following #{pluralize(datatable.collection.count, cpd_reviewers_label)} may be selected to review #{cpd_audits_label}:
|
26
|
+
= collapse("Show audit reviewers...", card_class: '') do
|
27
27
|
= render_datatable(datatable)
|
28
28
|
|
29
29
|
%h3 Email to send
|
@@ -10,7 +10,7 @@
|
|
10
10
|
%h2 Activities
|
11
11
|
%p
|
12
12
|
After adding an activity here, please visit any existing
|
13
|
-
= link_to(cpd_cycle_label
|
13
|
+
= link_to(cpd_cycle_label + ' Settings', effective_cpd.admin_cpd_cycles_path)
|
14
14
|
pages and build a rule before it will be displayed.
|
15
15
|
|
16
16
|
- datatable = Admin::EffectiveCpdActivitiesDatatable.new(cpd_category_id: cpd_category.id)
|
@@ -18,4 +18,4 @@
|
|
18
18
|
|
19
19
|
- if cpd_category.persisted? && cpd_category.respond_to?(:log_changes_datatable)
|
20
20
|
= tab 'Logs' do
|
21
|
-
= render_inline_datatable(cpd_category.
|
21
|
+
= render_inline_datatable(cpd_category.logs_datatable)
|
@@ -1,15 +1,15 @@
|
|
1
1
|
= effective_form_with(model: [:admin, cpd_cycle], engine: true) do |f|
|
2
2
|
= f.text_field :title,
|
3
|
-
hint: "The title of this #{cpd_cycle_label}. Something like #{Time.zone.now.year}
|
3
|
+
hint: "The title of this #{cpd_cycle_label}. Something like #{Time.zone.now.year} #{cpd_name_label}"
|
4
4
|
|
5
5
|
= f.date_field :start_at,
|
6
|
-
hint: "The first date
|
6
|
+
hint: "The first date a #{cpd_statement_label} may be submited for this #{cpd_cycle_label}"
|
7
7
|
|
8
8
|
= f.date_field :end_at, date_linked: false,
|
9
|
-
hint: "The last date
|
9
|
+
hint: "The last date a #{cpd_statement_label} may be created for this #{cpd_cycle_label}. leave blank for no end date."
|
10
10
|
|
11
11
|
= f.number_field :required_score,
|
12
|
-
hint: "The minimum required #{cpd_credits_label} to submit
|
12
|
+
hint: "The minimum required #{cpd_credits_label} to submit a #{cpd_statement_label} for this #{cpd_cycle_label}. leave blank to submit any amount."
|
13
13
|
|
14
14
|
- if f.object.new_record?
|
15
15
|
- latest_cycle = Effective::CpdCycle.latest_cycle
|
@@ -18,7 +18,7 @@
|
|
18
18
|
= f.static_field :continue_from, value: latest_cycle,
|
19
19
|
hint: "The next #{cpd_cycle_label} will be carried forward from last one. Please make sure this #{cpd_cycle_label} is the most recent one."
|
20
20
|
|
21
|
-
= f.submit("Save and Create Next #{cpd_cycle_label
|
21
|
+
= f.submit("Save and Create Next #{cpd_cycle_label}")
|
22
22
|
|
23
23
|
- if f.object.persisted?
|
24
24
|
= f.submit
|
@@ -2,12 +2,12 @@
|
|
2
2
|
- if inline_datatable?
|
3
3
|
= f.hidden_field :cpd_cycle_id
|
4
4
|
- else
|
5
|
-
= f.select :cpd_cycle_id, Effective::CpdCycle.sorted.all, label: cpd_cycle_label
|
5
|
+
= f.select :cpd_cycle_id, Effective::CpdCycle.sorted.all, label: cpd_cycle_label
|
6
6
|
|
7
7
|
= f.select :category, Effective::CpdSpecialRule::CATEGORIES
|
8
8
|
|
9
9
|
= f.show_if :category, 'cumulative max credits' do
|
10
|
-
= f.number_field :max_credits_per_cycle, label: "Cumulative max
|
10
|
+
= f.number_field :max_credits_per_cycle, label: "Cumulative max #{cpd_credits_label} per #{cpd_cycle_label}",
|
11
11
|
hint: "The cumulative max #{cpd_credits_label} per #{cpd_cycle_label} that can be earned between the following categories."
|
12
12
|
|
13
13
|
- cpd_category_rules = cpd_special_rule.cpd_cycle.cpd_rules.select(&:category?)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= tabs do
|
2
|
-
= tab
|
2
|
+
= tab(cpd_statement) do
|
3
3
|
= render('effective/cpd_statements/cpd_statement', cpd_statement: cpd_statement)
|
4
4
|
|
5
5
|
- if cpd_statement.persisted? && cpd_statement.respond_to?(:log_changes_datatable)
|
6
6
|
= tab 'Logs' do
|
7
|
-
= render_inline_datatable(cpd_statement.
|
7
|
+
= render_inline_datatable(cpd_statement.logs_datatable)
|