effective_cpd 1.3.2 → 1.3.4

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: f48ddbc343a72c9aed794d24fce44b55a442013b7b996b969a835c2ea5d06ec8
4
- data.tar.gz: a14a041ae7599c41c078af7682638a9ce1ed3f699bcd4fdd98c33e0e27ca149b
3
+ metadata.gz: 2be9f6813dafd2931948881251226b7ed3b620a0b878b873f7e8c268c4f908bb
4
+ data.tar.gz: 9508a3ed45b0057b2a448ed67de9720a26a86ae22f964c1640ed411f6c903fb7
5
5
  SHA512:
6
- metadata.gz: 67311414ec5f3297abaa98661def506e5b3129073d9c83178d336c6f71efe8413a81ffa66ead01be10849ce023d4638ab59a774609863fd2bcb327f221ecfec0
7
- data.tar.gz: 8053f1984a8846847d4a7f4f6e59f93b22ab8e4e8179004119108320fae692d7b4ab10b133f6228a08ad4a98fcae141cdd2d5ca9997a85fdac8d048bc4a41eca
6
+ metadata.gz: 81fd014d7d29224b1dfd22ac694e98e3be2b45537b80094259cc42cfb7b5f8cb2446a70f42aed2d68cac5557dae9b253c144ec398993570759b7c9578d2cbe7d
7
+ data.tar.gz: f81cf81ceec74d6508b80bbc1d6fd983526e8173e7306cb1c7c0e8dd3544ed3a504bb5e920632eeccce49cfc24302d504fbe5db7b44d4b6f7500e750082546c2
@@ -27,6 +27,8 @@ module Effective
27
27
  before_action(only: [:show, :update]) do
28
28
  cycle = resource.cpd_cycle
29
29
 
30
+ cpd_cycle_label = EffectiveResources.et(Effective::CpdCycle)
31
+
30
32
  unless cycle.available?
31
33
  flash[:danger] = begin
32
34
  if cycle.ended?
@@ -105,8 +105,8 @@ module EffectiveCpdBulkAudit
105
105
  def create_audits!
106
106
  save!
107
107
 
108
- @auditees = cpd_auditees.order('RANDOM()').limit(audits)
109
- @reviewers = cpd_audit_reviewers.order('RANDOM()').limit(audits).to_a
108
+ @auditees = cpd_auditees.reorder('RANDOM()').limit(audits)
109
+ @reviewers = cpd_audit_reviewers.reorder('RANDOM()').limit(audits).to_a
110
110
 
111
111
  @auditees.each do |auditee|
112
112
  reviewers = audit_reviewers_per_audit.times.map { next_audit_reviewer() }
@@ -24,6 +24,7 @@ module EffectiveCpdUser
24
24
  has_many :cpd_audits, -> { order(:id) }, inverse_of: :user
25
25
  has_many :cpd_audit_reviews, -> { order(:id) }, inverse_of: :user
26
26
 
27
+ # These two should not be sorted
27
28
  scope :cpd_audit_auditees, -> { without_role(:cpd_audit_reviewer).without_role(:admin) }
28
29
  scope :cpd_audit_reviewers, -> { with_role(:cpd_audit_reviewer) }
29
30
 
@@ -0,0 +1,12 @@
1
+ .row
2
+ .col-md-4
3
+ .col-md-4
4
+ = card('All Done') do
5
+ .alert.alert-success.mb-4 Congratulations! All done!
6
+
7
+ %p All selected #{cpd_audits_label} are now being opened.
8
+
9
+ %p.text-center
10
+ = link_to(cpd_audits_label, effective_cpd.admin_cpd_audits_path, class: 'btn btn-primary')
11
+
12
+ .col-md-4
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.4'
3
3
  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.3.2
4
+ version: 1.3.4
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-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -316,6 +316,7 @@ files:
316
316
  - app/views/admin/cpd_audits/_status.html.haml
317
317
  - app/views/admin/cpd_bulk_audits/_form.html.haml
318
318
  - app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml
319
+ - app/views/admin/cpd_bulk_audits/create.html.haml
319
320
  - app/views/admin/cpd_categories/_form.html.haml
320
321
  - app/views/admin/cpd_categories/_form_cpd_category.html.haml
321
322
  - app/views/admin/cpd_cycles/_form.html.haml