effective_memberships 0.5.2 → 0.6.0
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/admin/categories/_form_applicant_content.html.haml +8 -4
- data/app/views/admin/categories/_form_category.html.haml +4 -2
- data/app/views/admin/categories/_form_fee_payment_content.html.haml +8 -4
- 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: 3e0fe5390c8126df8c148cf4d031bf4611cc202acf55414f3da855a07e89a60a
|
4
|
+
data.tar.gz: 8ce7268567f65358a1dd806f689e6f31eb323f6f26ca7f1c7e82a13506faab6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a658433b5659a0cd35c3f311bb6da56ff909ec0d3aa9a10e9aea337496e4b81935f9329bcdc87080d8ddbec6ae4d45eec8baa7b5e33568864b07b573ab3a5bb
|
7
|
+
data.tar.gz: 329b5687fe923fd2e8e1820c84623d74dbfcf2ce3e6b5b4cc99df14ae55d4c1bf26ef76b1ce027e7db203cbce1fd828d4955d262651c59ee449101d0df485a78
|
@@ -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
|
@@ -2,8 +2,10 @@
|
|
2
2
|
|
3
3
|
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
4
4
|
= card("All Steps") do
|
5
|
-
|
6
|
-
hint: "displayed on all steps"
|
5
|
+
- if defined?(EffectiveArticleEditor)
|
6
|
+
= f.article_editor "rich_text_applicant_all_steps_content", label: false, hint: "displayed on all steps"
|
7
|
+
- else
|
8
|
+
= f.rich_text_area "rich_text_applicant_all_steps_content", label: false, hint: "displayed on all steps"
|
7
9
|
|
8
10
|
%hr
|
9
11
|
|
@@ -13,7 +15,9 @@
|
|
13
15
|
- next unless enabled.include?(step)
|
14
16
|
|
15
17
|
= card("#{title}") do
|
16
|
-
|
17
|
-
hint: "displayed on the applicant #{step} wizard step only"
|
18
|
+
- if defined?(EffectiveArticleEditor)
|
19
|
+
= f.article_editor "rich_text_applicant_#{step}_content", label: false, hint: "displayed on the applicant #{step} wizard step only"
|
20
|
+
- else
|
21
|
+
= f.rich_text_area "rich_text_applicant_#{step}_content", label: false, hint: "displayed on the applicant #{step} wizard step only"
|
18
22
|
|
19
23
|
= f.submit
|
@@ -7,7 +7,9 @@
|
|
7
7
|
- if f.object.class.categories.present?
|
8
8
|
= f.select :category, f.object.class.categories
|
9
9
|
|
10
|
-
|
11
|
-
hint: 'A quick description of this category. It is displayed on the Application Select Category step.'
|
10
|
+
- if defined?(EffectiveArticleEditor)
|
11
|
+
= f.article_editor :rich_text_body, label: 'Body', hint: 'A quick description of this category. It is displayed on the Application Select Category step.'
|
12
|
+
- else
|
13
|
+
= f.rich_text_area :rich_text_body, label: 'Body', hint: 'A quick description of this category. It is displayed on the Application Select Category step.'
|
12
14
|
|
13
15
|
= f.submit
|
@@ -2,8 +2,10 @@
|
|
2
2
|
|
3
3
|
= effective_form_with(model: [:admin, category], engine: true) do |f|
|
4
4
|
= card("All Steps") do
|
5
|
-
|
6
|
-
hint: "displayed on all steps"
|
5
|
+
- if defined?(EffectiveArticleEditor)
|
6
|
+
= f.article_editor "rich_text_fee_payment_all_steps_content", label: false, hint: "displayed on all steps"
|
7
|
+
- else
|
8
|
+
= f.rich_text_area "rich_text_fee_payment_all_steps_content", label: false, hint: "displayed on all steps"
|
7
9
|
|
8
10
|
%hr
|
9
11
|
|
@@ -13,7 +15,9 @@
|
|
13
15
|
- next unless enabled.include?(step)
|
14
16
|
|
15
17
|
= card("#{title}") do
|
16
|
-
|
17
|
-
hint: "displayed on the fee payment #{step} wizard step only"
|
18
|
+
- if defined?(EffectiveArticleEditor)
|
19
|
+
= f.article_editor "rich_text_fee_payment_#{step}_content", label: false, hint: "displayed on the fee payment #{step} wizard step only"
|
20
|
+
- else
|
21
|
+
= f.rich_text_area "rich_text_fee_payment_#{step}_content", label: false, hint: "displayed on the fee payment #{step} wizard step only"
|
18
22
|
|
19
23
|
= f.submit
|
@@ -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.
|
4
|
+
version: 0.6.0
|
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-24 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
|