effective_memberships 0.4.12 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_memberships_applicant.rb +49 -10
- data/app/views/admin/applicants/_form.html.haml +4 -0
- data/app/views/admin/applicants/_form_transcripts.html.haml +12 -0
- data/app/views/effective/applicants/_transcripts.html.haml +30 -0
- data/app/views/effective/applicants/_transcripts_requirements.html.haml +14 -0
- data/app/views/effective/applicants/transcripts.html.haml +13 -0
- data/app/views/effective/fee_payments/_demographics.html.haml +1 -1
- data/app/views/effective/fee_payments/_organization.html.haml +1 -1
- data/db/migrate/01_create_effective_memberships.rb.erb +6 -0
- data/lib/effective_memberships/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28543acc716acda559f603f4f8b1da0b608897ff9e251c04936f4cc32e186f2e
|
4
|
+
data.tar.gz: d524120cc69e13abc09af94999aef3bc7a00c5866b7ec97d450c6bf88bbe68d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a4f48f38e7e504be81e7914c3612405ac82121c47774dafcadf1e46b734a58b63ae9a689de62af385bed7a249cab8bd8714a3008eacd96b86483a4ea56ee1b
|
7
|
+
data.tar.gz: 1f69dbcd48f106c91b7226a3dc99bc105783b6bbdaf22db60e30f89b6ad5200b06190477599bb7fbf8ef07e804aac5d8decc619c467ce3e3597514ab2a90e62d
|
@@ -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
|
@@ -117,6 +127,7 @@ module EffectiveMembershipsApplicant
|
|
117
127
|
|
118
128
|
effective_resource do
|
119
129
|
applicant_type :string
|
130
|
+
stream :string
|
120
131
|
|
121
132
|
# Acts as Statused
|
122
133
|
status :string, permitted: false
|
@@ -143,6 +154,11 @@ module EffectiveMembershipsApplicant
|
|
143
154
|
applicant_experiences_months :integer
|
144
155
|
applicant_experiences_details :text
|
145
156
|
|
157
|
+
# Transcripts
|
158
|
+
transcripts_received_on :date
|
159
|
+
transcripts_status :string
|
160
|
+
transcripts_details :text
|
161
|
+
|
146
162
|
# Additional Information
|
147
163
|
additional_information :text
|
148
164
|
|
@@ -284,6 +300,11 @@ module EffectiveMembershipsApplicant
|
|
284
300
|
end
|
285
301
|
end
|
286
302
|
|
303
|
+
# Transcripts step
|
304
|
+
with_options(if: -> { current_step == :transcripts }) do
|
305
|
+
validates :declare_will_send_transcripts, acceptance: true
|
306
|
+
end
|
307
|
+
|
287
308
|
# Declarations Step
|
288
309
|
with_options(if: -> { current_step == :declarations }) do
|
289
310
|
validates :declare_code_of_ethics, acceptance: true
|
@@ -339,6 +360,11 @@ module EffectiveMembershipsApplicant
|
|
339
360
|
end
|
340
361
|
end
|
341
362
|
|
363
|
+
def sidebar_steps
|
364
|
+
return self.class.required_wizard_steps unless category.present?
|
365
|
+
required_steps
|
366
|
+
end
|
367
|
+
|
342
368
|
def can_visit_step?(step)
|
343
369
|
if missing_info?
|
344
370
|
return [:start, :select, :billing, :checkout].exclude?(step)
|
@@ -548,16 +574,33 @@ module EffectiveMembershipsApplicant
|
|
548
574
|
category&.min_applicant_references.to_i
|
549
575
|
end
|
550
576
|
|
577
|
+
def applicant_references_required?
|
578
|
+
min_applicant_references > 0
|
579
|
+
end
|
580
|
+
|
551
581
|
# Endorsements Step
|
552
582
|
def min_applicant_endorsements
|
553
583
|
category&.min_applicant_endorsements.to_i
|
554
584
|
end
|
555
585
|
|
586
|
+
def applicant_endorsements_required?
|
587
|
+
min_applicant_endorsements > 0
|
588
|
+
end
|
589
|
+
|
556
590
|
# Equivalences Step
|
557
591
|
def min_applicant_equivalences
|
558
592
|
category&.min_applicant_equivalences.to_i
|
559
593
|
end
|
560
594
|
|
595
|
+
# Transcripts Step
|
596
|
+
def transcripts_received?
|
597
|
+
transcripts_received_on_was.present?
|
598
|
+
end
|
599
|
+
|
600
|
+
def transcripts_required?
|
601
|
+
category.applicant_wizard_steps.include?(:transcripts)
|
602
|
+
end
|
603
|
+
|
561
604
|
# Files Step
|
562
605
|
def min_applicant_files
|
563
606
|
category&.min_applicant_files.to_i
|
@@ -573,26 +616,22 @@ module EffectiveMembershipsApplicant
|
|
573
616
|
)
|
574
617
|
end
|
575
618
|
|
576
|
-
def applicant_endorsements_required?
|
577
|
-
min_applicant_endorsements > 0
|
578
|
-
end
|
579
|
-
|
580
|
-
def applicant_references_required?
|
581
|
-
min_applicant_references > 0
|
582
|
-
end
|
583
|
-
|
584
619
|
# When an application is submitted, these must be done to go to completed.
|
585
620
|
# An Admin can override this and just set them to completed.
|
586
621
|
def completed_requirements
|
587
622
|
requirements = {}
|
588
623
|
return requirements unless category.present?
|
589
624
|
|
625
|
+
if category.applicant_wizard_steps.include?(:endorsements) || applicant_endorsements_required?
|
626
|
+
requirements['Applicant Endorsements'] = (!applicant_endorsements_required? || applicant_endorsements.count(&:completed?) >= min_applicant_endorsements)
|
627
|
+
end
|
628
|
+
|
590
629
|
if category.applicant_wizard_steps.include?(:references) || applicant_references_required?
|
591
630
|
requirements['Applicant References'] = (!applicant_references_required? || applicant_references.count(&:completed?) >= min_applicant_references)
|
592
631
|
end
|
593
632
|
|
594
|
-
if category.applicant_wizard_steps.include?(:
|
595
|
-
requirements['Applicant
|
633
|
+
if category.applicant_wizard_steps.include?(:transcripts) || transcripts_required?
|
634
|
+
requirements['Applicant Transcripts'] = (!transcripts_required? || transcripts_received?)
|
596
635
|
end
|
597
636
|
|
598
637
|
requirements
|
@@ -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
|
@@ -0,0 +1,30 @@
|
|
1
|
+
= wizard_card(applicant) do
|
2
|
+
%table.table
|
3
|
+
%tbody
|
4
|
+
%tr
|
5
|
+
%th Status
|
6
|
+
%td
|
7
|
+
- if applicant.transcripts_received?
|
8
|
+
Received on #{applicant.transcripts_received_on.strftime('%F')}
|
9
|
+
- else
|
10
|
+
Not yet received
|
11
|
+
|
12
|
+
- if applicant.transcripts_status.present?
|
13
|
+
%tr
|
14
|
+
%th Transcripts Status
|
15
|
+
%td= applicant.transcripts_status
|
16
|
+
|
17
|
+
- if applicant.transcripts_details.present?
|
18
|
+
%tr
|
19
|
+
%th Details
|
20
|
+
%td= applicant.transcripts_details
|
21
|
+
|
22
|
+
- if applicant.transcripts.present?
|
23
|
+
%tr
|
24
|
+
%th Transcripts Upload
|
25
|
+
%td
|
26
|
+
- applicant.transcripts.each do |file|
|
27
|
+
%p= link_to(file.filename, url_for(file), target: '_blank')
|
28
|
+
|
29
|
+
- unless applicant.transcripts_received?
|
30
|
+
= render('effective/applicants/transcripts_requirements', applicant: applicant)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
%p
|
2
|
+
Official transcripts must be mailed directly from the institution
|
3
|
+
where the credential was granted to:
|
4
|
+
|
5
|
+
%p.text-center
|
6
|
+
TODO
|
7
|
+
%br
|
8
|
+
%br
|
9
|
+
%br
|
10
|
+
|
11
|
+
%p
|
12
|
+
= succeed('.') do
|
13
|
+
Institutions must send the electronic transcripts to
|
14
|
+
= mail_to 'todo@example.com'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
= card do
|
5
|
+
.mb-2= render('transcripts_requirements', applicant: resource)
|
6
|
+
|
7
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
8
|
+
= f.hidden_field :id
|
9
|
+
|
10
|
+
= f.check_box :declare_will_send_transcripts,
|
11
|
+
label: "Yes, I will request my transcripts be sent directly from the insitiution to the registrar.", required: true
|
12
|
+
|
13
|
+
= f.save 'Save and Continue'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= wizard_card(fee_payment)
|
1
|
+
= wizard_card(fee_payment) do
|
2
2
|
= render 'users/demographics', parent: fee_payment, user: fee_payment.user
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= wizard_card(fee_payment)
|
1
|
+
= wizard_card(fee_payment) do
|
2
2
|
= render 'organizations/demographics', parent: fee_payment, organization: fee_payment.organization
|
@@ -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
|
@@ -209,6 +210,11 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
209
210
|
t.integer :applicant_experiences_months
|
210
211
|
t.text :applicant_experiences_details
|
211
212
|
|
213
|
+
# Transcripts
|
214
|
+
t.date :transcripts_received_on
|
215
|
+
t.string :transcripts_status
|
216
|
+
t.text :transcripts_details
|
217
|
+
|
212
218
|
# Additional Information
|
213
219
|
t.text :additional_information
|
214
220
|
|
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.
|
4
|
+
version: 0.4.15
|
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-
|
11
|
+
date: 2022-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -342,6 +342,7 @@ files:
|
|
342
342
|
- app/views/admin/applicants/_form_decline.html.haml
|
343
343
|
- app/views/admin/applicants/_form_missing_info.html.haml
|
344
344
|
- app/views/admin/applicants/_form_process.html.haml
|
345
|
+
- app/views/admin/applicants/_form_transcripts.html.haml
|
345
346
|
- app/views/admin/applicants/_status.html.haml
|
346
347
|
- app/views/admin/categories/_form.html.haml
|
347
348
|
- app/views/admin/categories/_form_applicant.html.haml
|
@@ -407,6 +408,8 @@ files:
|
|
407
408
|
- app/views/effective/applicants/_select_organization.html.haml
|
408
409
|
- app/views/effective/applicants/_stamp.html.haml
|
409
410
|
- app/views/effective/applicants/_summary.html.haml
|
411
|
+
- app/views/effective/applicants/_transcripts.html.haml
|
412
|
+
- app/views/effective/applicants/_transcripts_requirements.html.haml
|
410
413
|
- app/views/effective/applicants/billing.html.haml
|
411
414
|
- app/views/effective/applicants/checkout.html.haml
|
412
415
|
- app/views/effective/applicants/course_amounts.html.haml
|
@@ -424,6 +427,7 @@ files:
|
|
424
427
|
- app/views/effective/applicants/start.html.haml
|
425
428
|
- app/views/effective/applicants/submitted.html.haml
|
426
429
|
- app/views/effective/applicants/summary.html.haml
|
430
|
+
- app/views/effective/applicants/transcripts.html.haml
|
427
431
|
- app/views/effective/fee_payments/_content.html.haml
|
428
432
|
- app/views/effective/fee_payments/_dashboard.html.haml
|
429
433
|
- app/views/effective/fee_payments/_declarations.html.haml
|