effective_cpd 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f8ab2919547d6a9f2385feb05cd00366bfdf1d4bc8749be2714f2d789249164
|
4
|
+
data.tar.gz: 02f0a5a137070f384f19a604b1ff7df6af74e2c420c589306072c5e02a289969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb6eb4fea328ded00578d5c16d1e4ed9d46f1560a28c5af53d9fdd3a7ad8675bfe3deb9a8266b0de2a13f37109f22f2fc814850985bf2abaac39070e5b3c592
|
7
|
+
data.tar.gz: fd01df0b6f085280c1fc4c8065ba321de5644f765655de4bb0d11b5927c8caf81117a4d1ca50d87338ba0e075669c68a068b23374152ede1536afab78231ddee
|
@@ -187,10 +187,6 @@ module Effective
|
|
187
187
|
|
188
188
|
steps << :conflict if cpd_audit_level.conflict_of_interest?
|
189
189
|
|
190
|
-
if conflicted?
|
191
|
-
return steps + [:waiting, :submit, :complete]
|
192
|
-
end
|
193
|
-
|
194
190
|
steps << :exemption if cpd_audit_level.can_request_exemption?
|
195
191
|
|
196
192
|
unless exemption_requested?
|
@@ -238,20 +234,13 @@ module Effective
|
|
238
234
|
started!
|
239
235
|
end
|
240
236
|
|
241
|
-
# Auditee wizard action
|
242
|
-
def conflict!
|
243
|
-
return started! unless conflict_of_interest?
|
244
|
-
|
245
|
-
update!(status: :conflicted)
|
246
|
-
send_email(:cpd_audit_conflicted)
|
247
|
-
end
|
248
|
-
|
249
237
|
# Admin action
|
250
238
|
def resolve_conflict!
|
251
239
|
wizard_steps[:conflict] = nil # Have them complete the conflict step again.
|
252
240
|
|
253
241
|
assign_attributes(conflict_of_interest: false, conflict_of_interest_reason: nil)
|
254
242
|
conflicted_resolved!
|
243
|
+
submitted!
|
255
244
|
|
256
245
|
send_email(:cpd_audit_conflict_resolved)
|
257
246
|
true
|
@@ -340,9 +329,17 @@ module Effective
|
|
340
329
|
|
341
330
|
# Auditee wizard action
|
342
331
|
def submit!
|
343
|
-
|
344
|
-
|
345
|
-
|
332
|
+
if conflict_of_interest?
|
333
|
+
conflicted!
|
334
|
+
send_email(:cpd_audit_conflicted)
|
335
|
+
else
|
336
|
+
submitted!
|
337
|
+
|
338
|
+
cpd_audit_reviews.each { |cpd_audit_review| cpd_audit_review.ready! }
|
339
|
+
send_email(:cpd_audit_submitted)
|
340
|
+
end
|
341
|
+
|
342
|
+
true
|
346
343
|
end
|
347
344
|
|
348
345
|
# Called in a before_save. Intended for applicant_review to call in its submit! method
|
@@ -1,5 +1,5 @@
|
|
1
1
|
= render('layout') do
|
2
|
-
- raise('expected a submitted cpd_audit') unless resource.was_submitted? || resource.closed?
|
2
|
+
- raise('expected a submitted or conflicted cpd_audit') unless (resource.was_submitted? || resource.was_conflicted? || resource.closed?)
|
3
3
|
|
4
4
|
- if resource.was_submitted?
|
5
5
|
.text-center
|