effective_memberships 0.4.10 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/datatables/effective_applicant_endorsements_datatable.rb +1 -0
  3. data/app/datatables/effective_applicant_equivalences_datatable.rb +23 -0
  4. data/app/datatables/effective_applicant_experiences_datatable.rb +1 -0
  5. data/app/models/concerns/effective_memberships_applicant.rb +61 -10
  6. data/app/models/concerns/effective_memberships_category.rb +2 -0
  7. data/app/models/effective/applicant_endorsement.rb +1 -1
  8. data/app/models/effective/applicant_equivalence.rb +32 -0
  9. data/app/views/admin/applicants/_form.html.haml +4 -0
  10. data/app/views/admin/applicants/_form_transcripts.html.haml +12 -0
  11. data/app/views/admin/categories/_form_applicant_steps.html.haml +6 -0
  12. data/app/views/effective/applicant_endorsements/complete.html.haml +2 -3
  13. data/app/views/effective/applicant_endorsements/edit.html.haml +6 -7
  14. data/app/views/effective/applicant_references/complete.html.haml +2 -3
  15. data/app/views/effective/applicant_references/edit.html.haml +6 -7
  16. data/app/views/effective/applicants/_applicant.html.haml +2 -1
  17. data/app/views/effective/applicants/_course_amounts.html.haml +9 -17
  18. data/app/views/effective/applicants/_declarations.html.haml +9 -16
  19. data/app/views/effective/applicants/_demographics.html.haml +2 -9
  20. data/app/views/effective/applicants/_education.html.haml +6 -13
  21. data/app/views/effective/applicants/_endorsements.html.haml +6 -13
  22. data/app/views/effective/applicants/_equivalences.html.haml +3 -0
  23. data/app/views/effective/applicants/_experience.html.haml +18 -25
  24. data/app/views/effective/applicants/_files.html.haml +16 -23
  25. data/app/views/effective/applicants/_organization.html.haml +2 -9
  26. data/app/views/effective/applicants/_references.html.haml +6 -13
  27. data/app/views/effective/applicants/_stamp.html.haml +23 -30
  28. data/app/views/effective/applicants/_summary.html.haml +5 -0
  29. data/app/views/effective/applicants/_transcripts.html.haml +30 -0
  30. data/app/views/effective/applicants/_transcripts_requirements.html.haml +14 -0
  31. data/app/views/effective/applicants/billing.html.haml +6 -7
  32. data/app/views/effective/applicants/checkout.html.haml +2 -3
  33. data/app/views/effective/applicants/course_amounts.html.haml +48 -47
  34. data/app/views/effective/applicants/declarations.html.haml +10 -9
  35. data/app/views/effective/applicants/demographics.html.haml +6 -7
  36. data/app/views/effective/applicants/education.html.haml +16 -17
  37. data/app/views/effective/applicants/endorsements.html.haml +24 -16
  38. data/app/views/effective/applicants/equivalences.html.haml +24 -0
  39. data/app/views/effective/applicants/experience.html.haml +35 -36
  40. data/app/views/effective/applicants/files.html.haml +9 -8
  41. data/app/views/effective/applicants/organization.html.haml +10 -11
  42. data/app/views/effective/applicants/references.html.haml +17 -16
  43. data/app/views/effective/applicants/select.html.haml +25 -26
  44. data/app/views/effective/applicants/stamp.html.haml +16 -17
  45. data/app/views/effective/applicants/start.html.haml +4 -5
  46. data/app/views/effective/applicants/submitted.html.haml +9 -10
  47. data/app/views/effective/applicants/transcripts.html.haml +13 -0
  48. data/app/views/effective/fee_payments/_declarations.html.haml +9 -16
  49. data/app/views/effective/fee_payments/_demographics.html.haml +2 -9
  50. data/app/views/effective/fee_payments/_fee_payment.html.haml +2 -1
  51. data/app/views/effective/fee_payments/_organization.html.haml +2 -9
  52. data/app/views/effective/fee_payments/billing.html.haml +6 -7
  53. data/app/views/effective/fee_payments/checkout.html.haml +2 -3
  54. data/app/views/effective/fee_payments/declarations.html.haml +8 -9
  55. data/app/views/effective/fee_payments/demographics.html.haml +6 -7
  56. data/app/views/effective/fee_payments/organization.html.haml +10 -11
  57. data/app/views/effective/fee_payments/start.html.haml +23 -24
  58. data/app/views/effective/fee_payments/submitted.html.haml +2 -2
  59. data/db/migrate/01_create_effective_memberships.rb.erb +24 -0
  60. data/lib/effective_memberships/version.rb +1 -1
  61. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7d09ef68f61058a8ee29567caa3a008d887482edab0fa3e8d251ea69f9ea3cb
