effective_memberships 0.4.14 → 0.4.17

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: 64b883aca41c43059e7a71714e06111778fdf28459cd1e1b93fd5623c0b1ac76
4
- data.tar.gz: 988d8610c97a8975525f79b8f6b8f2ae4c8b5aa0408e363ef2122a5e75fcd8f2
3
+ metadata.gz: 1394fcdd25d9322f467e1392a9efeec60cc028e424ee85d3baa464d4d185a46a
4
+ data.tar.gz: 6c4660193bb2e98b113a4ba1e7372b469dcda714f2d78d712b635a497b488d3c
5
5
  SHA512:
6
- metadata.gz: '084430f1b74612a991224992ac678b0045c01024c077159a87853a60c86c955f2d00c0a68c65bd019a7fb8a317ab6f9eb6e969425436aa72470cc42f979fc882'
7
- data.tar.gz: 29ab840f13d34e4936ba3b1267e4fe9dbc7fdfdd7ca39d275ed4d87c8cc06425bd44606d45a4380a47324a877005c4671eb7c133fd9796cf631b8cfabd891aad
6
+ metadata.gz: 4f4bd2c3f2f544a65d9bbace898fc5538ec115175a635d2895e399597d1687850b8cbf4824bf28517c9b8cd96bee3c96fdd03fcf6224efe39db03650a85881c8
7
+ data.tar.gz: 9dd8b11979d28592083378f98ab4d69a3c452f156c0698e3eb717273321d4aefe20069accfe00272afc945e0791fffc202fcf3cec526b008922339a5b334f9fb
@@ -53,6 +53,7 @@ module EffectiveMembershipsApplicant
53
53
  organization: 'Organization', # Organization only. Organization fields.
54
54
  education: 'Education',
55
55
  course_amounts: 'Courses',
56
+ equivalences: 'Equivalent Memberships',
56
57
  transcripts: 'Transcripts',
57
58
  experience: 'Work Experience',
58
59
  references: 'References',
@@ -127,6 +128,7 @@ module EffectiveMembershipsApplicant
127
128
 
128
129
  effective_resource do
129
130
  applicant_type :string
131
+ stream :string
130
132
 
131
133
  # Acts as Statused
132
134
  status :string, permitted: false
@@ -359,6 +361,11 @@ module EffectiveMembershipsApplicant
359
361
  end
360
362
  end
361
363
 
364
+ def sidebar_steps
365
+ return self.class.required_wizard_steps unless category.present?
366
+ required_steps
367
+ end
368
+
362
369
  def can_visit_step?(step)
363
370
  if missing_info?
364
371
  return [:start, :select, :billing, :checkout].exclude?(step)
@@ -367,6 +374,14 @@ module EffectiveMembershipsApplicant
367
374
  can_revisit_completed_steps(step)
368
375
  end
369
376
 
377
+ def applicant_fee_category
378
+ category
379
+ end
380
+
381
+ def applicant_fee_price
382
+ category.applicant_fee
383
+ end
384
+
370
385
  # All Fees and Orders
371
386
  def submit_fees
372
387
  # Find or build submit fee
@@ -374,10 +389,10 @@ module EffectiveMembershipsApplicant
374
389
 
375
390
  unless fee.purchased?
376
391
  fee.assign_attributes(
377
- category: category,
378
- price: category.applicant_fee,
379
- tax_exempt: category.applicant_fee_tax_exempt,
380
- qb_item_name: category.applicant_fee_qb_item_name
392
+ category: applicant_fee_category(),
393
+ price: applicant_fee_price(),
394
+ tax_exempt: applicant_fee_category().applicant_fee_tax_exempt,
395
+ qb_item_name: applicant_fee_category().applicant_fee_qb_item_name
381
396
  )
382
397
  end
383
398
 
@@ -101,6 +101,7 @@ module EffectiveMembershipsCategory
101
101
 
102
102
  serialize :can_apply_restricted_ids, Array
103
103
  serialize :applicant_wizard_steps, Array
104
+ serialize :applicant_review_wizard_steps, Array
104
105
  serialize :fee_payment_wizard_steps, Array
105
106
 
106
107
  scope :deep, -> { includes(:rich_texts) }
