effective_cpd 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/controllers/admin/cpd_audits_controller.rb +4 -4
  4. data/app/controllers/admin/cpd_statement_activities_controller.rb +3 -5
  5. data/app/controllers/admin/cpd_statements_controller.rb +0 -2
  6. data/app/controllers/effective/cpd_audits_controller.rb +1 -1
  7. data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +6 -6
  8. data/app/datatables/admin/effective_cpd_audits_datatable.rb +10 -10
  9. data/app/datatables/admin/effective_cpd_bulk_audits_datatable.rb +3 -4
  10. data/app/datatables/admin/effective_cpd_rules_datatable.rb +4 -4
  11. data/app/datatables/admin/effective_cpd_special_rules_datatable.rb +2 -2
  12. data/app/datatables/admin/effective_cpd_statement_activities_datatable.rb +3 -3
  13. data/app/datatables/admin/effective_cpd_statements_datatable.rb +1 -1
  14. data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +2 -2
  15. data/app/datatables/effective_cpd_available_audits_datatable.rb +1 -1
  16. data/app/datatables/effective_cpd_available_cycles_datatable.rb +1 -1
  17. data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +3 -3
  18. data/app/datatables/effective_cpd_completed_audits_datatable.rb +2 -2
  19. data/app/datatables/effective_cpd_completed_statements_datatable.rb +3 -3
  20. data/app/helpers/effective_cpd_audits_helper.rb +1 -2
  21. data/app/helpers/effective_cpd_helper.rb +58 -6
  22. data/app/models/concerns/effective_cpd_audit.rb +27 -19
  23. data/app/models/concerns/effective_cpd_audit_level.rb +1 -1
  24. data/app/models/concerns/effective_cpd_audit_review.rb +1 -1
  25. data/app/models/concerns/effective_cpd_bulk_audit.rb +1 -1
  26. data/app/models/concerns/effective_cpd_statement.rb +1 -1
  27. data/app/models/effective/cpd_activity.rb +1 -1
  28. data/app/models/effective/cpd_audit_level_question.rb +1 -1
  29. data/app/models/effective/cpd_audit_level_question_option.rb +1 -1
  30. data/app/models/effective/cpd_audit_level_section.rb +1 -1
  31. data/app/models/effective/cpd_audit_response.rb +1 -1
  32. data/app/models/effective/cpd_audit_review_item.rb +1 -1
  33. data/app/models/effective/cpd_category.rb +1 -1
  34. data/app/models/effective/cpd_cycle.rb +1 -1
  35. data/app/models/effective/cpd_special_rule.rb +1 -1
  36. data/app/models/effective/cpd_statement_activity.rb +1 -1
  37. data/app/views/admin/cpd_activities/_form.html.haml +1 -1
  38. data/app/views/admin/cpd_audit_level_questions/_form.html.haml +1 -1
  39. data/app/views/admin/cpd_audit_levels/_form.html.haml +4 -4
  40. data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +1 -1
  41. data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +1 -1
  42. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +25 -18
  43. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +1 -1
  44. data/app/views/admin/cpd_audit_reviews/_form.html.haml +2 -2
  45. data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +1 -1
  46. data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -2
  47. data/app/views/admin/cpd_audits/_form_chat.html.haml +2 -2
  48. data/app/views/admin/cpd_audits/_form_close.html.haml +2 -2
  49. data/app/views/admin/cpd_audits/_form_complete.html.haml +4 -4
  50. data/app/views/admin/cpd_audits/_form_conflict.html.haml +5 -5
  51. data/app/views/admin/cpd_audits/_form_cpd_audit.html.haml +6 -6
  52. data/app/views/admin/cpd_audits/_form_deadlines.html.haml +2 -2
  53. data/app/views/admin/cpd_audits/_form_exemption.html.haml +2 -2
  54. data/app/views/admin/cpd_audits/_form_extension.html.haml +2 -2
  55. data/app/views/admin/cpd_audits/_form_files.html.haml +1 -1
  56. data/app/views/admin/cpd_audits/_form_missing_info.html.haml +1 -1
  57. data/app/views/admin/cpd_audits/_form_new.html.haml +10 -12
  58. data/app/views/admin/cpd_audits/_form_process.html.haml +1 -1
  59. data/app/views/admin/cpd_audits/_status.html.haml +7 -10
  60. data/app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml +6 -6
  61. data/app/views/admin/cpd_categories/_form.html.haml +2 -2
  62. data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +5 -5
  63. data/app/views/admin/cpd_special_rules/_form.html.haml +2 -2
  64. data/app/views/admin/cpd_statements/_cpd_statement.html.haml +2 -2
  65. data/app/views/admin/users/_form_cpd.html.haml +2 -2
  66. data/app/views/admin/users/_form_cpd_audits.html.haml +4 -4
  67. data/app/views/effective/cpd/_dashboard.html.haml +10 -10
  68. data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +1 -1
  69. data/app/views/effective/cpd_audit_reviews/_summary.html.haml +3 -3
  70. data/app/views/effective/cpd_audit_reviews/conflict.html.haml +1 -1
  71. data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +1 -1
  72. data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +1 -1
  73. data/app/views/effective/cpd_audit_reviews/feedback.html.haml +3 -3
  74. data/app/views/effective/cpd_audit_reviews/files.html.haml +2 -2
  75. data/app/views/effective/cpd_audit_reviews/instructions.html.haml +1 -1
  76. data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +1 -1
  77. data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +3 -3
  78. data/app/views/effective/cpd_audit_reviews/start.html.haml +4 -4
  79. data/app/views/effective/cpd_audit_reviews/statements.html.haml +6 -6
  80. data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
  81. data/app/views/effective/cpd_audit_reviews/submitted.html.haml +3 -3
  82. data/app/views/effective/cpd_audit_reviews/waiting.html.haml +1 -1
  83. data/app/views/effective/cpd_audits/_missing_info.html.haml +3 -3
  84. data/app/views/effective/cpd_audits/_summary.html.haml +2 -2
  85. data/app/views/effective/cpd_audits/conflict.html.haml +2 -2
  86. data/app/views/effective/cpd_audits/start.html.haml +2 -2
  87. data/app/views/effective/cpd_audits/submit.html.haml +3 -3
  88. data/app/views/effective/cpd_audits/submitted.haml +4 -4
  89. data/app/views/effective/cpd_audits/waiting.html.haml +1 -1
  90. data/app/views/effective/cpd_statements/_activities_new.html.haml +1 -1
  91. data/app/views/effective/cpd_statements/_activities_table.html.haml +2 -2
  92. data/app/views/effective/cpd_statements/_summary.html.haml +1 -1
  93. data/app/views/effective/cpd_statements/agreements.html.haml +1 -1
  94. data/app/views/effective/cpd_statements/submit.html.haml +1 -1
  95. data/config/effective_cpd.rb +0 -5
  96. data/config/locales/effective_cpd.en.yml +28 -0
  97. data/config/routes.rb +1 -1
  98. data/lib/effective_cpd/version.rb +1 -1
  99. data/lib/effective_cpd.rb +1 -1
  100. data/lib/generators/effective_cpd/install_generator.rb +4 -0
  101. data/lib/tasks/effective_cpd_tasks.rake +23 -1
  102. metadata +3 -2