4
- data.tar.gz: 10a88e200464a6d2d7dbb8fbdcaa3aed77337b067e12fc3577b31a8032cbd2ce
3
+ metadata.gz: 013c543f704442649f57e61b6d381da7abd27a181b8cfb00eafcca8713eec4d0
4
+ data.tar.gz: 71d84f67fad2d7f5718fd6186eed8ee3877ccc32292dcd56456fe93bd73918fe
5
5
  SHA512:
6
- metadata.gz: 3adbdb1ab5f18df509ebc6631f39a142f2857213ce9ee0a23b83eec2fa44dda3d8b77c42afe7e4e4b494bb938dac7aee672cc26dacbd398fd9f34cc3c55ed222
7
- data.tar.gz: ab80c7ff8b01736429ecabc774b81c45702d21ae521e2e7db276191802fa212171f8e81e448a06e452fb97745c5aec3723fe37537669f3a3ed87b9cd30d03746
6
+ metadata.gz: f6e975206c149832fc53de2db37b08405c21b22021e1fdae0f5cbd6d619747f9288b86f38f22a943fe27e69a963af44fb9b201fa43cc3bac20d90211ea8cb557
7
+ data.tar.gz: 3ba98f86d83f2afc099d57463495aa7fa643a72af6b230156538eeebc0bb6b306bd2bae12726e651fc59b38cf1c2db353db881c6149049370d34aae189370657
@@ -2,6 +2,7 @@
2
2
  class EffectiveApplicantEndorsementsDatatable < Effective::Datatable
3
3
 
4
4
  datatable do
5
+ length :all
5
6
  order :name
6
7
 
7
8
  col :name do |endorsement|
@@ -0,0 +1,23 @@
1
+ class EffectiveApplicantEquivalencesDatatable < Effective::Datatable
2
+ datatable do
3
+ length :all
4
+ order :start_on
5
+
6
+ col :start_on
7
+
8
+ col :end_on do |applicant_equivalence|
9
+ applicant_equivalence.end_on&.strftime('%F') || '-'
10
+ end
11
+
12
+ col :name
13
+ col :notes
14
+ end
15
+
16
+ collection do
17
+ Effective::ApplicantEquivalence.deep.where(applicant: applicant)
18
+ end
19
+
20
+ def applicant
21
+ @applicant ||= EffectiveMemberships.Applicant.where(id: attributes[:applicant_id]).first!
22
+ end
23
+ end
@@ -1,6 +1,7 @@
1
1
  class EffectiveApplicantExperiencesDatatable < Effective::Datatable
2
2
  datatable do
3
3
  length :all
4
+
4
5
  order :start_on
5
6
 
6
7
  col :start_on
@@ -24,6 +24,11 @@ module EffectiveMembershipsApplicant
24
24
  def categories
25
25
  ['Apply to Join', 'Apply to Reclassify']
26
26
  end
27
+
28
+ def transcripts_statuses
29
+ []
30
+ end
31
+
27
32
  end
28
33
 
29
34
  included do
@@ -48,6 +53,7 @@ module EffectiveMembershipsApplicant
48
53
  organization: 'Organization', # Organization only. Organization fields.
49
54
  education: 'Education',
50
55
  course_amounts: 'Courses',
56
+ transcripts: 'Transcripts',
51
57
  experience: 'Work Experience',
52
58
  references: 'References',
53
59
  files: 'Attach Files',
@@ -64,6 +70,10 @@ module EffectiveMembershipsApplicant
64
70
  log_changes(except: :wizard_steps) if respond_to?(:log_changes)
