effective_memberships 0.5.2 → 0.5.3
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_endorsers_datatable.rb +20 -0
- data/app/models/concerns/effective_memberships_user.rb +4 -0
- data/app/models/effective/applicant_endorsement.rb +3 -0
- data/app/views/effective/applicant_endorsers/_dashboard.html.haml +10 -0
- data/lib/effective_memberships/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20013e5735497e62dd4c8224ef8fe0a97f9cc12d285871541cea4ceaefa13796
|
4
|
+
data.tar.gz: 0b652f51e8b7ac62c99c11b7a6a5fe6961e8b79a579048aaa7e06b8ad5dca204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde5324d4cadb8f64caca5fa6cc8eb0910015514df5bcad58170a78be4e27e736fcbd1d306b3fa19f919a49183d4a0e940b82b17d2f7401d6d87927b5c9a36b6
|
7
|
+
data.tar.gz: b3cd7c41dc00b22804ab6e8df8904807b0099758ce479807f682e2686cd5c64362fd0be534af0181868a29f8c2935e4f7dd7c72d6b1d2f3e56f78ebcc543d2c2
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# For the Endorser's dashboard to display endorsements to complete
|
2
|
+
class EffectiveApplicantEndorsersDatatable < Effective::Datatable
|
3
|
+
|
4
|
+
datatable do
|
5
|
+
length :all
|
6
|
+
|
7
|
+
col :created_at
|
8
|
+
col :applicant
|
9
|
+
|
10
|
+
actions_col do |applicant_endorsement|
|
11
|
+
dropdown_link_to 'Show', effective_memberships.applicant_endorsement_path(applicant_endorsement)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
collection do
|
17
|
+
Effective::ApplicantEndorsement.deep.needs_endorser.where(endorser: current_user)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -28,6 +28,10 @@ module EffectiveMembershipsUser
|
|
28
28
|
|
29
29
|
accepts_nested_attributes_for :representatives, allow_destroy: true
|
30
30
|
|
31
|
+
# I'm an endorser for these
|
32
|
+
has_many :applicant_endorsements, -> { Effective::ApplicantEndorsement.sorted },
|
33
|
+
class_name: 'Effective::ApplicantEndorsement', inverse_of: :endorser, as: :endorser, dependent: :nullify
|
34
|
+
|
31
35
|
scope :membership_applying, -> {
|
32
36
|
applicants = EffectiveMemberships.Applicant.all
|
33
37
|
without_role(:member).where(id: applicants.select(:user_id))
|
@@ -39,6 +39,9 @@ module Effective
|
|
39
39
|
end
|
40
40
|
|
41
41
|
scope :deep, -> { all }
|
42
|
+
scope :sorted, -> { order(:id) }
|
43
|
+
|
44
|
+
scope :needs_endorser, -> { where(status: :submitted).where(applicant_id: EffectiveMemberships.Applicant.not_draft) }
|
42
45
|
|
43
46
|
# All step validations
|
44
47
|
validates :applicant, presence: true
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- datatable = EffectiveApplicantEndorsersDatatable.new(self, endorser: current_user)
|
2
|
+
|
3
|
+
%h2 Endorsements
|
4
|
+
|
5
|
+
- if datatable.present?
|
6
|
+
%p Your endorsement has been requested on the following applicants:
|
7
|
+
= render_simple_datatable(datatable)
|
8
|
+
|
9
|
+
- else
|
10
|
+
%p There are no applicant endorsements to complete.
|
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.5.
|
4
|
+
version: 0.5.3
|
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-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -292,6 +292,7 @@ files:
|
|
292
292
|
- app/datatables/effective_applicant_courses_datatable.rb
|
293
293
|
- app/datatables/effective_applicant_educations_datatable.rb
|
294
294
|
- app/datatables/effective_applicant_endorsements_datatable.rb
|
295
|
+
- app/datatables/effective_applicant_endorsers_datatable.rb
|
295
296
|
- app/datatables/effective_applicant_equivalences_datatable.rb
|
296
297
|
- app/datatables/effective_applicant_experiences_datatable.rb
|
297
298
|
- app/datatables/effective_applicant_references_datatable.rb
|
@@ -391,6 +392,7 @@ files:
|
|
391
392
|
- app/views/effective/applicant_endorsements/_form_declaration.html.haml
|
392
393
|
- app/views/effective/applicant_endorsements/complete.html.haml
|
393
394
|
- app/views/effective/applicant_endorsements/edit.html.haml
|
395
|
+
- app/views/effective/applicant_endorsers/_dashboard.html.haml
|
394
396
|
- app/views/effective/applicant_references/_applicant_reference.html.haml
|
395
397
|
- app/views/effective/applicant_references/_datatable_actions.html.haml
|
396
398
|
- app/views/effective/applicant_references/_form.html.haml
|