effective_memberships 0.9.2 → 0.9.4
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/datatables/effective_applicant_reviews_datatable.rb +7 -1
- data/app/datatables/effective_available_applicant_reviews_datatable.rb +5 -2
- data/app/models/concerns/effective_memberships_applicant.rb +1 -1
- data/app/models/concerns/effective_memberships_applicant_review.rb +1 -1
- data/app/models/concerns/effective_memberships_fee_payment.rb +2 -2
- data/app/views/effective/applicant_reviews/_dashboard.html.haml +2 -2
- data/app/views/effective/applicant_reviews/_other_reviews.html.haml +7 -0
- data/app/views/effective/applicant_reviews/recommendation.html.haml +2 -0
- data/app/views/effective/applicant_reviews/review.html.haml +2 -0
- data/app/views/effective/applicant_reviews/submitted.html.haml +3 -1
- data/app/views/effective/applicants/submitted.html.haml +1 -1
- data/app/views/effective/fee_payments/submitted.html.haml +2 -2
- data/lib/effective_memberships/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 611d01eb6651211b44bbc681c6060aa4a74541a08ec9ac59d3b0d1972ceacbfc
|
|
4
|
+
data.tar.gz: 78796ebd87001ae6e9448f48892d61b034077637ceea0437084a259746824e57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60bd9e7864f520588a47b4ef69a9460c5cbadbc7fbd0718086566787a16e785348666e87c16c41a6e95826c6b4cd5b93a5c9c67a239b14a5ed82699681e6c279
|
|
7
|
+
data.tar.gz: 5032cf5a31bda06e919a7abc9009c00ae2d3fcaf25c2889453184839b625cdaa8987c88c95ae7c462c0fb501d6303126b1f2a0b8f14778bbb7d945d49574c9ff
|
|
@@ -6,15 +6,21 @@ class EffectiveApplicantReviewsDatatable < Effective::Datatable
|
|
|
6
6
|
col :created_at, visible: false
|
|
7
7
|
col :id, visible: false
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
val :applicant, search: :string
|
|
10
10
|
col :reviewer, visible: false
|
|
11
11
|
|
|
12
12
|
col :submitted_at, label: 'Reviewed', as: :date
|
|
13
|
+
|
|
14
|
+
col :reviews do |applicant_review|
|
|
15
|
+
pluralize(applicant_review.applicant.applicant_reviews.count { |review| review.submitted? }, 'review')
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
col :recommendation
|
|
14
19
|
col :comments
|
|
15
20
|
|
|
16
21
|
actions_col(show: false) do |applicant_review|
|
|
17
22
|
dropdown_link_to('Show', effective_memberships.applicant_applicant_review_path(applicant_review.applicant, applicant_review))
|
|
23
|
+
dropdown_link_to('Review Again', effective_memberships.new_applicant_applicant_review_path(applicant_review.applicant))
|
|
18
24
|
end
|
|
19
25
|
end
|
|
20
26
|
|
|
@@ -7,15 +7,18 @@ class EffectiveAvailableApplicantReviewsDatatable < Effective::Datatable
|
|
|
7
7
|
|
|
8
8
|
col :created_at, label: 'Created', as: :date, visible: false
|
|
9
9
|
col :updated_at, label: 'Updated', as: :date, visible: false
|
|
10
|
-
col :submitted_at, label: 'Submitted', as: :date, visible: false
|
|
11
10
|
|
|
12
11
|
# This is when they become available for review
|
|
13
|
-
col :
|
|
12
|
+
col :submitted_at, label: 'Submitted', as: :date
|
|
14
13
|
|
|
15
14
|
col :user
|
|
16
15
|
col :category, label: 'Category'
|
|
17
16
|
col :to_status, label: 'Status'
|
|
18
17
|
|
|
18
|
+
col :reviews do |applicant|
|
|
19
|
+
pluralize(applicant.applicant_reviews.count { |review| review.submitted? }, 'review')
|
|
20
|
+
end
|
|
21
|
+
|
|
19
22
|
actions_col(show: false) do |applicant|
|
|
20
23
|
applicant_review = applicant.applicant_review(reviewer: current_user)
|
|
21
24
|
|
|
@@ -187,7 +187,7 @@ module EffectiveMembershipsApplicant
|
|
|
187
187
|
|
|
188
188
|
scope :not_draft, -> { where.not(status: :draft) }
|
|
189
189
|
|
|
190
|
-
scope :reviewable, -> { where(status: :
|
|
190
|
+
scope :reviewable, -> { where.not(status: [:draft, :declined, :approved]) }
|
|
191
191
|
|
|
192
192
|
scope :for, -> (user) {
|
|
193
193
|
raise('expected a effective memberships user') unless user.class.try(:effective_memberships_user?)
|
|
@@ -59,7 +59,7 @@ module EffectiveMembershipsApplicantReview
|
|
|
59
59
|
timestamps
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
scope :deep, -> { includes(:reviewer, applicant: :user) }
|
|
62
|
+
scope :deep, -> { includes(:reviewer, applicant: [:user, :applicant_reviews]) }
|
|
63
63
|
|
|
64
64
|
scope :for, -> (user) {
|
|
65
65
|
raise('expected a effective memberships user') unless user.class.try(:effective_memberships_user?)
|
|
@@ -111,12 +111,12 @@ module EffectiveMembershipsFeePayment
|
|
|
111
111
|
|
|
112
112
|
# Sanity check validations. We should not have more than 1 in progress fee payment at a time
|
|
113
113
|
validate(if: -> { new_record? && user.present? }) do
|
|
114
|
-
existing = user.
|
|
114
|
+
existing = EffectiveMemberships.FeePayment.where(user: user).in_progress.first
|
|
115
115
|
self.errors.add(:base, 'please complete your existing fee payment first') if existing.present?
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
validate(if: -> { new_record? && organization.present? }) do
|
|
119
|
-
existing = organization.
|
|
119
|
+
existing = EffectiveMemberships.FeePayment.where(organization: organization).in_progress.first
|
|
120
120
|
self.errors.add(:base, 'please complete your existing fee payment first') if existing.present?
|
|
121
121
|
end
|
|
122
122
|
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
- if available.present?
|
|
27
27
|
%p The following applicants are available for your review:
|
|
28
28
|
|
|
29
|
-
=
|
|
29
|
+
= render_datatable(available, simple: true)
|
|
30
30
|
- else
|
|
31
31
|
%p There are no applicants available for your review. When there are, we'll show them here.
|
|
32
32
|
|
|
33
33
|
- if datatable.present?
|
|
34
34
|
.mt-4
|
|
35
35
|
%h2 Review History
|
|
36
|
-
= render_datatable(datatable
|
|
36
|
+
= render_datatable(datatable)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
- other_reviews = applicant_review.applicant.applicant_reviews.select { |review| review != applicant_review }
|
|
2
|
+
|
|
3
|
+
- if other_reviews.present?
|
|
4
|
+
.mb-4
|
|
5
|
+
= collapse('Show other reviews') do
|
|
6
|
+
- other_reviews.each do |applicant_review|
|
|
7
|
+
= render('effective/applicant_reviews/applicant_review', applicant_review: applicant_review)
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
= collapse('Show application...', card_class: 'my-2') do
|
|
9
9
|
= render 'effective/applicants/applicant', applicant: resource.applicant
|
|
10
10
|
|
|
11
|
+
= render 'effective/applicant_reviews/other_reviews', applicant_review: resource
|
|
12
|
+
|
|
11
13
|
= card('Recommendation') do
|
|
12
14
|
|
|
13
15
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
= render 'effective/applicants/summary', applicant: resource.applicant
|
|
6
6
|
= render 'effective/applicants/applicant', applicant: resource.applicant
|
|
7
7
|
|
|
8
|
+
= render 'effective/applicant_reviews/other_reviews', applicant_review: resource
|
|
9
|
+
|
|
8
10
|
= card do
|
|
9
11
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
10
12
|
= f.hidden_field :id
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
= collapse('Show application...', card_class: 'my-2') do
|
|
11
11
|
= render 'effective/applicants/applicant', applicant: resource.applicant
|
|
12
12
|
|
|
13
|
+
= render 'effective/applicant_reviews/other_reviews', applicant_review: resource
|
|
14
|
+
|
|
13
15
|
= render 'effective/applicant_reviews/applicant_review', applicant_review: resource
|
|
14
16
|
|
|
15
|
-
= link_to "Return to Dashboard",
|
|
17
|
+
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
= collapse('Show orders...', card_class: 'my-2') do
|
|
40
40
|
= render 'effective/applicants/orders', applicant: resource
|
|
41
41
|
|
|
42
|
-
= link_to "Return to Dashboard",
|
|
42
|
+
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.alert.alert-warning.mb-4
|
|
8
8
|
Successfully paid on #{resource.submit_order.purchased_at.strftime('%F')}.
|
|
9
9
|
|
|
10
|
-
= link_to "Return to Dashboard",
|
|
10
|
+
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
11
11
|
|
|
12
12
|
= card do
|
|
13
13
|
= render 'effective/fee_payments/summary', fee_payment: resource
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
= collapse('Show orders...', card_class: 'my-2') do
|
|
21
21
|
= render 'effective/fee_payments/orders', fee_payment: resource
|
|
22
22
|
|
|
23
|
-
= link_to "Return to Dashboard",
|
|
23
|
+
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
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.9.
|
|
4
|
+
version: 0.9.4
|
|
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-11-
|
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -407,6 +407,7 @@ files:
|
|
|
407
407
|
- app/views/effective/applicant_reviews/_content.html.haml
|
|
408
408
|
- app/views/effective/applicant_reviews/_dashboard.html.haml
|
|
409
409
|
- app/views/effective/applicant_reviews/_layout.html.haml
|
|
410
|
+
- app/views/effective/applicant_reviews/_other_reviews.html.haml
|
|
410
411
|
- app/views/effective/applicant_reviews/_recommendation.html.haml
|
|
411
412
|
- app/views/effective/applicant_reviews/_review.html.haml
|
|
412
413
|
- app/views/effective/applicant_reviews/recommendation.html.haml
|