65
71
 
66
72
  has_many_attached :applicant_files
73
+ has_many_attached :transcripts
74
+
75
+ # Transcripts Step
76
+ attr_accessor :declare_will_send_transcripts
67
77
 
68
78
  # Declarations Step
69
79
  attr_accessor :declare_code_of_ethics
@@ -96,6 +106,9 @@ module EffectiveMembershipsApplicant
96
106
  has_many :applicant_endorsements, -> { order(:id) }, class_name: 'Effective::ApplicantEndorsement', as: :applicant, inverse_of: :applicant, dependent: :destroy
97
107
  accepts_nested_attributes_for :applicant_endorsements, reject_if: :all_blank, allow_destroy: true
98
108
 
109
+ has_many :applicant_equivalences, -> { order(:id) }, class_name: 'Effective::ApplicantEquivalence', as: :applicant, inverse_of: :applicant, dependent: :destroy
110
+ accepts_nested_attributes_for :applicant_equivalences, reject_if: :all_blank, allow_destroy: true
111
+
99
112
  has_many :applicant_experiences, -> { order(:id) }, class_name: 'Effective::ApplicantExperience', as: :applicant, inverse_of: :applicant, dependent: :destroy
100
113
  accepts_nested_attributes_for :applicant_experiences, reject_if: :all_blank, allow_destroy: true
101
114
 
@@ -140,6 +153,11 @@ module EffectiveMembershipsApplicant
140
153
  applicant_experiences_months :integer
141
154
  applicant_experiences_details :text
142
155
 
156
+ # Transcripts
157
+ transcripts_received_on :date
158
+ transcripts_status :string
159
+ transcripts_details :text
160
+
143
161
  # Additional Information
144
162
  additional_information :text
145
163
 
@@ -251,6 +269,16 @@ module EffectiveMembershipsApplicant
251
269
  end
252
270
  end
253
271
 
272
+ # Applicant Equivalences Step
273
+ with_options(if: -> { current_step == :equivalences }) do
274
+ validate do
275
+ required = min_applicant_equivalences()
276
+ existing = applicant_equivalences().reject(&:marked_for_destruction?).length
277
+
278
+ self.errors.add(:applicant_equivalences, "please include #{required} or more equivalences") if existing < required
279
+ end
280
+ end
281
+
254
282
  # Applicant References Step
255
283
  with_options(if: -> { current_step == :references }) do
256
284
  validate do
@@ -271,6 +299,11 @@ module EffectiveMembershipsApplicant
271
299
  end
272
300
  end
273
301
 
302
+ # Transcripts step
303
+ with_options(if: -> { current_step == :transcripts }) do
304
+ validates :declare_will_send_transcripts, acceptance: true
305
+ end
306
+
274
307
  # Declarations Step
275
308
  with_options(if: -> { current_step == :declarations }) do
276
309
  validates :declare_code_of_ethics, acceptance: true
@@ -535,11 +568,33 @@ module EffectiveMembershipsApplicant
535
568
  category&.min_applicant_references.to_i
536
569
  end
537
570
 
571
+ def applicant_references_required?
572
+ min_applicant_references > 0
573
+ end
574
+
538
575
  # Endorsements Step
539
576
  def min_applicant_endorsements
540
577
  category&.min_applicant_endorsements.to_i
541
578
  end
542
579
 
580
+ def applicant_endorsements_required?
581
+ min_applicant_endorsements > 0
582
+ end
583
+
584
+ # Equivalences Step
585
+ def min_applicant_equivalences
586
+ category&.min_applicant_equivalences.to_i
587
+ end
588
+
589
+ # Transcripts Step
590
+ def transcripts_received?
591
+ transcripts_received_on_was.present?
592
+ end
593
+
594
+ def transcripts_required?
595
+ category.applicant_wizard_steps.include?(:transcripts)
596
+ end
597
+
543
598
  # Files Step
544
599
  def min_applicant_files
545
600
  category&.min_applicant_files.to_i
@@ -555,26 +610,22 @@ module EffectiveMembershipsApplicant
555
610
  )
556
611
  end
557
612
 