@@ -34,7 +34,7 @@ module Effective
34
34
  validates :position, presence: true
35
35
  validates :employer, presence: true
36
36
  validates :start_on, presence: true
37
- validates :end_on, presence: true
37
+ validates :end_on, presence: true, unless: -> { still_work_here? }
38
38
  validates :level, presence: true, inclusion: { in: LEVELS }
39
39
  validates :months, presence: true
40
40
 
@@ -1,54 +1 @@
1
- = tabs do
2
- - # Done applicants have the Applicant tab first. In progress ones the Status tab
3
- - if applicant.done?
4
- = tab 'Applicant' do
5
- .mb-4= render 'effective/applicants/summary', applicant: applicant, namespace: :admin
6
- = render 'effective/applicants/applicant', applicant: applicant, namespace: :admin
7
-
8
- = tab 'Status' do
9
- = render 'admin/applicants/status', applicant: applicant, namespace: :admin
10
-
11
- - if applicant.in_progress?
12
- = tab 'Status' do
13
- = render 'admin/applicants/status', applicant: applicant, namespace: :admin
14
-
15
- = tab 'Applicant' do
16
- .mb-4= render 'effective/applicants/summary', applicant: applicant, namespace: :admin
17
- = render 'effective/applicants/applicant', applicant: applicant, namespace: :admin
18
-
19
- - # Just normal tabs now
20
- - if applicant.was_submitted? && !applicant.was_approved?
21
- = tab 'Process' do
22
- = render 'admin/applicants/form_process', applicant: applicant
23
-
24
- - if applicant.applicant_references.present?
25
- = tab 'References' do
26
- .mb-4= render_inline_datatable(Admin::EffectiveApplicantReferencesDatatable.new(applicant: applicant))
27
-
28
- - if applicant.applicant_endorsements.present?
29
- = tab 'Endorsements' do
30
- .mb-4= render_inline_datatable(Admin::EffectiveApplicantEndorsementsDatatable.new(applicant: applicant))
31
-
32
- - if applicant.transcripts_required?
33
- = tab 'Transcripts' do
34
- = render 'admin/applicants/form_transcripts', applicant: applicant
35
-
36
- - if applicant.fees.present? || applicant.orders.present?
37
- = tab 'Fees' do
38
- .mb-4
39
- %h2 Fees
40
- - datatable = Admin::EffectiveFeesDatatable.new(applicant: applicant, total: false)
41
- = render_datatable(datatable, simple: true, inline: true)
42
-
43
- .mb-4
44
- %h2 Orders
45
- - datatable = Admin::EffectiveOrdersDatatable.new(parent: applicant, owner: applicant.owner, user: applicant.owner, total: false)
46
- = render_datatable(datatable, simple: true)
47
-
48
- - if applicant.owner.applicants.any? { |other| other.was_submitted? && other.id != applicant.id }
49
- = tab 'Other Applications' do
50
- = render_datatable(Admin::EffectiveApplicantsDatatable.new(owner: applicant.owner, except_id: applicant.id))
51
-
52
- - if applicant.persisted? && applicant.respond_to?(:log_changes_datatable)
53
- = tab 'Logs' do
54
- = render_inline_datatable(applicant.log_changes_datatable)
1
+ = render('admin/applicants/form_applicant', applicant: applicant)
@@ -0,0 +1,56 @@
1
+ = tabs do
2
+ - # Done applicants have the Applicant tab first. In progress ones the Status tab
3
+ - if applicant.done?
4
+ = tab 'Applicant' do
5
+ .mb-4= render 'effective/applicants/summary', applicant: applicant, namespace: :admin
6
+ = render 'effective/applicants/applicant', applicant: applicant, namespace: :admin
7
+
8
+ = tab 'Status' do
9
+ = render 'admin/applicants/status', applicant: applicant, namespace: :admin
10
+
11
+ - if applicant.in_progress?
12
+ = tab 'Status' do
13
+ = render 'admin/applicants/status', applicant: applicant, namespace: :admin
14
+
15
+ = tab 'Applicant' do
16
+ .mb-4= render 'effective/applicants/summary', applicant: applicant, namespace: :admin
17
+ = render 'effective/applicants/applicant', applicant: applicant, namespace: :admin
18
+
19
+ - # Just normal tabs now
20
+ - if applicant.was_submitted? && !applicant.was_approved?
21
+ = tab 'Process' do
22
+ = render 'admin/applicants/form_process', applicant: applicant
23
+
24
+ - if applicant.applicant_references.present?
25
+ = tab 'References' do
26
+ .mb-4= render_inline_datatable(Admin::EffectiveApplicantReferencesDatatable.new(applicant: applicant))
27
+
28
+ - if applicant.applicant_endorsements.present?
29
+ = tab 'Endorsements' do
30
+ .mb-4= render_inline_datatable(Admin::EffectiveApplicantEndorsementsDatatable.new(applicant: applicant))
31
+
32
+ - if applicant.transcripts_required?
33
+ = tab 'Transcripts' do
34
+ = render 'admin/applicants/form_transcripts', applicant: applicant
35
+
36
+ = yield
37
+
38
+ - if applicant.fees.present? || applicant.orders.present?
39
+ = tab 'Fees' do
40
+ .mb-4
41
+ %h2 Fees
42
+ - datatable = Admin::EffectiveFeesDatatable.new(applicant: applicant, total: false)
43
+ = render_datatable(datatable, simple: true, inline: true)
44
+
45
+ .mb-4
46
+ %h2 Orders
47
+ - datatable = Admin::EffectiveOrdersDatatable.new(parent: applicant, owner: applicant.owner, user: applicant.owner, total: false)
48
+ = render_datatable(datatable, simple: true)
49
+
50
+ - if applicant.owner.applicants.any? { |other| other.was_submitted? && other.id != applicant.id }
51
+ = tab 'Other Applications' do
52
+ = render_datatable(Admin::EffectiveApplicantsDatatable.new(owner: applicant.owner, except_id: applicant.id))
53
+
54
+ - if applicant.persisted? && applicant.respond_to?(:log_changes_datatable)
55
+ = tab 'Logs' do
56
+ = render_inline_datatable(applicant.log_changes_datatable)
@@ -19,7 +19,7 @@
19
19
  = aef.hidden_field :endorser_type