@@ -1,6 +1,28 @@
1
- # bundle exec rake effective_cpd:seed
2
1
  namespace :effective_cpd do
2
+
3
+ # bundle exec rake effective_cpd:seed
3
4
  task seed: :environment do
4
5
  load "#{__dir__}/../../db/seeds.rb"
5
6
  end
7
+
8
+ # bundle exec rake effective_cpd:notify_auditees
9
+ desc 'Send cpd_audit_opened email notifications for effective cpd'
10
+ task notify_auditees: :environment do
11
+ audits = EffectiveCpd.CpdAudit.opened.sorted
12
+
13
+ audits.find_each do |audit|
14
+ begin
15
+ audit.notify!
16
+ puts "Sent #{audit} notification to #{audit.user.email}"
17
+ rescue => e
18
+ if defined?(ExceptionNotifier)
19
+ ExceptionNotifier.notify_exception(e, data: { audit_id: audit.id })
20
+ end
21
+
22
+ puts "Error with audit #{auditee.id}: #{e.errors.inspect}"
23
+ end
24
+ end
25
+
26
+ puts 'All done'
27
+ end
6
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_cpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-27 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -446,6 +446,7 @@ files:
446
446
  - app/views/users/_demographics.html.haml
447
447
  - app/views/users/_fields_demographics.html.haml
448
448
  - config/effective_cpd.rb
449
+ - config/locales/effective_cpd.en.yml
449
450
  - config/routes.rb
450
451
  - db/migrate/01_create_effective_cpd.rb.erb
451
452
  - db/seeds.rb