558
- def applicant_endorsements_required?
559
- min_applicant_endorsements > 0
560
- end
561
-
562
- def applicant_references_required?
563
- min_applicant_references > 0
564
- end
565
-
566
613
  # When an application is submitted, these must be done to go to completed.
567
614
  # An Admin can override this and just set them to completed.
568
615
  def completed_requirements
569
616
  requirements = {}
570
617
  return requirements unless category.present?
571
618
 
619
+ if category.applicant_wizard_steps.include?(:endorsements) || applicant_endorsements_required?
620
+ requirements['Applicant Endorsements'] = (!applicant_endorsements_required? || applicant_endorsements.count(&:completed?) >= min_applicant_endorsements)
621
+ end
622
+
572
623
  if category.applicant_wizard_steps.include?(:references) || applicant_references_required?
573
624
  requirements['Applicant References'] = (!applicant_references_required? || applicant_references.count(&:completed?) >= min_applicant_references)
574
625
  end
575
626
 
576
- if category.applicant_wizard_steps.include?(:endorsements) || applicant_endorsements_required?
577
- requirements['Applicant Endorsements'] = (!applicant_endorsements_required? || applicant_endorsements.count(&:completed?) >= min_applicant_endorsements)
627
+ if category.applicant_wizard_steps.include?(:transcripts) || transcripts_required?
628
+ requirements['Applicant Transcripts'] = (!transcripts_required? || transcripts_received?)
578
629
  end
579
630
 
580
631
  requirements
@@ -55,6 +55,8 @@ module EffectiveMembershipsCategory
55
55
  applicant_wizard_steps :text
56
56
 
57
57
  min_applicant_educations :integer
58
+ min_applicant_endorsements :integer
59
+ min_applicant_equivalences :integer
58
60
  min_applicant_experiences_months :integer
59
61
  min_applicant_references :integer
60
62
  min_applicant_courses :integer
@@ -42,7 +42,7 @@ module Effective
42
42
 
43
43
  # All step validations
44
44
  validates :applicant, presence: true
45
- validates :endorser, presence: true, unless: -> { unknown_member? }
45
+ validates :endorser_id, presence: true, unless: -> { unknown_member? }
46
46
 
47
47
  with_options(if: -> { unknown_member? }) do
48
48
  validates :endorser_email, presence: true, email: true
@@ -0,0 +1,32 @@
1
+ module Effective
2
+ class ApplicantEquivalence < ActiveRecord::Base
3
+ belongs_to :applicant, polymorphic: true
4
+
5
+ log_changes(to: :applicant) if respond_to?(:log_changes)
6
+
7
+ effective_resource do
8
+ name :string
9
+
10
+ start_on :date
11
+ end_on :date
12
+
13
+ notes :text
14
+
15
+ timestamps
16
+ end
17
+
18
+ scope :deep, -> { all }
19
+
20
+ validates :name, presence: true
21
+ validates :start_on, presence: true
22
+
23
+ validate(if: -> { start_on.present? && end_on.present? }) do
24
+ errors.add(:end_on, 'must be after start date') unless start_on < end_on
25
+ end
26
+
27
+ def to_s
28
+ name || 'equivalence'
29
+ end
30
+
31
+ end
32
+ end
@@ -29,6 +29,10 @@
29
29
  = tab 'Endorsements' do
30
30
  .mb-4= render_inline_datatable(Admin::EffectiveApplicantEndorsementsDatatable.new(applicant: applicant))
31
31
 
32
+ - if applicant.transcripts_required?
33
+ = tab 'Transcripts' do
34
+ = render 'admin/applicants/form_transcripts', applicant: applicant
35
+
32
36
  - if applicant.fees.present? || applicant.orders.present?
33
37
  = tab 'Fees' do
34
38
  .mb-4
@@ -0,0 +1,12 @@
1
+ = effective_form_with(model: [:admin, applicant], engine: true) do |f|
2
+ = f.date_field :transcripts_received_on
3
+
4
+ - statuses = f.object.class.transcripts_statuses
5
+
6
+ - if statuses.present?
7
+ = f.select_field :transcripts_status, statuses
8
+
9
+ = f.file_field :transcripts
10
+ = f.text_area :transcripts_details, hint: 'These details will be displayed to the applicant'
11
+
12
+ = f.submit 'Save Transcripts', border: false, center: true
@@ -38,6 +38,12 @@
38
38
  %td= f.number_field :min_applicant_endorsements, label: false
