effective_cpd 1.6.4 → 1.6.5

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: 1be69d17b3b7602f4ecd79e04ba02da88c72d9cffe84b2a62a89bfb86d9e83ad
4
- data.tar.gz: 1e681360aeb11babccd620a4b50517ee76e14c8193256944e0b312da01f4d7c9
3
+ metadata.gz: cd0911046fcabd42cad5f51a9d1839bb13da67a67276d78bc4c0a3414a1d0e85
4
+ data.tar.gz: 1f16f8296435282c808e2fb1e5e4aeff7e0aa1ba40c252c478ff1dd955a930e6
5
5
  SHA512:
6
- metadata.gz: 818a42d3b8ae3d1b50b4504668a9a981456ac82a7283aa8b41de048c500e584515785fe2f823dad1767ac88ef4f95f85a195d8281618cc6bfbecd267c20a3f87
7
- data.tar.gz: 3556315481e1cba1e8510cfb324f5d9f0c53ed62d656991ad9593c07e715eac16e6d19b8bb5bd95e4483ab85e60b257b38fc9cc3c0b7e813cecb11cae979a65d
6
+ metadata.gz: 3bf52660128e824a470059d1399cc8321038a87d67bd56c101d4f57b959c9ecf58e577e0fb0d9e31abe5f3a5cb5c1c2cf88ebf134043fffd5570eeea67d7f7d9
7
+ data.tar.gz: e242876c24636b77819f64835edc02c187776532389be838658999e2cd1136a93f67d24ea7a4e8181d1346f250989647ab58208f13a77c7884f151159d68e12f
@@ -33,6 +33,7 @@ module EffectiveCpdStatement
33
33
  log_changes(except: :wizard_steps) if respond_to?(:log_changes)
34
34
 
35
35
  has_many_attached :files
36
+ has_many_purgable :files
36
37
 
37
38
  attr_accessor :current_user
38
39
  attr_accessor :current_step
@@ -3,7 +3,8 @@ module Effective
3
3
  attr_accessor :max_score
4
4
  attr_accessor :importing
5
5
 
6
- belongs_to :cpd_statement
6
+ belongs_to :cpd_statement # This works just fine without the polymorphic
7
+
7
8
  belongs_to :cpd_category
8
9
  belongs_to :cpd_activity
9
10
 
@@ -4,7 +4,7 @@
4
4
  %p
5
5
  #{cpd_targets_label} set the requirements checked when submitting a #{cpd_statement_label}
6
6
 
7
- %table.table
7
+ %table.table.table-striped.table-hover.table-sm
8
8
  %thead
9
9
  %th= cpd_cycle_label
10
10
  %th Default Requirements
@@ -29,11 +29,10 @@
29
29
  %tr
30
30
  %td= link_to(cpd_cycle, effective_cpd.edit_admin_cpd_cycle_path(cpd_cycle), target: '_blank')
31
31
  %td
32
- %p
33
- = pluralize(default_target, cpd_credit_label.downcase)
34
- = default_required_to_submit ? 'required' : 'targeted'
35
- and
36
- = collection.find { |value| value.last == default_required_to_submit }.first.downcase
32
+ = pluralize(default_target, cpd_credit_label.downcase)
33
+ = default_required_to_submit ? 'required' : 'targeted'
34
+ and
35
+ = collection.find { |value| value.last == default_required_to_submit }.first.downcase
37
36
 
38
37
  %td
39
38
  .row
@@ -0,0 +1,6 @@
1
+ %h2 Agreements
2
+ = f.check_box :confirm_read, label: "Yes, I have read the above content and agreements"
3
+ = f.check_box :confirm_factual, label: "Yes, I declare all provided information to be factual and complete"
4
+
5
+ %h2 Resume
6
+ = f.file_field :files, label: 'Attach resume', hint: "Please attach your resume or other #{cpd_name_label} related documents"
@@ -1,20 +1,3 @@
1
1
  = card('Agreements') do
2
- %table.table
3
- %tbody
4
- %tr
5
- %th Read all contents and agreements
6
- %td= cpd_statement.confirm_read ? 'Yes' : 'No'
7
-
8
- %tr
9
- %th Declared all information factual
10
- %td= cpd_statement.confirm_factual ? 'Yes' : 'No'
11
-
12
- %tr
13
- %th Attachments
14
- %td
15
- - if cpd_statement.files.blank?
16
- None
17
- - else
18
- %ul
19
- - cpd_statement.files.each do |file|
20
- = link_to(file.filename, url_for(file), target: '_blank')
2
+ = effective_table_with(cpd_statement) do |f|
3
+ = render('effective/cpd_statements/agreement_fields', f: f)
@@ -10,11 +10,6 @@
10
10
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
11
11
  = f.hidden_field :current_step
12
12
 
13
- %h2 Agreements
14
- = f.check_box :confirm_read, label: "Yes, I have read the above content and agreements"
15
- = f.check_box :confirm_factual, label: "Yes, I declare all provided information to be factual and complete"
16
-
17
- %h2 Resume
18
- = f.file_field :files, label: 'Attach resume', hint: "Please attach your resume or other #{cpd_name_label} related documents"
13
+ = render('effective/cpd_statements/agreement_fields', f: f)
19
14
 
20
15
  = f.submit 'Save and Continue', center: true
@@ -20,6 +20,7 @@ en:
20
20
  effective/cpd_statement_activity: 'CPD Statement Activity'
21
21
  effective/cpd_category: 'CPD Category'
22
22
  effective/cpd_target: 'CPD Target'
23
+ effective/cpd_rule: 'CPD Rule'
23
24
 
24
25
  attributes:
25
26
  # Application namespace
@@ -37,3 +38,6 @@ en:
37
38
  # Effective namespace
38
39
  effective/cpd_statement_activity:
39
40
  cpd_cycle: 'CPD Period'
41
+
42
+ effective/cpd_rule:
43
+ cpd_cycle: 'CPD Period'
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.6.4'
2
+ VERSION = '1.6.5'
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.6.4
4
+ version: 1.6.5
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-04-14 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -441,6 +441,7 @@ files:
441
441
  - app/views/effective/cpd_statements/_activities_edit.html.haml
442
442
  - app/views/effective/cpd_statements/_activities_new.html.haml
443
443
  - app/views/effective/cpd_statements/_activities_table.html.haml
444
+ - app/views/effective/cpd_statements/_agreement_fields.html.haml
444
445
  - app/views/effective/cpd_statements/_agreements.html.haml
445
446
  - app/views/effective/cpd_statements/_cpd_statement.html.haml
446
447
  - app/views/effective/cpd_statements/_layout.html.haml