20
20
 
21
21
  = aef.select :endorser_id, endorders_collection, required: false,
22
- ajax_url: effective_memberships.select2_ajax_endorser_applicant_endorsement_path(applicant_id: resource)
22
+ ajax_url: (effective_memberships.select2_ajax_endorser_applicant_endorsement_path(applicant_id: resource) unless Rails.env.test?)
23
23
 
24
24
  = aef.check_box :unknown_member, label: 'I cant find my endorser in the above list'
25
25
 
@@ -3,6 +3,9 @@
3
3
 
4
4
  = card do
5
5
  - if resource.min_applicant_educations > 0
6
+ %p You must include #{resource.min_applicant_educations} or more work experiences.
7
+
8
+ - if resource.min_applicant_experiences_months > 0
6
9
  %p You must include #{resource.min_applicant_experiences_months} or more months of experience.
7
10
 
8
11
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
@@ -16,6 +16,7 @@
16
16
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
17
17
  = f.hidden_field :id
18
18
 
19
+ = f.hidden_field :stream, value: nil
19
20
  = f.hidden_field :organization_id, value: nil
20
21
  = f.hidden_field :organization_type, value: nil
21
22
  = f.hidden_field :category_type, value: EffectiveMemberships.Category.name
@@ -167,6 +167,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
167
167
  # Applicants
168
168
  create_table :applicants do |t|
169
169
  t.string :applicant_type
170
+ t.string :stream
170
171
  t.string :token
171
172
 
172
173
  t.integer :user_id
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.4.14'
2
+ VERSION = '0.4.17'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_memberships
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.17
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: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -337,6 +337,7 @@ files:
337
337
  - app/views/admin/applicant_endorsements/_applicant_endorsement.html.haml
338
338
  - app/views/admin/applicant_references/_applicant_reference.html.haml
339
339
  - app/views/admin/applicants/_form.html.haml
340
+ - app/views/admin/applicants/_form_applicant.html.haml
340
341
  - app/views/admin/applicants/_form_approve.html.haml
341
342
  - app/views/admin/applicants/_form_complete.html.haml
342
343
  - app/views/admin/applicants/_form_decline.html.haml