39
39
  %td minimimum number of endorsements
40
40
 
41
+ - if applicant.wizard_step_keys.include?(:equivalences)
42
+ %tr
43
+ %td= applicant.wizard_step_title(:equivalences)
44
+ %td= f.number_field :min_applicant_equivalences, label: false
45
+ %td minimimum number of equivalent memberships
46
+
41
47
  - if applicant.wizard_step_keys.include?(:references)
42
48
  %tr
43
49
  %td= applicant.wizard_step_title(:references)
@@ -1,3 +1,2 @@
1
- .card
2
- .card-body
3
- %p Thank you! The confidential endorsement has been completed.
1
+ = card do
2
+ %p Thank you! The confidential endorsement has been completed.
@@ -1,8 +1,7 @@
1
- .card
2
- .card-body
3
- %p
4
- Please provide a endorsement for the applicant
5
- = succeed('.') do
6
- %strong= @applicant_endorsement.applicant.owner
1
+ = card do
2
+ %p
3
+ Please provide a endorsement for the applicant
4
+ = succeed('.') do
5
+ %strong= @applicant_endorsement.applicant.owner
7
6
 
8
- = render('form_declaration', applicant_endorsement: @applicant_endorsement)
7
+ = render('form_declaration', applicant_endorsement: @applicant_endorsement)
@@ -1,3 +1,2 @@
1
- .card
2
- .card-body
3
- %p Thank you! The confidential reference has been completed.
1
+ = card do
2
+ %p Thank you! The confidential reference has been completed.
@@ -1,8 +1,7 @@
1
- .card
2
- .card-body
3
- %p
4
- Please provide a reference for the applicant
5
- = succeed('.') do
6
- %strong= @applicant_reference.applicant.owner
1
+ = card do
2
+ %p
3
+ Please provide a reference for the applicant
4
+ = succeed('.') do
5
+ %strong= @applicant_reference.applicant.owner
7
6
 
8
- = render('form_declaration', applicant_reference: @applicant_reference)
7
+ = render('form_declaration', applicant_reference: @applicant_reference)
@@ -1,3 +1,4 @@
1
1
  .effective-applicant
2
2
  - applicant.render_steps.each do |partial|
3
- = render "effective/applicants/#{partial}", applicant: applicant, step: partial
3
+ - applicant.render_step = partial
4
+ = render "effective/applicants/#{partial}", applicant: applicant
@@ -1,19 +1,11 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:course_amounts)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:course_amounts)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ - applicant.applicant_course_areas_collection.each do |area|
3
+ - datatable = EffectiveApplicantCoursesDatatable.new(applicant: applicant, applicant_course_area_id: area.id)
8
4
 
5
+ .mb-4
6
+ %h6= area
7
+ = render_simple_datatable(datatable)
8
+ %p #{area} courses: #{applicant.applicant_course_area_sum(applicant_course_area: area)}
9
9
 
10
- - applicant.applicant_course_areas_collection.each do |area|
11
- - datatable = EffectiveApplicantCoursesDatatable.new(applicant: applicant, applicant_course_area_id: area.id)
12
-
13
- .mb-4
14
- %h6= area
15
- = render_simple_datatable(datatable)
16
- %p #{area} courses: #{applicant.applicant_course_area_sum(applicant_course_area: area)}
17
-
18
- %p
19
- %strong All courses: #{pluralize(applicant.applicant_courses_sum, 'total course')}
10
+ %p
11
+ %strong All courses: #{pluralize(applicant.applicant_courses_sum, 'total course')}
@@ -1,16 +1,9 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:declarations)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:declarations)) if edit_effective_wizard?
8
-
9
- %table.table.table-sm
10
- %tbody
11
- %tr
12
- %td= icon('check')
13
- %td Yes, I hereby certify that I have read and will adhere to the Code of Ethics
14
- %tr
15
- %td= icon('check')
16
- %td Yes, I hereby certify that the statements and information contained herein are correct
1
+ = wizard_card(applicant) do
2
+ %table.table.table-sm
3
+ %tbody
4
+ %tr
5
+ %td= icon('check')
6
+ %td Yes, I hereby certify that I have read and will adhere to the Code of Ethics
7
+ %tr
8
+ %td= icon('check')
9
+ %td Yes, I hereby certify that the statements and information contained herein are correct
@@ -1,9 +1,2 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:demographics)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:demographics)) if edit_effective_wizard?
8
-
9
- = render 'users/demographics', parent: applicant, user: applicant.user
1
+ = wizard_card(applicant) do
2
+ = render 'users/demographics', parent: applicant, user: applicant.user
@@ -1,14 +1,7 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:education)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:education)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ - datatable = EffectiveApplicantEducationsDatatable.new(applicant: applicant)
3
+ .mb-4= render_simple_datatable(datatable)
8
4
 
