effective_cpd 0.6.8 → 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 +7 -1
- data/app/controllers/admin/cpd_audit_reviews_controller.rb +7 -1
- data/app/controllers/admin/cpd_audits_controller.rb +21 -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_levels_datatable.rb +1 -1
- data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +4 -2
- data/app/datatables/admin/effective_cpd_audits_datatable.rb +12 -10
- 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 +594 -0
- data/app/models/concerns/effective_cpd_audit_level.rb +111 -0
- data/app/models/concerns/effective_cpd_audit_review.rb +297 -0
- data/app/models/concerns/effective_cpd_user.rb +16 -11
- data/app/models/effective/cpd_audit.rb +1 -397
- data/app/models/effective/cpd_audit_level.rb +1 -83
- 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 +4 -2
- data/app/models/effective/cpd_audit_review.rb +1 -224
- 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 +5 -2
- data/db/migrate/01_create_effective_cpd.rb.erb +36 -7
- data/lib/effective_cpd/engine.rb +4 -0
- data/lib/effective_cpd/version.rb +1 -1
- data/lib/effective_cpd.rb +13 -1
- metadata +19 -5
- data/app/views/effective/cpd_audit_reviews/complete.html.haml +0 -20
@@ -120,6 +120,11 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
120
120
|
|
121
121
|
create_table <%= @cpd_audit_levels_table_name %> do |t|
|
122
122
|
t.string :title
|
123
|
+
|
124
|
+
t.boolean :anonymous, default: false
|
125
|
+
t.string :anonymous_audits_prefix
|
126
|
+
t.string :anonymous_audit_reviews_prefix
|
127
|
+
|
123
128
|
t.text :determinations
|
124
129
|
t.text :recommendations
|
125
130
|
|
@@ -138,9 +143,11 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
138
143
|
end
|
139
144
|
|
140
145
|
create_table <%= @cpd_audit_level_sections_table_name %> do |t|
|
141
|
-
t.
|
146
|
+
t.integer :cpd_audit_level_id
|
147
|
+
t.string :cpd_audit_level_type
|
142
148
|
|
143
149
|
t.string :title
|
150
|
+
t.boolean :skip_review, default: false
|
144
151
|
t.integer :position
|
145
152
|
|
146
153
|
t.datetime :updated_at
|
@@ -148,7 +155,9 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
148
155
|
end
|
149
156
|
|
150
157
|
create_table <%= @cpd_audit_level_questions_table_name %> do |t|
|
151
|
-
t.
|
158
|
+
t.integer :cpd_audit_level_id
|
159
|
+
t.string :cpd_audit_level_type
|
160
|
+
|
152
161
|
t.references :cpd_audit_level_section
|
153
162
|
|
154
163
|
t.text :title
|
@@ -172,13 +181,22 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
172
181
|
end
|
173
182
|
|
174
183
|
create_table <%= @cpd_audits_table_name %> do |t|
|
175
|
-
t.
|
184
|
+
t.integer :cpd_audit_level_id
|
185
|
+
t.string :cpd_audit_level_type
|
176
186
|
|
177
187
|
t.integer :user_id
|
178
188
|
t.string :user_type
|
179
189
|
|
180
190
|
t.date :due_date
|
181
191
|
|
192
|
+
t.string :anonymous_name
|
193
|
+
t.integer :anonymous_number
|
194
|
+
|
195
|
+
t.text :notes
|
196
|
+
|
197
|
+
t.datetime :missing_info_at
|
198
|
+
t.text :missing_info_reason
|
199
|
+
|
182
200
|
t.date :notification_date
|
183
201
|
t.date :extension_date
|
184
202
|
|
@@ -198,6 +216,7 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
198
216
|
|
199
217
|
t.datetime :started_at
|
200
218
|
t.datetime :submitted_at
|
219
|
+
t.datetime :completed_at
|
201
220
|
t.datetime :reviewed_at
|
202
221
|
t.datetime :closed_at
|
203
222
|
|
@@ -213,15 +232,22 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
213
232
|
end
|
214
233
|
|
215
234
|
create_table <%= @cpd_audit_reviews_table_name %> do |t|
|
216
|
-
t.
|
217
|
-
t.
|
235
|
+
t.integer :cpd_audit_level_id
|
236
|
+
t.string :cpd_audit_level_type
|
237
|
+
|
238
|
+
t.integer :cpd_audit_id
|
239
|
+
t.string :cpd_audit_type
|
218
240
|
|
219
241
|
t.integer :user_id
|
220
242
|
t.string :user_type
|
221
243
|
|
222
244
|
t.date :due_date
|
223
245
|
|
246
|
+
t.string :anonymous_name
|
247
|
+
t.integer :anonymous_number
|
248
|
+
|
224
249
|
t.text :comments
|
250
|
+
t.text :feedback
|
225
251
|
t.string :recommendation
|
226
252
|
|
227
253
|
t.boolean :conflict_of_interest
|
@@ -241,7 +267,8 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
241
267
|
end
|
242
268
|
|
243
269
|
create_table <%= @cpd_audit_review_items_table_name %> do |t|
|
244
|
-
t.
|
270
|
+
t.integer :cpd_audit_review_id
|
271
|
+
t.string :cpd_audit_review_type
|
245
272
|
|
246
273
|
t.integer :item_id
|
247
274
|
t.string :item_type
|
@@ -254,7 +281,9 @@ class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
|
254
281
|
end
|
255
282
|
|
256
283
|
create_table <%= @cpd_audit_responses_table_name %> do |t|
|
257
|
-
t.
|
284
|
+
t.integer :cpd_audit_id
|
285
|
+
t.string :cpd_audit_type
|
286
|
+
|
258
287
|
t.references :cpd_audit_level_question
|
259
288
|
t.references :cpd_audit_level_section
|
260
289
|
|
data/lib/effective_cpd/engine.rb
CHANGED
@@ -11,7 +11,11 @@ module EffectiveCpd
|
|
11
11
|
initializer 'effective_cpd.active_record' do |app|
|
12
12
|
ActiveSupport.on_load :active_record do
|
13
13
|
ActiveRecord::Base.extend(EffectiveCpdUser::Base)
|
14
|
+
#ActiveRecord::Base.extend(EffectiveCpdCycle::Base)
|
14
15
|
ActiveRecord::Base.extend(EffectiveCpdStatement::Base)
|
16
|
+
ActiveRecord::Base.extend(EffectiveCpdAudit::Base)
|
17
|
+
ActiveRecord::Base.extend(EffectiveCpdAuditLevel::Base)
|
18
|
+
ActiveRecord::Base.extend(EffectiveCpdAuditReview::Base)
|
15
19
|
end
|
16
20
|
end
|
17
21
|
|
data/lib/effective_cpd.rb
CHANGED
@@ -16,7 +16,7 @@ module EffectiveCpd
|
|
16
16
|
:cpd_audit_reviews_table_name, :cpd_audit_review_items_table_name,
|
17
17
|
:program_label, :cycle_label, :credit_label, :layout, :auditee_user_scope, :audit_reviewer_user_scope,
|
18
18
|
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject, :use_effective_email_templates,
|
19
|
-
:cpd_statement_class_name
|
19
|
+
:cpd_statement_class_name, :cpd_audit_class_name, :cpd_audit_level_class_name, :cpd_audit_review_class_name
|
20
20
|
]
|
21
21
|
end
|
22
22
|
|
@@ -30,4 +30,16 @@ module EffectiveCpd
|
|
30
30
|
cpd_statement_class_name&.constantize || Effective::CpdStatement
|
31
31
|
end
|
32
32
|
|
33
|
+
def self.CpdAudit
|
34
|
+
cpd_audit_class_name&.constantize || Effective::CpdAudit
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.CpdAuditLevel
|
38
|
+
cpd_audit_level_class_name&.constantize || Effective::CpdAuditLevel
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.CpdAuditReview
|
42
|
+
cpd_audit_review_class_name&.constantize || Effective::CpdAuditReview
|
43
|
+
end
|
44
|
+
|
33
45
|
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:
|
4
|
+
version: 1.1.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-
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -216,6 +216,9 @@ files:
|
|
216
216
|
- app/helpers/effective_cpd_audits_helper.rb
|
217
217
|
- app/helpers/effective_cpd_helper.rb
|
218
218
|
- app/mailers/effective/cpd_mailer.rb
|
219
|
+
- app/models/concerns/effective_cpd_audit.rb
|
220
|
+
- app/models/concerns/effective_cpd_audit_level.rb
|
221
|
+
- app/models/concerns/effective_cpd_audit_review.rb
|
219
222
|
- app/models/concerns/effective_cpd_statement.rb
|
220
223
|
- app/models/concerns/effective_cpd_user.rb
|
221
224
|
- app/models/effective/cpd_activity.rb
|
@@ -248,12 +251,17 @@ files:
|
|
248
251
|
- app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml
|
249
252
|
- app/views/admin/cpd_audits/_auditee_fields.html.haml
|
250
253
|
- app/views/admin/cpd_audits/_form.html.haml
|
254
|
+
- app/views/admin/cpd_audits/_form_close.html.haml
|
255
|
+
- app/views/admin/cpd_audits/_form_complete.html.haml
|
251
256
|
- app/views/admin/cpd_audits/_form_conflict.html.haml
|
257
|
+
- app/views/admin/cpd_audits/_form_cpd_audit.html.haml
|
252
258
|
- app/views/admin/cpd_audits/_form_deadlines.html.haml
|
253
|
-
- app/views/admin/cpd_audits/_form_determination.html.haml
|
254
259
|
- app/views/admin/cpd_audits/_form_exemption.html.haml
|
255
260
|
- app/views/admin/cpd_audits/_form_extension.html.haml
|
261
|
+
- app/views/admin/cpd_audits/_form_files.html.haml
|
262
|
+
- app/views/admin/cpd_audits/_form_missing_info.html.haml
|
256
263
|
- app/views/admin/cpd_audits/_form_new.html.haml
|
264
|
+
- app/views/admin/cpd_audits/_form_process.html.haml
|
257
265
|
- app/views/admin/cpd_audits/_status.html.haml
|
258
266
|
- app/views/admin/cpd_categories/_form.html.haml
|
259
267
|
- app/views/admin/cpd_categories/_form_cpd_category.html.haml
|
@@ -301,13 +309,16 @@ files:
|
|
301
309
|
- app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml
|
302
310
|
- app/views/effective/cpd_audit_reviews/_cpd_audit_review.html.haml
|
303
311
|
- app/views/effective/cpd_audit_reviews/_cpd_statement.html.haml
|
312
|
+
- app/views/effective/cpd_audit_reviews/_feedback.html.haml
|
313
|
+
- app/views/effective/cpd_audit_reviews/_files.html.haml
|
304
314
|
- app/views/effective/cpd_audit_reviews/_layout.html.haml
|
305
315
|
- app/views/effective/cpd_audit_reviews/_recommendation.html.haml
|
306
316
|
- app/views/effective/cpd_audit_reviews/_summary.html.haml
|
307
|
-
- app/views/effective/cpd_audit_reviews/complete.html.haml
|
308
317
|
- app/views/effective/cpd_audit_reviews/conflict.html.haml
|
309
318
|
- app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
|
310
319
|
- app/views/effective/cpd_audit_reviews/cpd_statement.html.haml
|
320
|
+
- app/views/effective/cpd_audit_reviews/feedback.html.haml
|
321
|
+
- app/views/effective/cpd_audit_reviews/files.html.haml
|
311
322
|
- app/views/effective/cpd_audit_reviews/information.html.haml
|
312
323
|
- app/views/effective/cpd_audit_reviews/instructions.html.haml
|
313
324
|
- app/views/effective/cpd_audit_reviews/questionnaire.html.haml
|
@@ -315,6 +326,7 @@ files:
|
|
315
326
|
- app/views/effective/cpd_audit_reviews/start.html.haml
|
316
327
|
- app/views/effective/cpd_audit_reviews/statements.html.haml
|
317
328
|
- app/views/effective/cpd_audit_reviews/submit.html.haml
|
329
|
+
- app/views/effective/cpd_audit_reviews/submitted.html.haml
|
318
330
|
- app/views/effective/cpd_audit_reviews/waiting.html.haml
|
319
331
|
- app/views/effective/cpd_audits/_conflict.html.haml
|
320
332
|
- app/views/effective/cpd_audits/_cpd.html.haml
|
@@ -324,9 +336,9 @@ files:
|
|
324
336
|
- app/views/effective/cpd_audits/_extension.html.haml
|
325
337
|
- app/views/effective/cpd_audits/_files.html.haml
|
326
338
|
- app/views/effective/cpd_audits/_layout.html.haml
|
339
|
+
- app/views/effective/cpd_audits/_missing_info.html.haml
|
327
340
|
- app/views/effective/cpd_audits/_summary.html.haml
|
328
341
|
- app/views/effective/cpd_audits/_waiting.html.haml
|
329
|
-
- app/views/effective/cpd_audits/complete.html.haml
|
330
342
|
- app/views/effective/cpd_audits/conflict.html.haml
|
331
343
|
- app/views/effective/cpd_audits/cpd.html.haml
|
332
344
|
- app/views/effective/cpd_audits/cpd_audit_level_section.html.haml
|
@@ -338,6 +350,7 @@ files:
|
|
338
350
|
- app/views/effective/cpd_audits/questionnaire.html.haml
|
339
351
|
- app/views/effective/cpd_audits/start.html.haml
|
340
352
|
- app/views/effective/cpd_audits/submit.html.haml
|
353
|
+
- app/views/effective/cpd_audits/submitted.haml
|
341
354
|
- app/views/effective/cpd_audits/waiting.html.haml
|
342
355
|
- app/views/effective/cpd_mailer/README.md
|
343
356
|
- app/views/effective/cpd_mailer/cpd_audit_closed.liquid
|
@@ -349,6 +362,7 @@ files:
|
|
349
362
|
- app/views/effective/cpd_mailer/cpd_audit_extension_denied.liquid
|
350
363
|
- app/views/effective/cpd_mailer/cpd_audit_extension_granted.liquid
|
351
364
|
- app/views/effective/cpd_mailer/cpd_audit_extension_request.liquid
|
365
|
+
- app/views/effective/cpd_mailer/cpd_audit_missing_info.liquid
|
352
366
|
- app/views/effective/cpd_mailer/cpd_audit_opened.liquid
|
353
367
|
- app/views/effective/cpd_mailer/cpd_audit_review_opened.liquid
|
354
368
|
- app/views/effective/cpd_mailer/cpd_audit_review_ready.liquid
|
@@ -1,20 +0,0 @@
|
|
1
|
-
= render('layout') do
|
2
|
-
- raise('expected a completed cpd_audit_review') unless resource.completed?
|
3
|
-
|
4
|
-
.text-center
|
5
|
-
.row
|
6
|
-
.col-2
|
7
|
-
.col-8
|
8
|
-
.alert.alert-success Audit Review Submitted!
|
9
|
-
|
10
|
-
%p
|
11
|
-
The following audit review was successfully submitted at
|
12
|
-
= succeed('.') do
|
13
|
-
= resource.submitted_at.strftime('%F')
|
14
|
-
|
15
|
-
%p Thank you for your review.
|
16
|
-
|
17
|
-
.mb-4= render(resource)
|
18
|
-
|
19
|
-
%br
|
20
|
-
.text-center= link_to 'Home', root_path, class: 'btn btn-primary'
|