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,34 @@
|
|
1
|
+
= effective_form_with(model: [:admin, applicant], engine: true) do |f|
|
2
|
+
%p The #{applicant} will be <strong>approved</strong> to the following membership category.
|
3
|
+
|
4
|
+
%h3 Category
|
5
|
+
= f.static_field :category, label: 'Applied for'
|
6
|
+
|
7
|
+
- categories = EffectiveMemberships.Category.all
|
8
|
+
= f.select :category_id, categories, label: 'Approve to'
|
9
|
+
|
10
|
+
%h3 Number
|
11
|
+
%p
|
12
|
+
- if applicant.owner.membership&.number_was.present?
|
13
|
+
The member will keep their existing membership number: #{applicant.owner.membership.number}.
|
14
|
+
- else
|
15
|
+
- number = EffectiveMemberships.Registrar.next_membership_number(applicant.owner, to: applicant.category)
|
16
|
+
= f.text_field :approved_membership_number, hint: "leave blank to assign the next number: #{number}."
|
17
|
+
|
18
|
+
%h3 Fees
|
19
|
+
%p The following fee(s) will be created:
|
20
|
+
- month = Time.zone.now.strftime('%B')
|
21
|
+
|
22
|
+
%ul
|
23
|
+
- if applicant.apply_to_join?
|
24
|
+
%li A #{month} prorated fee
|
25
|
+
|
26
|
+
- if applicant.reclassification?
|
27
|
+
%li A #{month} prorated fee to the new category
|
28
|
+
%li A #{month} discount fee from their old category
|
29
|
+
|
30
|
+
%h3 Email to send
|
31
|
+
%p The following email will be sent:
|
32
|
+
= email_form_fields(f, :applicant_approved)
|
33
|
+
|
34
|
+
= f.submit 'Approve Applicant', border: false, center: true, 'data-confirm': "Approve #{f.object.owner}?"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= effective_form_with(model: [:admin, applicant], engine: true) do |f|
|
2
|
+
%p This applicant will be <strong>declined</strong> with the following reason:
|
3
|
+
|
4
|
+
= f.text_field :declined_reason, required: true, label: 'Reason for decline'
|
5
|
+
|
6
|
+
%h3 Email to send
|
7
|
+
|
8
|
+
%p The following email will be sent:
|
9
|
+
= email_form_fields(f, :applicant_declined)
|
10
|
+
|
11
|
+
= f.submit 'Decline Applicant', border: false, center: true, 'data-confirm': "Decline #{f.object.owner}?"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
%p
|
2
|
+
%span.badge.badge-secondary= applicant.status
|
3
|
+
= applicant.summary
|
4
|
+
|
5
|
+
= tabs(list: { class: 'nav nav-pills'}) do
|
6
|
+
- if EffectiveResources.authorized?(self, :approve, applicant)
|
7
|
+
= tab 'Approve this Applicant' do
|
8
|
+
.card.mt-4
|
9
|
+
.card-body
|
10
|
+
%h5.card-title Approve
|
11
|
+
= render('admin/applicants/form_approve', applicant: applicant)
|
12
|
+
|
13
|
+
- if EffectiveResources.authorized?(self, :decline, applicant)
|
14
|
+
= tab 'Decline this Applicant' do
|
15
|
+
.card.mt-4
|
16
|
+
.card-body
|
17
|
+
%h5.card-title Decline
|
18
|
+
= render('admin/applicants/form_decline', applicant: applicant)
|
@@ -0,0 +1,133 @@
|
|
1
|
+
%p
|
2
|
+
%span.badge.badge-secondary= applicant.status_was
|
3
|
+
= applicant.summary
|
4
|
+
|
5
|
+
%table.table.table-striped
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
%th Status
|
9
|
+
%th Date Reached
|
10
|
+
%th Details
|
11
|
+
%th
|
12
|
+
- # Next action button
|
13
|
+
%tbody
|
14
|
+
%tr
|
15
|
+
%td In Progress
|
16
|
+
%td= applicant.created_at.strftime('%F')
|
17
|
+
%td
|
18
|
+
- if applicant.was_submitted?
|
19
|
+
= icon('check', class: 'small-1')
|
20
|
+
Done
|
21
|
+
- else
|
22
|
+
= '-'
|
23
|
+
%td
|
24
|
+
%tr
|
25
|
+
%td Application Submitted
|
26
|
+
%td= applicant.submitted_at&.strftime('%F') || '-'
|
27
|
+
%td
|
28
|
+
- if applicant.submit_order.present?
|
29
|
+
= link_to(applicant.submit_order, effective_orders.admin_order_path(applicant.submit_order))
|
30
|
+
- else
|
31
|
+
= '-'
|
32
|
+
%td
|
33
|
+
%tr
|
34
|
+
%td Waiting to Complete
|
35
|
+
%td= applicant.submitted_at&.strftime('%F') || '-'
|
36
|
+
%td
|
37
|
+
- applicant.completed_requirements.each do |requirement, completed|
|
38
|
+
- next if requirement.to_s == 'Applicant References'
|
39
|
+
|
40
|
+
%p
|
41
|
+
= icon((completed ? 'check' : 'x'), class: 'small-1')
|
42
|
+
= requirement
|
43
|
+
|
44
|
+
- if applicant.applicant_references_required?
|
45
|
+
%p
|
46
|
+
- if applicant.completed_requirements['Applicant References']
|
47
|
+
= icon('check', class: 'small-1')
|
48
|
+
|
49
|
+
= applicant.applicant_references.count(&:completed?)
|
50
|
+
= '/'
|
51
|
+
= applicant.min_applicant_references
|
52
|
+
Required References Responded
|
53
|
+
- else
|
54
|
+
- if applicant.applicant_references.count(&:submitted?) > 0
|
55
|
+
%p
|
56
|
+
= applicant.applicant_references.count(&:submitted?)
|
57
|
+
= '/'
|
58
|
+
= applicant.applicant_references.count
|
59
|
+
References Responded
|
60
|
+
|
61
|
+
%p
|
62
|
+
= icon('check', class: 'small-1')
|
63
|
+
References Not Required
|
64
|
+
|
65
|
+
%td
|
66
|
+
-# - if !applicant.was_approved? && applicant.transcripts_required? && !applicant.transcripts_approved?
|
67
|
+
-# = link_to 'Process Transcripts', '#transcripts', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
68
|
+
|
69
|
+
-# - if !applicant.was_approved? && applicant.nwpta_form_required? && !applicant.nwpta_form_received?
|
70
|
+
-# = link_to 'Receive NWPTA Form', '#nwpta-verification-form', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
71
|
+
|
72
|
+
%tr
|
73
|
+
%td Application Complete
|
74
|
+
%td= applicant.completed_at&.strftime('%F') || '-'
|
75
|
+
%td
|
76
|
+
%td
|
77
|
+
|
78
|
+
%tr
|
79
|
+
%td Reviews
|
80
|
+
%td= applicant.reviewed_at&.strftime('%F') || '-'
|
81
|
+
%td
|
82
|
+
- applicant.reviewed_requirements.each do |requirement, completed|
|
83
|
+
- next if requirement.to_s == 'Applicant Reviews'
|
84
|
+
|
85
|
+
%p
|
86
|
+
= icon((completed ? 'check' : 'x'), class: 'small-1')
|
87
|
+
= requirement
|
88
|
+
|
89
|
+
- if applicant.applicant_reviews_required?
|
90
|
+
%p
|
91
|
+
- if applicant.reviewed_requirements['Applicant Reviews']
|
92
|
+
= icon('check', class: 'small-1')
|
93
|
+
|
94
|
+
= applicant.applicant_reviews.count(&:completed?)
|
95
|
+
= '/'
|
96
|
+
= applicant.min_applicant_reviews
|
97
|
+
Reviews Completed
|
98
|
+
- else
|
99
|
+
%p
|
100
|
+
= icon('check', class: 'small-1')
|
101
|
+
Reviews Not Required
|
102
|
+
|
103
|
+
%td
|
104
|
+
- if applicant.was_reviewed? && !applicant.was_approved?
|
105
|
+
= link_to 'Process Applicant', '#process', 'data-click-tab': true, class: 'btn btn-sm btn-primary'
|
106
|
+
|
107
|
+
- if applicant.declined_at.present?
|
108
|
+
%tr
|
109
|
+
%td Processed
|
110
|
+
%td= applicant.declined_at.strftime('%F')
|
111
|
+
%td
|
112
|
+
= icon('check', class: 'small-1')
|
113
|
+
Declined
|
114
|
+
%br
|
115
|
+
= applicant.declined_reason
|
116
|
+
%td
|
117
|
+
|
118
|
+
- if applicant.was_approved?
|
119
|
+
%tr
|
120
|
+
%td Processed
|
121
|
+
%td= applicant.approved_at&.strftime('%F')
|
122
|
+
%td
|
123
|
+
- if applicant.was_approved?
|
124
|
+
= icon('check', class: 'small-1')
|
125
|
+
Approved
|
126
|
+
- elsif applicant.declined?
|
127
|
+
= icon('check', class: 'small-1')
|
128
|
+
Declined
|
129
|
+
%br
|
130
|
+
= applicant.declined_reason
|
131
|
+
- else
|
132
|
+
= '-'
|
133
|
+
%td
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= tabs do
|
2
|
+
= tab 'Category' do
|
3
|
+
= render 'admin/categories/form_category', category: category
|
4
|
+
|
5
|
+
- if category.persisted?
|
6
|
+
= tab 'Applicants' do
|
7
|
+
= render 'admin/categories/form_applicant', category: category
|
8
|
+
|
9
|
+
= tab 'Fee Payments' do
|
10
|
+
= render 'admin/categories/form_fee_payment', category: category
|
11
|
+
|
12
|
+
- if category.respond_to?(:log_changes_datatable)
|
13
|
+
= tab 'Logs' do
|
14
|
+
= render_inline_datatable(category.log_changes_datatable)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= tabs do
|
2
|
+
= tab 'Eligibility' do
|
3
|
+
= render 'admin/categories/form_applicant_eligibility', category: category
|
4
|
+
|
5
|
+
= tab 'Fees' do
|
6
|
+
= render 'admin/categories/form_applicant_fees', category: category
|
7
|
+
|
8
|
+
= tab 'Applicant Steps' do
|
9
|
+
= render 'admin/categories/form_applicant_steps', category: category
|
10
|
+
|
11
|
+
= tab 'Applicant Content' do
|
12
|
+
= render 'admin/categories/form_applicant_content', category: category
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%p Each of the following content areas will be displayed on the applicant wizard.
|
2
|
+
|
3
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
4
|
+
= card("All Steps") do
|
5
|
+
= f.rich_text_area "rich_text_applicant_all_steps_content", label: false,
|
6
|
+
hint: "displayed on all steps"
|
7
|
+
|
8
|
+
%hr
|
9
|
+
|
10
|
+
- enabled = f.object.applicant_wizard_steps
|
11
|
+
|
12
|
+
- EffectiveMemberships.Applicant::WIZARD_STEPS.each do |step, title|
|
13
|
+
- next unless enabled.include?(step)
|
14
|
+
|
15
|
+
= card("#{title}") do
|
16
|
+
= f.rich_text_area "rich_text_applicant_#{step}_content", label: false,
|
17
|
+
hint: "displayed on the applicant #{step} wizard step only"
|
18
|
+
|
19
|
+
= f.submit
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
%h3 Eligibility
|
3
|
+
%p Please configure who may apply for this membership category.
|
4
|
+
|
5
|
+
= f.check_box :can_apply_new, label: 'Yes, new users may apply to join'
|
6
|
+
= f.check_box :can_apply_existing, label: 'Yes, existing members of any category may apply to join'
|
7
|
+
= f.check_box :can_apply_restricted, label: 'Only existing members of the following categories may apply to join'
|
8
|
+
|
9
|
+
= f.show_if(:can_apply_restricted, true) do
|
10
|
+
- categories = f.object.class.where.not(id: f.object)
|
11
|
+
= f.select :can_apply_restricted_ids, categories, label: 'Existing member categories'
|
12
|
+
|
13
|
+
= f.submit
|
@@ -0,0 +1,29 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
%h3 Fees
|
3
|
+
|
4
|
+
%p Charged to submit an application to join this membership category:
|
5
|
+
|
6
|
+
.row
|
7
|
+
.col-lg-3= f.price_field :applicant_fee
|
8
|
+
|
9
|
+
%p Charged to join, based on the month of approval:
|
10
|
+
|
11
|
+
.row
|
12
|
+
.col-lg-3
|
13
|
+
= f.price_field :prorated_jan, label: "January"
|
14
|
+
= f.price_field :prorated_feb, label: "February"
|
15
|
+
= f.price_field :prorated_mar, label: "March"
|
16
|
+
.col-lg-3
|
17
|
+
= f.price_field :prorated_apr, label: "April"
|
18
|
+
= f.price_field :prorated_may, label: "May"
|
19
|
+
= f.price_field :prorated_jun, label: "June"
|
20
|
+
.col-lg-3
|
21
|
+
= f.price_field :prorated_jul, label: "July"
|
22
|
+
= f.price_field :prorated_aug, label: "August"
|
23
|
+
= f.price_field :prorated_sep, label: "September"
|
24
|
+
.col-lg-3
|
25
|
+
= f.price_field :prorated_oct, label: "October"
|
26
|
+
= f.price_field :prorated_nov, label: "November"
|
27
|
+
= f.price_field :prorated_dec, label: "December"
|
28
|
+
|
29
|
+
= f.submit
|
@@ -0,0 +1,42 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
%h3 Wizard Steps
|
3
|
+
|
4
|
+
%p The following steps will be required when applying for this membership category.
|
5
|
+
|
6
|
+
- f.object.applicant_wizard_steps += EffectiveMemberships.Applicant.required_wizard_steps
|
7
|
+
= f.checks :applicant_wizard_steps, f.object.applicant_wizard_steps_collection()
|
8
|
+
|
9
|
+
%h3 Requirements
|
10
|
+
|
11
|
+
%p The following numbers set the minimum number of required items an applicant must provide to complete the step. Leave blank for none.
|
12
|
+
|
13
|
+
- applicant = EffectiveMemberships.Applicant.new
|
14
|
+
|
15
|
+
%table.table
|
16
|
+
%tbody
|
17
|
+
%tr
|
18
|
+
%td= applicant.wizard_step_title(:education)
|
19
|
+
%td= f.number_field :min_applicant_educations, label: false
|
20
|
+
%td minimum number of degrees
|
21
|
+
|
22
|
+
%tr
|
23
|
+
%td= applicant.wizard_step_title(:course_amounts)
|
24
|
+
%td= f.number_field :min_applicant_courses, label: false
|
25
|
+
%td minimum number of courses
|
26
|
+
|
27
|
+
%tr
|
28
|
+
%td= applicant.wizard_step_title(:experience)
|
29
|
+
%td= f.number_field :min_applicant_experiences_months, label: false
|
30
|
+
%td minimimum months of work experience
|
31
|
+
|
32
|
+
%tr
|
33
|
+
%td= applicant.wizard_step_title(:references)
|
34
|
+
%td= f.number_field :min_applicant_references, label: false
|
35
|
+
%td minimimum number of references
|
36
|
+
|
37
|
+
%tr
|
38
|
+
%td= applicant.wizard_step_title(:files)
|
39
|
+
%td= f.number_field :min_applicant_files, label: false
|
40
|
+
%td minimimum number of attached files
|
41
|
+
|
42
|
+
= f.submit
|
@@ -0,0 +1,10 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
= f.text_field :title
|
3
|
+
|
4
|
+
- if f.object.class.categories.present?
|
5
|
+
= f.select :category, f.object.class.categories
|
6
|
+
|
7
|
+
= f.rich_text_area :rich_text_body, label: 'Body',
|
8
|
+
hint: 'A quick description of this category. It is displayed on the Application Select Category step.'
|
9
|
+
|
10
|
+
= f.submit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= tabs do
|
2
|
+
= tab 'Renewals' do
|
3
|
+
= render 'admin/categories/form_renewals', category: category
|
4
|
+
|
5
|
+
= tab 'Fee Payment Steps' do
|
6
|
+
= render 'admin/categories/form_fee_payment_steps', category: category
|
7
|
+
|
8
|
+
= tab 'Fee Payment Content' do
|
9
|
+
= render 'admin/categories/form_fee_payment_content', category: category
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%p Each of the following content areas will be displayed on the fee payment wizard.
|
2
|
+
|
3
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
4
|
+
= card("All Steps") do
|
5
|
+
= f.rich_text_area "rich_text_fee_payment_all_steps_content", label: false,
|
6
|
+
hint: "displayed on all steps"
|
7
|
+
|
8
|
+
%hr
|
9
|
+
|
10
|
+
- enabled = f.object.fee_payment_wizard_steps
|
11
|
+
|
12
|
+
- EffectiveMemberships.FeePayment::WIZARD_STEPS.each do |step, title|
|
13
|
+
- next unless enabled.include?(step)
|
14
|
+
|
15
|
+
= card("#{title}") do
|
16
|
+
= f.rich_text_area "rich_text_fee_payment_#{step}_content", label: false,
|
17
|
+
hint: "displayed on the fee payment #{step} wizard step only"
|
18
|
+
|
19
|
+
= f.submit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
%h3 Wizard Steps
|
3
|
+
|
4
|
+
%p The following steps will be required when purchasing fees for this membership category.
|
5
|
+
|
6
|
+
- f.object.fee_payment_wizard_steps += EffectiveMemberships.FeePayment.required_wizard_steps
|
7
|
+
= f.checks :fee_payment_wizard_steps, f.object.fee_payment_wizard_steps_collection()
|
8
|
+
|
9
|
+
= f.submit
|
@@ -0,0 +1,32 @@
|
|
1
|
+
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
2
|
+
%h2 Renewals
|
3
|
+
|
4
|
+
%h3 Renewal Fees
|
5
|
+
= f.check_box :create_renewal_fees, label: 'Yes, renewal fees should be created'
|
6
|
+
|
7
|
+
= f.show_if(:create_renewal_fees, true) do
|
8
|
+
- date = EffectiveMemberships.Registrar.renewal_fee_date(date: Time.zone.now)
|
9
|
+
|
10
|
+
%p Charged to members, every #{date.strftime('%B %d')}, to renew their dues.
|
11
|
+
= f.price_field :renewal_fee
|
12
|
+
|
13
|
+
%h3 Late Fees
|
14
|
+
= f.check_box :create_late_fees, label: 'Yes, late fees should be created'
|
15
|
+
|
16
|
+
= f.show_if(:create_late_fees, true) do
|
17
|
+
- period = EffectiveMemberships.Registrar.current_period
|
18
|
+
- date = EffectiveMemberships.Registrar.late_fee_date(period: period)
|
19
|
+
|
20
|
+
%p Charged to members, on #{date.strftime('%B %d')}, with outstanding renewal fees
|
21
|
+
= f.price_field :late_fee
|
22
|
+
|
23
|
+
%h3 Bad Standing
|
24
|
+
= f.check_box :create_bad_standing, label: 'Yes, bad standing status should be applied'
|
25
|
+
|
26
|
+
= f.show_if(:create_bad_standing, true) do
|
27
|
+
- period = EffectiveMemberships.Registrar.current_period
|
28
|
+
- date = EffectiveMemberships.Registrar.bad_standing_date(period: period)
|
29
|
+
|
30
|
+
%p Members with outstanding fees, on #{date.strftime('%B %d')}, will automatically be marked in bad standing.
|
31
|
+
|
32
|
+
= effective_submit(f)
|
@@ -0,0 +1 @@
|
|
1
|
+
= render('effective/fees/fee', fee: fee, namespace: :admin)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= effective_form_with(model: [:admin, fee], engine: true) do |f|
|
2
|
+
- if inline_datatable?
|
3
|
+
= f.hidden_field :owner_id
|
4
|
+
= f.hidden_field :owner_type
|
5
|
+
- else
|
6
|
+
- raise('todo')
|
7
|
+
- collection = EffectiveMembershipsOwner.descendants.map { |d| [d.name.to_s, d.members.sorted] }.to_h
|
8
|
+
= f.select :owner_id, collection, polymorphic: true
|
9
|
+
|
10
|
+
= f.select :fee_type , EffectiveMemberships.custom_fee_types
|
11
|
+
= f.price_field :price
|
12
|
+
|
13
|
+
- if fee.new_record?
|
14
|
+
= effective_submit(f)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- registrar_action = Effective::RegistrarAction.new(current_user: current_user, owner: owner)
|
2
|
+
|
3
|
+
- if owner.membership.blank?
|
4
|
+
.mb-4= render 'admin/registrar_actions/form_register', registrar_action: registrar_action
|
5
|
+
|
6
|
+
- if owner.membership.present?
|
7
|
+
.mb-4= render 'admin/registrar_actions/form_reclassify', registrar_action: registrar_action
|
8
|
+
.mb-4= render 'admin/registrar_actions/form_bad_standing', registrar_action: registrar_action
|
9
|
+
.mb-4= render 'admin/registrar_actions/form_fees_paid', registrar_action: registrar_action
|
10
|
+
.mb-4= render 'admin/registrar_actions/form_remove', registrar_action: registrar_action
|
@@ -0,0 +1,43 @@
|
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h5.card-title Not In Good Standing
|
4
|
+
|
5
|
+
= effective_form_with(model: [:admin, registrar_action], url: effective_memberships.admin_registrar_actions_path) do |f|
|
6
|
+
= f.hidden_field :owner_id
|
7
|
+
= f.hidden_field :owner_type
|
8
|
+
|
9
|
+
- membership = f.object.owner.membership
|
10
|
+
|
11
|
+
- period = EffectiveMemberships.Registrar.current_period
|
12
|
+
- date = EffectiveMemberships.Registrar.bad_standing_date(period: period)
|
13
|
+
|
14
|
+
%p.text-muted
|
15
|
+
Members with outstanding renewal fees are automatically marked
|
16
|
+
not in good standing on #{date.strftime('%B %d')}.
|
17
|
+
The status is cleared when they pay their fees.
|
18
|
+
You can also mark a member as always not in good standing.
|
19
|
+
|
20
|
+
= f.static_field :current_action, label: 'Current Status' do
|
21
|
+
|
22
|
+
- if membership.bad_standing_admin?
|
23
|
+
In Bad Standing (set by an Admin) with the following reason: #{membership.bad_standing_reason}.
|
24
|
+
- elsif membership.bad_standing?
|
25
|
+
In Bad Standing with the following reason: #{membership.bad_standing_reason}.
|
26
|
+
- else
|
27
|
+
In Good Standing
|
28
|
+
|
29
|
+
- if membership.good_standing?
|
30
|
+
= f.check_box :current_action, label: 'Yes, set this member in bad standing'
|
31
|
+
|
32
|
+
= f.show_if :current_action, true do
|
33
|
+
= f.text_area :bad_standing_reason, required: true
|
34
|
+
|
35
|
+
= f.submit 'Set In Bad Standing', border: false, center: true,
|
36
|
+
'data-confirm': "Really set #{f.object.owner} in bad standing?"
|
37
|
+
|
38
|
+
- if membership.bad_standing_admin?
|
39
|
+
= f.check_box :current_action, label: 'Yes, remove in bad standing status'
|
40
|
+
|
41
|
+
= f.show_if :current_action, true do
|
42
|
+
= f.submit 'Remove In Bad Standing', border: false, center: true,
|
43
|
+
'data-confirm': "Really remove #{f.object.owner} bad standing?"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h5.card-title Mark Fees Paid
|
4
|
+
|
5
|
+
= effective_form_with(model: [:admin, registrar_action], url: effective_memberships.admin_registrar_actions_path) do |f|
|
6
|
+
= f.hidden_field :owner_id
|
7
|
+
= f.hidden_field :owner_type
|
8
|
+
|
9
|
+
%p.text-muted
|
10
|
+
This action will create and purchase an order containing all outstanding fee payment fees.
|
11
|
+
The member's fees paid through year will be updated to the current period.
|
12
|
+
No order receipts or other emails will be sent.
|
13
|
+
|
14
|
+
- fees = f.object.owner.outstanding_fee_payment_fees
|
15
|
+
|
16
|
+
.row
|
17
|
+
.col
|
18
|
+
= f.static_field :current_action, label: 'Current Fees' do
|
19
|
+
= pluralize(fees.length, 'outstanding fee')
|
20
|
+
|
21
|
+
.col
|
22
|
+
= f.static_field :current_action, label: 'Current Fees Paid Through' do
|
23
|
+
= f.object.owner.membership&.fees_paid_through_period&.strftime('%F') || 'None'
|
24
|
+
|
25
|
+
= f.check_box :current_action, label: 'Yes, mark this members fees paid in full'
|
26
|
+
|
27
|
+
= f.show_if :current_action, true do
|
28
|
+
|
29
|
+
= f.submit 'Mark Fees Paid', border: false, center: true,
|
30
|
+
'data-confirm': "Really mark #{f.object.owner} fees paid?"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h5.card-title Reclassification
|
4
|
+
|
5
|
+
= effective_form_with(model: [:admin, registrar_action], url: effective_memberships.admin_registrar_actions_path) do |f|
|
6
|
+
= f.hidden_field :owner_id
|
7
|
+
= f.hidden_field :owner_type
|
8
|
+
|
9
|
+
- membership = f.object.owner.membership
|
10
|
+
|
11
|
+
- period = EffectiveMemberships.Registrar.current_period
|
12
|
+
- date = EffectiveMemberships.Registrar.bad_standing_date(period: period)
|
13
|
+
|
14
|
+
%p.text-muted
|
15
|
+
Change a member's existing category and optionally create fees.
|
16
|
+
|
17
|
+
= f.static_field :current_action, label: 'Current Category' do
|
18
|
+
= membership.category.to_s
|
19
|
+
|
20
|
+
= f.check_box :current_action, label: 'Yes, reclassify this member to another category'
|
21
|
+
|
22
|
+
= f.show_if :current_action, true do
|
23
|
+
%p The member will keep their existing membership number: #{membership.number}.
|
24
|
+
|
25
|
+
- categories = EffectiveMemberships.Category.all.where.not(id: membership.category_id)
|
26
|
+
= f.select :category_id, categories, label: 'Reclassify to', required: true
|
27
|
+
|
28
|
+
= f.check_box :skip_fees, label: 'Yes, skip creating fees and just set the category'
|
29
|
+
|
30
|
+
= f.hide_if :skip_fees, true do
|
31
|
+
%p The following fee(s) will be created:
|
32
|
+
- month = Time.zone.now.strftime('%B')
|
33
|
+
|
34
|
+
%ul
|
35
|
+
%li A #{month} prorated fee to the new category
|
36
|
+
%li A #{month} discount fee from their old category
|
37
|
+
|
38
|
+
%p The member will be required to return to the website and make a fee payment
|
39
|
+
|
40
|
+
= f.show_if :skip_fees, true do
|
41
|
+
%p No fees will be created
|
42
|
+
|
43
|
+
= f.submit 'Reclassify', border: false, center: true, 'data-confirm': "Really reclassify #{f.object.owner}?"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h5.card-title Register
|
4
|
+
|
5
|
+
= effective_form_with(model: [:admin, registrar_action], url: effective_memberships.admin_registrar_actions_path) do |f|
|
6
|
+
= f.hidden_field :owner_id
|
7
|
+
= f.hidden_field :owner_type
|
8
|
+
|
9
|
+
- period = EffectiveMemberships.Registrar.current_period
|
10
|
+
|
11
|
+
%p.text-muted
|
12
|
+
Register into a new category and optionally create fees.
|
13
|
+
|
14
|
+
= f.static_field :current_action, label: 'Current Membership' do
|
15
|
+
None
|
16
|
+
|
17
|
+
= f.check_box :current_action, label: 'Yes, register to a membership'
|
18
|
+
|
19
|
+
= f.show_if :current_action, true do
|
20
|
+
- categories = EffectiveMemberships.Category.all
|
21
|
+
= f.select :category_id, categories, label: 'Register to'
|
22
|
+
|
23
|
+
= f.text_field :membership_number, hint: "leave blank to assign the next number"
|
24
|
+
|
25
|
+
= f.check_box :skip_fees, label: 'Yes, skip creating fees and just create the membership'
|
26
|
+
|
27
|
+
= f.hide_if :skip_fees, true do
|
28
|
+
%p The following fee(s) will be created:
|
29
|
+
- month = Time.zone.now.strftime('%B')
|
30
|
+
|
31
|
+
%ul
|
32
|
+
%li A #{month} prorated fee
|
33
|
+
|
34
|
+
%p The member will be required to return to the website and make a fee payment
|
35
|
+
|
36
|
+
= f.show_if :skip_fees, true do
|
37
|
+
%p
|
38
|
+
No fees will be created.
|
39
|
+
|
40
|
+
%p
|
41
|
+
The member's fees paid through will be set to the current period.
|
42
|
+
They will not be required to purchase a renewal fee until next period.
|
43
|
+
|
44
|
+
= f.submit 'Register', border: false, center: true, 'data-confirm': "Really register #{f.object.owner}?"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h5.card-title Remove
|
4
|
+
|
5
|
+
= effective_form_with(model: [:admin, registrar_action], url: effective_memberships.admin_registrar_actions_path) do |f|
|
6
|
+
= f.hidden_field :owner_id
|
7
|
+
= f.hidden_field :owner_type
|
8
|
+
|
9
|
+
%p.text-muted
|
10
|
+
This action will remove the membership and
|
11
|
+
delete any unpurchased fee payment fees and orders.
|
12
|
+
|
13
|
+
= f.check_box :current_action, label: 'Yes, remove this member'
|
14
|
+
|
15
|
+
= f.show_if :current_action, true do
|
16
|
+
= f.submit 'Remove', border: false, center: true,
|
17
|
+
'data-confirm': "Really remove #{f.object.owner}?"
|