9
- - datatable = EffectiveApplicantEducationsDatatable.new(applicant: applicant)
10
- .mb-4= render_simple_datatable(datatable)
11
-
12
- - if applicant.applicant_educations_details.present?
13
- %h6 Additional Education Details
14
- = simple_format(applicant.applicant_educations_details)
5
+ - if applicant.applicant_educations_details.present?
6
+ %h6 Additional Education Details
7
+ = simple_format(applicant.applicant_educations_details)
@@ -1,15 +1,8 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:endorsements)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:endorsements)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ - applicant.applicant_endorsements.each_with_index do |applicant_endorsement, index|
3
+ - if index > 0
4
+ .mb-4
8
5
 
9
- - applicant.applicant_endorsements.each_with_index do |applicant_endorsement, index|
10
- - if index > 0
11
- .mb-4
6
+ %h6 Endorsement ##{index + 1}
12
7
 
13
- %h6 Endorsement ##{index + 1}
14
-
15
- = render('effective/applicant_endorsements/applicant_endorsement', applicant_endorsement: applicant_endorsement)
8
+ = render('effective/applicant_endorsements/applicant_endorsement', applicant_endorsement: applicant_endorsement)
@@ -0,0 +1,3 @@
1
+ = wizard_card(applicant) do
2
+ - datatable = EffectiveApplicantEquivalencesDatatable.new(applicant: applicant)
3
+ .mb-4= render_simple_datatable(datatable)
@@ -1,28 +1,21 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:experience)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:experience)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ %table.table
3
+ %tbody
4
+ -# %tr
5
+ -# %th CV / Resume Upload
6
+ -# %td
7
+ -# - if applicant.cv.attached?
8
+ -# = link_to(applicant.cv.filename, url_for(applicant.cv), target: '_blank')
9
+ -# - else
10
+ -# None
8
11
 
9
- %table.table
10
- %tbody
11
- -# %tr
12
- -# %th CV / Resume Upload
13
- -# %td
14
- -# - if applicant.cv.attached?
15
- -# = link_to(applicant.cv.filename, url_for(applicant.cv), target: '_blank')
16
- -# - else
17
- -# None
12
+ %tr
13
+ %th Total Months
14
+ %td= applicant.applicant_experiences_months
18
15
 
19
- %tr
20
- %th Total Months
21
- %td= applicant.applicant_experiences_months
16
+ - datatable = EffectiveApplicantExperiencesDatatable.new(applicant: applicant)
17
+ .mb-4= render_simple_datatable(datatable)
22
18
 
23
- - datatable = EffectiveApplicantExperiencesDatatable.new(applicant: applicant)
24
- .mb-4= render_simple_datatable(datatable)
25
-
26
- - if applicant.applicant_experiences_details.present?
27
- %h6 Additional Experiences Details
28
- = simple_format(applicant.applicant_experiences_details)
19
+ - if applicant.applicant_experiences_details.present?
20
+ %h6 Additional Experiences Details
21
+ = simple_format(applicant.applicant_experiences_details)
@@ -1,27 +1,20 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:files)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:files)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ %table.table.table-sm
3
+ %tbody
4
+ - applicant.applicant_files.each do |file|
8
5
 
