effective_memberships 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +114 -0
- data/Rakefile +18 -0
- data/app/assets/config/effective_memberships_manifest.js +3 -0
- data/app/assets/javascripts/effective_memberships/applicant_courses.js +29 -0
- data/app/assets/javascripts/effective_memberships/applicant_experiences.js +38 -0
- data/app/assets/javascripts/effective_memberships/base.js +0 -0
- data/app/assets/javascripts/effective_memberships.js +1 -0
- data/app/assets/stylesheets/effective_memberships/base.scss +5 -0
- data/app/assets/stylesheets/effective_memberships.scss +1 -0
- data/app/controllers/admin/applicant_course_areas_controller.rb +15 -0
- data/app/controllers/admin/applicant_course_names_controller.rb +15 -0
- data/app/controllers/admin/applicants_controller.rb +33 -0
- data/app/controllers/admin/categories_controller.rb +19 -0
- data/app/controllers/admin/fees_controller.rb +18 -0
- data/app/controllers/admin/registrar_actions_controller.rb +49 -0
- data/app/controllers/effective/applicant_references_controller.rb +37 -0
- data/app/controllers/effective/applicants_controller.rb +34 -0
- data/app/controllers/effective/fee_payments_controller.rb +29 -0
- data/app/datatables/admin/effective_applicant_course_areas_datatable.rb +17 -0
- data/app/datatables/admin/effective_applicant_course_names_datatable.rb +17 -0
- data/app/datatables/admin/effective_applicants_datatable.rb +55 -0
- data/app/datatables/admin/effective_categories_datatable.rb +23 -0
- data/app/datatables/admin/effective_fees_datatable.rb +69 -0
- data/app/datatables/admin/effective_membership_histories_datatable.rb +35 -0
- data/app/datatables/effective_applicant_courses_datatable.rb +30 -0
- data/app/datatables/effective_applicant_educations_datatable.rb +22 -0
- data/app/datatables/effective_applicant_experiences_datatable.rb +42 -0
- data/app/datatables/effective_applicant_references_datatable.rb +34 -0
- data/app/datatables/effective_applicants_datatable.rb +34 -0
- data/app/helpers/effective_memberships_helper.rb +15 -0
- data/app/mailers/effective/memberships_mailer.rb +84 -0
- data/app/models/concerns/effective_memberships_applicant.rb +612 -0
- data/app/models/concerns/effective_memberships_applicant_review.rb +149 -0
- data/app/models/concerns/effective_memberships_category.rb +196 -0
- data/app/models/concerns/effective_memberships_fee_payment.rb +229 -0
- data/app/models/concerns/effective_memberships_owner.rb +263 -0
- data/app/models/concerns/effective_memberships_registrar.rb +300 -0
- data/app/models/effective/applicant.rb +7 -0
- data/app/models/effective/applicant_course.rb +40 -0
- data/app/models/effective/applicant_course_area.rb +31 -0
- data/app/models/effective/applicant_course_name.rb +29 -0
- data/app/models/effective/applicant_education.rb +36 -0
- data/app/models/effective/applicant_experience.rb +79 -0
- data/app/models/effective/applicant_reference.rb +81 -0
- data/app/models/effective/applicant_review.rb +7 -0
- data/app/models/effective/category.rb +7 -0
- data/app/models/effective/fee.rb +142 -0
- data/app/models/effective/fee_payment.rb +7 -0
- data/app/models/effective/membership.rb +119 -0
- data/app/models/effective/membership_category.rb +11 -0
- data/app/models/effective/membership_history.rb +40 -0
- data/app/models/effective/registrar.rb +19 -0
- data/app/models/effective/registrar_action.rb +97 -0
- data/app/views/admin/applicant_course_areas/_form.html.haml +8 -0
- data/app/views/admin/applicant_course_areas/_form_applicant_course_area.html.haml +8 -0
- data/app/views/admin/applicant_course_areas/index.html.haml +8 -0
- data/app/views/admin/applicant_course_name/_form.html.haml +9 -0
- data/app/views/admin/applicants/_form.html.haml +38 -0
- data/app/views/admin/applicants/_form_approve.html.haml +34 -0
- data/app/views/admin/applicants/_form_decline.html.haml +11 -0
- data/app/views/admin/applicants/_form_process.html.haml +18 -0
- data/app/views/admin/applicants/_status.html.haml +133 -0
- data/app/views/admin/categories/_form.html.haml +14 -0
- data/app/views/admin/categories/_form_applicant.html.haml +12 -0
- data/app/views/admin/categories/_form_applicant_content.html.haml +19 -0
- data/app/views/admin/categories/_form_applicant_eligibility.html.haml +13 -0
- data/app/views/admin/categories/_form_applicant_fees.html.haml +29 -0
- data/app/views/admin/categories/_form_applicant_steps.html.haml +42 -0
- data/app/views/admin/categories/_form_category.html.haml +10 -0
- data/app/views/admin/categories/_form_fee_payment.html.haml +9 -0
- data/app/views/admin/categories/_form_fee_payment_content.html.haml +19 -0
- data/app/views/admin/categories/_form_fee_payment_steps.html.haml +9 -0
- data/app/views/admin/categories/_form_renewals.html.haml +32 -0
- data/app/views/admin/fees/_fee.html.haml +1 -0
- data/app/views/admin/fees/_form.html.haml +14 -0
- data/app/views/admin/memberships/_status.html.haml +6 -0
- data/app/views/admin/registrar_actions/_form.html.haml +10 -0
- data/app/views/admin/registrar_actions/_form_bad_standing.html.haml +43 -0
- data/app/views/admin/registrar_actions/_form_fees_paid.html.haml +30 -0
- data/app/views/admin/registrar_actions/_form_reclassify.html.haml +43 -0
- data/app/views/admin/registrar_actions/_form_register.html.haml +44 -0
- data/app/views/admin/registrar_actions/_form_remove.html.haml +17 -0
- data/app/views/effective/applicant_references/_applicant_reference.html.haml +51 -0
- data/app/views/effective/applicant_references/_datatable_actions.html.haml +4 -0
- data/app/views/effective/applicant_references/_form.html.haml +18 -0
- data/app/views/effective/applicant_references/_form_declaration.html.haml +37 -0
- data/app/views/effective/applicant_references/complete.html.haml +3 -0
- data/app/views/effective/applicant_references/edit.html.haml +8 -0
- data/app/views/effective/applicants/_applicant.html.haml +6 -0
- data/app/views/effective/applicants/_content.html.haml +10 -0
- data/app/views/effective/applicants/_course_amounts.html.haml +19 -0
- data/app/views/effective/applicants/_dashboard.html.haml +19 -0
- data/app/views/effective/applicants/_declarations.html.haml +16 -0
- data/app/views/effective/applicants/_demographics.html.haml +9 -0
- data/app/views/effective/applicants/_demographics_fields.html.haml +11 -0
- data/app/views/effective/applicants/_demographics_owner.html.haml +20 -0
- data/app/views/effective/applicants/_education.html.haml +14 -0
- data/app/views/effective/applicants/_experience.html.haml +28 -0
- data/app/views/effective/applicants/_files.html.haml +27 -0
- data/app/views/effective/applicants/_layout.html.haml +3 -0
- data/app/views/effective/applicants/_orders.html.haml +4 -0
- data/app/views/effective/applicants/_references.html.haml +15 -0
- data/app/views/effective/applicants/_summary.html.haml +40 -0
- data/app/views/effective/applicants/billing.html.haml +14 -0
- data/app/views/effective/applicants/checkout.html.haml +6 -0
- data/app/views/effective/applicants/course_amounts.html.haml +50 -0
- data/app/views/effective/applicants/declarations.html.haml +19 -0
- data/app/views/effective/applicants/demographics.html.haml +11 -0
- data/app/views/effective/applicants/education.html.haml +27 -0
- data/app/views/effective/applicants/experience.html.haml +51 -0
- data/app/views/effective/applicants/files.html.haml +14 -0
- data/app/views/effective/applicants/references.html.haml +24 -0
- data/app/views/effective/applicants/select.html.haml +27 -0
- data/app/views/effective/applicants/start.html.haml +18 -0
- data/app/views/effective/applicants/submitted.html.haml +44 -0
- data/app/views/effective/applicants/summary.html.haml +8 -0
- data/app/views/effective/fee_payments/_content.html.haml +8 -0
- data/app/views/effective/fee_payments/_declarations.html.haml +16 -0
- data/app/views/effective/fee_payments/_demographics.html.haml +9 -0
- data/app/views/effective/fee_payments/_demographics_fields.html.haml +11 -0
- data/app/views/effective/fee_payments/_demographics_owner.html.haml +20 -0
- data/app/views/effective/fee_payments/_fee_payment.html.haml +6 -0
- data/app/views/effective/fee_payments/_layout.html.haml +3 -0
- data/app/views/effective/fee_payments/_orders.html.haml +4 -0
- data/app/views/effective/fee_payments/billing.html.haml +14 -0
- data/app/views/effective/fee_payments/checkout.html.haml +6 -0
- data/app/views/effective/fee_payments/declarations.html.haml +20 -0
- data/app/views/effective/fee_payments/demographics.html.haml +12 -0
- data/app/views/effective/fee_payments/start.html.haml +20 -0
- data/app/views/effective/fee_payments/submitted.html.haml +14 -0
- data/app/views/effective/fee_payments/summary.html.haml +8 -0
- data/app/views/effective/fees/_dashboard.html.haml +22 -0
- data/app/views/effective/fees/_fee.html.haml +37 -0
- data/app/views/effective/memberships/_dashboard.html.haml +29 -0
- data/app/views/effective/memberships/_membership.html.haml +40 -0
- data/app/views/effective/memberships_mailer/applicant_approved.liquid +15 -0
- data/app/views/effective/memberships_mailer/applicant_declined.liquid +13 -0
- data/app/views/effective/memberships_mailer/applicant_reference_notification.liquid +15 -0
- data/app/views/layouts/effective_memberships_mailer_layout.html.haml +7 -0
- data/config/effective_memberships.rb +47 -0
- data/config/routes.rb +32 -0
- data/db/migrate/01_create_effective_memberships.rb.erb +380 -0
- data/db/seeds.rb +59 -0
- data/lib/effective_memberships/engine.rb +23 -0
- data/lib/effective_memberships/version.rb +3 -0
- data/lib/effective_memberships.rb +86 -0
- data/lib/generators/effective_memberships/install_generator.rb +40 -0
- data/lib/generators/templates/effective_memberships_mailer_preview.rb +4 -0
- data/lib/tasks/effective_memberships_tasks.rake +17 -0
- metadata +377 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
- reference = applicant_reference
|
2
|
+
|
3
|
+
%table.table
|
4
|
+
%tbody
|
5
|
+
%tr
|
6
|
+
%th Name
|
7
|
+
%td= link_to("#{reference.name} <#{reference.email}>", "mailto:#{reference.email}")
|
8
|
+
|
9
|
+
%tr
|
10
|
+
%th Known
|
11
|
+
%td= reference.known
|
12
|
+
|
13
|
+
%tr
|
14
|
+
%th Relationship
|
15
|
+
%td= reference.relationship
|
16
|
+
|
17
|
+
- if reference.applicant.was_submitted?
|
18
|
+
%tr
|
19
|
+
%th Status
|
20
|
+
%td
|
21
|
+
- if reference.submitted?
|
22
|
+
Waiting on response
|
23
|
+
- elsif reference.completed?
|
24
|
+
Response completed
|
25
|
+
|
26
|
+
- if reference.applicant.was_submitted? && !reference.completed?
|
27
|
+
%tr
|
28
|
+
%th Last Notified at
|
29
|
+
%td= reference.last_notified_at&.strftime('%F') || 'Never'
|
30
|
+
|
31
|
+
- if can?(:notify, reference) && !local_assigns[:skip_actions]
|
32
|
+
%tr
|
33
|
+
%th Notification
|
34
|
+
%td= link_to('Resend email notification', effective_memberships.notify_applicant_reference_path(reference), 'data-method': :post, 'data-confirm': "Really resend email notification to #{reference.email}?")
|
35
|
+
|
36
|
+
- if reference.completed? && can?(:review, reference)
|
37
|
+
%tr
|
38
|
+
%th Address
|
39
|
+
%td= reference.reference_address.to_html
|
40
|
+
|
41
|
+
%tr
|
42
|
+
%th Reservations
|
43
|
+
%td
|
44
|
+
- if reference.reservations?
|
45
|
+
= reference.reservations_reason
|
46
|
+
- else
|
47
|
+
None
|
48
|
+
|
49
|
+
%tr
|
50
|
+
%th Work History
|
51
|
+
%td= reference.work_history
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= effective_form_with(model: applicant_reference, engine: true) do |f|
|
2
|
+
- if inline_datatable?
|
3
|
+
= f.hidden_field :applicant_id
|
4
|
+
- else
|
5
|
+
- raise('expected inline datatable')
|
6
|
+
|
7
|
+
= f.text_field :name
|
8
|
+
.row
|
9
|
+
.col= f.email_field :email
|
10
|
+
.col= f.tel_field :phone
|
11
|
+
|
12
|
+
.row
|
13
|
+
.col= f.select :relationship, Effective::ApplicantReference::RELATIONSHIPS
|
14
|
+
.col= f.select :known, Effective::ApplicantReference::KNOWNS, label: 'Known for'
|
15
|
+
|
16
|
+
%p An email will be sent asking them to complete a reference declaration form.
|
17
|
+
|
18
|
+
= f.submit('Create and Notify Reference')
|
@@ -0,0 +1,37 @@
|
|
1
|
+
= effective_form_with(model: applicant_reference, engine: true) do |f|
|
2
|
+
|
3
|
+
%h2 My Information
|
4
|
+
%p Please confirm your name, email, phone and address:
|
5
|
+
|
6
|
+
.row
|
7
|
+
.col= f.text_field :name
|
8
|
+
.col= f.email_field :email
|
9
|
+
.col= f.tel_field :phone
|
10
|
+
|
11
|
+
= effective_address_fields(f, :reference_address)
|
12
|
+
|
13
|
+
%h2 Applicant Reference
|
14
|
+
|
15
|
+
= f.select :known, Effective::ApplicantReference::KNOWNS, label: 'I have known the applicant for', required: true
|
16
|
+
|
17
|
+
= f.radios :relationship, Effective::ApplicantReference::RELATIONSHIPS, required: true,
|
18
|
+
label: 'I have known or been associated with the applicant as their'
|
19
|
+
|
20
|
+
- reservations = [['Yes, I have reservations', true], ['No, I do not have reservations', false]]
|
21
|
+
|
22
|
+
= f.radios :reservations, reservations,
|
23
|
+
label: "Do you have any reservations about the applicant?", inline: true, required: true
|
24
|
+
|
25
|
+
= f.show_if :reservations, true do
|
26
|
+
= f.text_area :reservations_reason,
|
27
|
+
label: 'Please provide a brief but candid explanation of your reservations'
|
28
|
+
|
29
|
+
.mt-4
|
30
|
+
|
31
|
+
= f.text_area :work_history,
|
32
|
+
label: "Work History - Please provide information on the applicant's work history and work ethic",
|
33
|
+
hint: "If you are an employer or supervisor please provide information on the term of employment, the responsibilities of the position, and any significant projects undertaken by the individual of which you are aware or with which you have been involved."
|
34
|
+
|
35
|
+
= f.check_box :accept_declaration, label: 'Yes, I declare that the above information is true and accurate'
|
36
|
+
|
37
|
+
= f.submit 'Complete Reference'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.effective-applicant
|
2
|
+
- blacklist = EffectiveMemberships.Applicant.required_wizard_steps
|
3
|
+
- steps = applicant.required_steps - blacklist
|
4
|
+
|
5
|
+
- steps.select { |step| applicant.has_completed_step?(step) }.each do |partial|
|
6
|
+
= render "effective/applicants/#{partial}", applicant: applicant, step: partial
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- all_steps_content = resource.category&.rich_text_applicant_all_steps_content
|
2
|
+
- step_content = resource.category&.send("rich_text_applicant_#{step}_content")
|
3
|
+
|
4
|
+
- if all_steps_content.present?
|
5
|
+
.card
|
6
|
+
.card-body= all_steps_content
|
7
|
+
|
8
|
+
- if step_content.present?
|
9
|
+
.card
|
10
|
+
.card-body= step_content
|
@@ -0,0 +1,19 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
|
10
|
+
- applicant.applicant_course_areas_collection.each do |area|
|
11
|
+
- datatable = EffectiveApplicantCoursesDatatable.new(applicant_id: applicant.id, 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')}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- authorized = EffectiveResources.authorized?(self, :new, EffectiveMemberships.Applicant)
|
2
|
+
- datatable = EffectiveResources.best('EffectiveApplicantsDatatable').new(self)
|
3
|
+
- in_progress = current_user.effective_memberships_owner.applicants.in_progress
|
4
|
+
|
5
|
+
- if in_progress.present?
|
6
|
+
%h2 Active Applications
|
7
|
+
|
8
|
+
- in_progress.each do |applicant|
|
9
|
+
= render 'effective/applicants/summary', applicant: applicant
|
10
|
+
|
11
|
+
%h2 Application History
|
12
|
+
|
13
|
+
- if datatable.present?
|
14
|
+
= render_simple_datatable(datatable)
|
15
|
+
- else
|
16
|
+
%p You have not yet created any applications. When you do, we'll show them here.
|
17
|
+
|
18
|
+
- if authorized && in_progress.blank?
|
19
|
+
%p= link_to 'Apply to join, reclassify, or provide a change of status notification', effective_memberships.new_applicant_path, class: 'btn btn-primary'
|
@@ -0,0 +1,16 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
%table.table
|
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
|
@@ -0,0 +1,9 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
= render 'effective/applicants/demographics_owner', applicant: applicant, owner: applicant.owner
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if f.object.respond_to?(:first_name)
|
2
|
+
= f.text_field :first_name
|
3
|
+
|
4
|
+
- if f.object.respond_to?(:last_name)
|
5
|
+
= f.text_field :last_name
|
6
|
+
|
7
|
+
- if f.object.respond_to?(:date_of_birth)
|
8
|
+
= f.date_field :date_of_birth
|
9
|
+
|
10
|
+
- if f.object.respond_to?(:phone)
|
11
|
+
= f.tel_field :phone
|
@@ -0,0 +1,20 @@
|
|
1
|
+
%table.table
|
2
|
+
%tbody
|
3
|
+
%tr
|
4
|
+
%th Name
|
5
|
+
%td= owner.to_s
|
6
|
+
|
7
|
+
- if owner.respond_to?(:email) && owner.email.present?
|
8
|
+
%tr
|
9
|
+
%th Email
|
10
|
+
%td= mail_to owner.email
|
11
|
+
|
12
|
+
- if owner.respond_to?(:date_of_birth) && owner.date_of_birth.present?
|
13
|
+
%tr
|
14
|
+
%th Date of Birth
|
15
|
+
%td= owner.date_of_birth.strftime('%F')
|
16
|
+
|
17
|
+
- if owner.respond_to?(:phone) && owner.phone.present?
|
18
|
+
%tr
|
19
|
+
%th Phone:
|
20
|
+
%td= owner.phone
|
@@ -0,0 +1,14 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
- datatable = EffectiveApplicantEducationsDatatable.new(applicant_id: applicant.id)
|
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)
|
@@ -0,0 +1,28 @@
|
|
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_applicants_wizard?
|
8
|
+
|
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
|
18
|
+
|
19
|
+
%tr
|
20
|
+
%th Total Months
|
21
|
+
%td= applicant.applicant_experiences_months
|
22
|
+
|
23
|
+
- datatable = EffectiveApplicantExperiencesDatatable.new(applicant_id: applicant.id)
|
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)
|
@@ -0,0 +1,27 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
%table.table
|
10
|
+
%tbody
|
11
|
+
- applicant.applicant_files.each do |file|
|
12
|
+
|
13
|
+
- url = url_for(file)
|
14
|
+
- title = file.filename.to_s
|
15
|
+
|
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
|
19
|
+
|
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
|
@@ -0,0 +1,15 @@
|
|
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_applicants_wizard?
|
8
|
+
|
9
|
+
- applicant.applicant_references.each_with_index do |applicant_reference, index|
|
10
|
+
- if index > 0
|
11
|
+
.mb-4
|
12
|
+
|
13
|
+
%h6 Reference ##{index + 1}
|
14
|
+
|
15
|
+
= render('effective/applicant_references/applicant_reference', applicant_reference: applicant_reference)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
%table.table.table-sm
|
2
|
+
%tbody
|
3
|
+
%tr
|
4
|
+
%th.border-0 Applicant
|
5
|
+
%td.border-0
|
6
|
+
= applicant.owner.to_s
|
7
|
+
%br
|
8
|
+
= mail_to(applicant.owner.email)
|
9
|
+
|
10
|
+
- if request.path.start_with?('/admin')
|
11
|
+
%tr
|
12
|
+
%th= applicant.owner_label
|
13
|
+
%td
|
14
|
+
- url = (polymorphic_admin_path(applicant.owner) rescue "/admin/users/#{applicant.owner.to_param}/edit")
|
15
|
+
= link_to(applicant.owner, url)
|
16
|
+
|
17
|
+
- if applicant.from_category.present?
|
18
|
+
%tr
|
19
|
+
%th From Category
|
20
|
+
%td= applicant.from_category
|
21
|
+
|
22
|
+
%tr
|
23
|
+
%th Category
|
24
|
+
%td
|
25
|
+
= applicant.applicant_type
|
26
|
+
%br
|
27
|
+
= applicant.category
|
28
|
+
|
29
|
+
- if applicant.orders.present?
|
30
|
+
%tr
|
31
|
+
%th Orders
|
32
|
+
%td
|
33
|
+
- applicant.orders.each do |order|
|
34
|
+
= link_to(order, effective_orders.order_path(order))
|
35
|
+
|
36
|
+
%tr
|
37
|
+
%th Status
|
38
|
+
%td
|
39
|
+
%span.badge.badge-secondary= applicant.status
|
40
|
+
= applicant.summary
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
- raise('expected owner to respond to billing_address') unless resource.owner.respond_to?(:billing_address)
|
5
|
+
|
6
|
+
.card
|
7
|
+
.card-body
|
8
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
9
|
+
= f.hidden_field :id
|
10
|
+
|
11
|
+
= f.fields_for(:owner, f.object.owner) do |fu|
|
12
|
+
= effective_address_fields(fu, :billing)
|
13
|
+
|
14
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
= render_checkout_step2(resource.submit_order, purchased_url: wizard_path(:submitted), deferred_url: wizard_path(:checkout), declined_url: wizard_path(:checkout))
|
@@ -0,0 +1,50 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
- if resource.min_applicant_courses > 0
|
7
|
+
.alert.alert-danger You must include #{resource.min_applicant_courses} or more courses.
|
8
|
+
|
9
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
10
|
+
= f.hidden_field :id
|
11
|
+
|
12
|
+
.applicant-courses-sum
|
13
|
+
Total Courses:
|
14
|
+
%span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
|
15
|
+
|
16
|
+
- f.object.applicant_course_areas_collection.each do |area|
|
17
|
+
.applicant-course-area.my-4
|
18
|
+
%h2= area
|
19
|
+
|
20
|
+
- if area.body.present?
|
21
|
+
%p= area.body
|
22
|
+
|
23
|
+
%table.table.table-sm.table-borderless.table-courses
|
24
|
+
%tbody
|
25
|
+
- area.applicant_course_names.each do |applicant_course_name|
|
26
|
+
- applicant_course = f.object.applicant_course(applicant_course_name: applicant_course_name)
|
27
|
+
|
28
|
+
= f.fields_for(:applicant_courses, applicant_course) do |acf|
|
29
|
+
%tr
|
30
|
+
%th.table-courses-course-name= applicant_course_name
|
31
|
+
%td
|
32
|
+
= acf.number_field :amount, label: false, required: false, 'data-applicant-courses-amount': true, class: 'col-3'
|
33
|
+
= acf.hidden_field :applicant_course_name_id, value: applicant_course_name.id
|
34
|
+
|
35
|
+
%tfoot
|
36
|
+
%tr
|
37
|
+
%th.table-courses-course-name Total #{area}
|
38
|
+
%td
|
39
|
+
%span{'data-applicant-course-area-sum': true}= f.object.applicant_course_area_sum(applicant_course_area: area)
|
40
|
+
|
41
|
+
.applicant-courses-sum.my-2
|
42
|
+
%h2 Total
|
43
|
+
.row
|
44
|
+
.col
|
45
|
+
%p Total Courses:
|
46
|
+
%span{'data-applicant-courses-sum': true}= f.object.applicant_courses_sum
|
47
|
+
.col
|
48
|
+
= f.static_field :min_applicant_courses, label: 'Required Courses'
|
49
|
+
|
50
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
- completed = resource.has_completed_step?(:declarations)
|
5
|
+
- resource.declare_code_of_ethics = completed
|
6
|
+
- resource.declare_truth = completed
|
7
|
+
|
8
|
+
.card
|
9
|
+
.card-body
|
10
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
11
|
+
= f.hidden_field :id
|
12
|
+
|
13
|
+
= f.check_box :declare_code_of_ethics,
|
14
|
+
label: 'Yes, I hereby certify that I have read and will adhere to the Code of Ethics'
|
15
|
+
|
16
|
+
= f.check_box :declare_truth,
|
17
|
+
label: 'Yes, I hereby certify that the statements and information contained herein are correct'
|
18
|
+
|
19
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
|
3
|
+
= render 'effective/applicants/content', resource: resource
|
4
|
+
|
5
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
6
|
+
= f.hidden_field :id
|
7
|
+
|
8
|
+
= f.fields_for(:owner, f.object.owner) do |fu|
|
9
|
+
= render 'effective/applicants/demographics_fields', f: fu
|
10
|
+
|
11
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
- if resource.min_applicant_educations > 0
|
7
|
+
.alert.alert-danger You must include #{resource.min_applicant_educations} or more post-secondary educations.
|
8
|
+
|
9
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
10
|
+
= f.hidden_field :id
|
11
|
+
|
12
|
+
= f.has_many(:applicant_educations, cards: true) do |aef|
|
13
|
+
%h4 Post-Secondary Education
|
14
|
+
|
15
|
+
.row
|
16
|
+
.col= aef.text_field :institution
|
17
|
+
.col= aef.text_field :location
|
18
|
+
|
19
|
+
.row
|
20
|
+
.col= aef.date_field :start_on, label: 'Start Date'
|
21
|
+
.col= aef.date_field :end_on, label: 'End Date'
|
22
|
+
|
23
|
+
= aef.text_field :degree_obtained, label: 'Degree or diploma obtained'
|
24
|
+
|
25
|
+
/= f.text_area :applicant_educations_details, label: 'Additional Education Details'
|
26
|
+
|
27
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,51 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
- if resource.min_applicant_educations > 0
|
7
|
+
%p You must include #{resource.min_applicant_experiences_months} or more months of experience.
|
8
|
+
|
9
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
10
|
+
= f.hidden_field :id
|
11
|
+
= f.error :applicant_experiences
|
12
|
+
= f.error :applicant_experiences_months
|
13
|
+
|
14
|
+
= f.has_many(:applicant_experiences, cards: true) do |aef|
|
15
|
+
%h4 Work Experience
|
16
|
+
|
17
|
+
.row
|
18
|
+
.col= aef.text_field :employer
|
19
|
+
.col= aef.text_field :position, label: 'Position Title'
|
20
|
+
|
21
|
+
.row
|
22
|
+
.col= aef.date_field :start_on, label: 'Start Date', 'data-applicant-experiences-month': true
|
23
|
+
.col
|
24
|
+
= aef.date_field :end_on, label: 'End Date', 'data-applicant-experiences-month': true
|
25
|
+
= aef.check_box :still_work_here, label: 'I still work here'
|
26
|
+
|
27
|
+
.row
|
28
|
+
.col
|
29
|
+
= aef.radios :level, aef.object.class.const_get(:LEVELS), inline: true,
|
30
|
+
label: 'Employment', 'data-applicant-experiences-month': true
|
31
|
+
|
32
|
+
= aef.show_if :level, 'Part Time' do
|
33
|
+
= aef.percent_field :percent_worked, label: 'Percent time worked',
|
34
|
+
hint: 'required when part time', 'data-applicant-experiences-month': true
|
35
|
+
|
36
|
+
.col= aef.static_field :months, label: 'Calculated Months', value: aef.object.months.to_i
|
37
|
+
|
38
|
+
= aef.text_area :tasks_performed, class: 'mb-0'
|
39
|
+
|
40
|
+
%h3 Total Months
|
41
|
+
.row
|
42
|
+
.col= f.static_field :applicant_experiences_months, label: 'Entered Months', value: f.object.applicant_experiences_months.to_i
|
43
|
+
.col
|
44
|
+
= f.static_field :min_applicant_experiences_months, label: 'Required Months' do
|
45
|
+
#{f.object.min_applicant_experiences_months} months, or #{f.object.min_applicant_experiences_months / 12} years
|
46
|
+
|
47
|
+
= f.error :applicant_experiences_months
|
48
|
+
|
49
|
+
/= f.text_area :applicant_experiences_details, label: 'Additional Experiences Details'
|
50
|
+
|
51
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
- if resource.min_applicant_files > 0
|
7
|
+
%p You must include #{resource.min_applicant_files} or more files.
|
8
|
+
|
9
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
10
|
+
= f.hidden_field :id
|
11
|
+
|
12
|
+
= f.file_field :applicant_files, attachment_style: :table
|
13
|
+
|
14
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
.card
|
5
|
+
.card-body
|
6
|
+
- if resource.min_applicant_references > 0
|
7
|
+
.alert.alert-danger You must include #{resource.min_applicant_references} or more references.
|
8
|
+
|
9
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
10
|
+
= f.hidden_field :id
|
11
|
+
|
12
|
+
= f.has_many(:applicant_references, cards: true) do |arf|
|
13
|
+
%h4 Reference
|
14
|
+
|
15
|
+
= arf.text_field :name, label: 'Full Name'
|
16
|
+
.row
|
17
|
+
.col= arf.email_field :email
|
18
|
+
.col= arf.tel_field :phone
|
19
|
+
|
20
|
+
.row
|
21
|
+
.col= arf.select :relationship, Effective::ApplicantReference::RELATIONSHIPS
|
22
|
+
.col= arf.select :known, Effective::ApplicantReference::KNOWNS, label: 'Known for'
|
23
|
+
|
24
|
+
= f.save 'Save and Continue'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
= render 'layout' do
|
2
|
+
= render 'effective/applicants/content', resource: resource
|
3
|
+
|
4
|
+
- categories = resource.can_apply_categories_collection()
|
5
|
+
|
6
|
+
.card
|
7
|
+
.card-body
|
8
|
+
- if categories.blank?
|
9
|
+
%p
|
10
|
+
There are no categories available for you to apply for.
|
11
|
+
Please contact us if you believe this is in error.
|
12
|
+
|
13
|
+
- if categories.present?
|
14
|
+
%p Please select a category to continue.
|
15
|
+
|
16
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
17
|
+
= f.hidden_field :id
|
18
|
+
|
19
|
+
= f.select :category_id, categories, required: true
|
20
|
+
|
21
|
+
- categories.each do |mc|
|
22
|
+
= f.show_if(:category_id, mc.id) do
|
23
|
+
.my-4
|
24
|
+
%h3= mc.to_s
|
25
|
+
= mc.rich_text_body
|
26
|
+
|
27
|
+
= f.save 'Save and Continue'
|