9
- %table.table.table-sm
10
- %tbody
11
- - applicant.applicant_files.each do |file|
6
+ - url = url_for(file)
7
+ - title = file.filename.to_s
12
8
 
13
- - url = url_for(file)
14
- - title = file.filename.to_s
9
+ - image_tag = content_tag(:img, '', class: '', src: url, alt: title) if file.image?
10
+ - link_tag = link_to('Download', url, target: '_blank')
11
+ - size_tag = (file.content_type + '<br>' + number_to_human_size(file.byte_size)).html_safe
15
12
 
16
- - image_tag = content_tag(:img, '', class: '', src: url, alt: title) if file.image?
17
- - link_tag = link_to('Download', url, target: '_blank')
18
- - size_tag = (file.content_type + '<br>' + number_to_human_size(file.byte_size)).html_safe
13
+ %tr
14
+ %td= image_tag
15
+ %td= title
16
+ %td= size_tag
17
+ %td= link_tag
19
18
 
20
- %tr
21
- %td= image_tag
22
- %td= title
23
- %td= size_tag
24
- %td= link_tag
25
-
26
- - if applicant.applicant_files.blank?
27
- %p No files attached
19
+ - if applicant.applicant_files.blank?
20
+ %p No files attached
@@ -1,9 +1,2 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:organization)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:organization)) if edit_effective_wizard?
8
-
9
- = render 'organizations/demographics', parent: applicant, organization: applicant.organization
1
+ = wizard_card(applicant) do
2
+ = render 'organizations/demographics', parent: applicant, organization: applicant.organization
@@ -1,15 +1,8 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:references)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:references)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ - applicant.applicant_references.each_with_index do |applicant_reference, index|
3
+ - if index > 0
4
+ .mb-4
8
5
 
9
- - applicant.applicant_references.each_with_index do |applicant_reference, index|
10
- - if index > 0
11
- .mb-4
6
+ %h6 Reference ##{index + 1}
12
7
 
13
- %h6 Reference ##{index + 1}
14
-
15
- = render('effective/applicant_references/applicant_reference', applicant_reference: applicant_reference)
8
+ = render('effective/applicant_references/applicant_reference', applicant_reference: applicant_reference)
@@ -1,36 +1,29 @@
1
- .card
2
- .card-body
3
- .row
4
- .col-sm
5
- %h5.card-title= applicant.wizard_step_title(:stamp)
6
- .col-sm-auto.text-right
7
- = link_to('Edit', wizard_path(:stamp)) if edit_effective_wizard?
1
+ = wizard_card(applicant) do
2
+ - applicant.stamps.each do |stamp|
3
+ %table.table.table-sm
4
+ %tbody
5
+ %tr
6
+ %th Name
7
+ %td= stamp.name
8
8
 
9
- - applicant.stamps.each do |stamp|
10
- %table.table.table-sm
11
- %tbody
12
- %tr
13
- %th Name
14
- %td= stamp.name
9
+ %tr
10
+ %th Name Confirmation
11
+ %td= stamp.name_confirmation
15
12
 
16
- %tr
17
- %th Name Confirmation
18
- %td= stamp.name_confirmation
13
+ %tr
14
+ %th Category
15
+ %td= stamp.category
19
16
 
17
+ - if stamp.shipping_address.present?
20
18
  %tr
21
- %th Category
22
- %td= stamp.category
23
-
24
- - if stamp.shipping_address.present?
25
- %tr
26
- %th Shipping Address
27
- %td= stamp.shipping_address.to_html
19
+ %th Shipping Address
20
+ %td= stamp.shipping_address.to_html
28
21
 
29
- - if applicant.was_approved?
30
- %tr
31
- %th Submitted
32
- %td= stamp.submitted_at&.strftime('%F') || '-'
22
+ - if applicant.was_approved?
23
+ %tr
24
+ %th Submitted
25
+ %td= stamp.submitted_at&.strftime('%F') || '-'
33
26
 
34
- %tr
35
- %th Issued
36
- %td= stamp.issued_at&.strftime('%F') || 'Not Issued'
27
+ %tr
28
+ %th Issued
29
+ %td= stamp.issued_at&.strftime('%F') || 'Not Issued'