effective_memberships 0.12.3 → 0.13.1
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/models/concerns/effective_memberships_directory.rb +9 -1
- data/app/models/concerns/effective_memberships_owner.rb +1 -0
- data/app/models/effective/fee.rb +4 -1
- data/app/views/admin/applicants/_fees_approve.html.haml +17 -0
- data/app/views/admin/applicants/_form_approve.html.haml +1 -17
- data/app/views/effective/membership_directory/_form.html.haml +1 -0
- data/app/views/effective/membership_directory/_membership.html.haml +1 -0
- data/app/views/effective/membership_directory/show.html.haml +1 -0
- data/db/migrate/01_create_effective_memberships.rb.erb +3 -0
- 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: d060a4560ac81c9ca5ff85d01017de52a187f9c488999cc8d070e487ce06e919
|
4
|
+
data.tar.gz: 61ff798a1d3dcb6bb1bc6b524fb1572d009f36faa4ef75dbe8df99c47d607fab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5d47c15f035b8fc63ed6ddcb99d18b3247093a01843b931c16f32822c278a637d3251c73091171c55e6f4bf43e11b0b012549f51b3ed4be9a6fb8fa6a37c851
|
7
|
+
data.tar.gz: 3a8cec75a97f6acb2188189c259cca502e6ae34c436246dcd3c4ea4cf11448b0fd44dea340656f016afa6a4525aeee9e75f0535b6e75583faeb4dc389d5e25c2
|
@@ -23,6 +23,9 @@ module EffectiveMembershipsDirectory
|
|
23
23
|
attr_accessor :first_name
|
24
24
|
attr_accessor :last_name
|
25
25
|
|
26
|
+
# Memberships
|
27
|
+
attr_accessor :number
|
28
|
+
|
26
29
|
# Organizations
|
27
30
|
attr_accessor :title
|
28
31
|
|
@@ -47,7 +50,7 @@ module EffectiveMembershipsDirectory
|
|
47
50
|
# Search Users and Organizations for only these fields. Passed into search_any. Return nil for all.
|
48
51
|
# Should this include email?
|
49
52
|
def search_any_columns
|
50
|
-
[:title, :name, :first_name, :middle_name, :last_name]
|
53
|
+
[:title, :name, :first_name, :middle_name, :last_name, :number]
|
51
54
|
end
|
52
55
|
|
53
56
|
def per_page
|
@@ -116,6 +119,11 @@ module EffectiveMembershipsDirectory
|
|
116
119
|
memberships = memberships.with_category(EffectiveMemberships.Category.where(id: category))
|
117
120
|
end
|
118
121
|
|
122
|
+
# Filter by number
|
123
|
+
if number.present?
|
124
|
+
memberships = memberships.where('number ILIKE ?', "%#{number}%")
|
125
|
+
end
|
126
|
+
|
119
127
|
# Return an ActiveRecord::Relation of Effective::Memberships
|
120
128
|
memberships
|
121
129
|
end
|
data/app/models/effective/fee.rb
CHANGED
@@ -13,6 +13,9 @@ module Effective
|
|
13
13
|
# The membership category for this fee, if there's only 1 membership.categories
|
14
14
|
belongs_to :category, polymorphic: true, optional: true
|
15
15
|
|
16
|
+
# Only set on the Discount fee right now
|
17
|
+
belongs_to :from_category, polymorphic: true, optional: true
|
18
|
+
|
16
19
|
# The membership status for this fee, if there's only 1 membership.statuses
|
17
20
|
belongs_to :with_status, polymorphic: true, optional: true
|
18
21
|
|
@@ -149,7 +152,7 @@ module Effective
|
|
149
152
|
[
|
150
153
|
period.strftime('%Y'),
|
151
154
|
category,
|
152
|
-
EffectiveResources.et("effective_memberships.fees.#{fee_type.
|
155
|
+
EffectiveResources.et("effective_memberships.fees.#{fee_type.parameterize.underscore}")
|
153
156
|
].join(' ')
|
154
157
|
end
|
155
158
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
%h3 Fees
|
2
|
+
%p The following fees will be created:
|
3
|
+
- month = Time.zone.now.strftime('%B')
|
4
|
+
|
5
|
+
%ul
|
6
|
+
- if applicant.apply_to_join?
|
7
|
+
%li A #{month} prorated fee
|
8
|
+
|
9
|
+
- if applicant.reclassification?
|
10
|
+
- if applicant.owner.outstanding_renewal_fees.present?
|
11
|
+
%li A renewal fee in their new category
|
12
|
+
- else
|
13
|
+
%li A #{month} prorated fee to the new category
|
14
|
+
%li A #{month} discount fee from their old category
|
15
|
+
|
16
|
+
- if applicant.reinstatement?
|
17
|
+
%li A #{month} prorated fee to their reinstatement category
|
@@ -22,23 +22,7 @@
|
|
22
22
|
- if applicant.reinstatement? && reinstatement.present?
|
23
23
|
%p The member will be reinstated with their previous status: #{badges(reinstatement.membership_statuses) || 'None'}.
|
24
24
|
|
25
|
-
|
26
|
-
%p The following fees will be created:
|
27
|
-
- month = Time.zone.now.strftime('%B')
|
28
|
-
|
29
|
-
%ul
|
30
|
-
- if applicant.apply_to_join?
|
31
|
-
%li A #{month} prorated fee
|
32
|
-
|
33
|
-
- if applicant.reclassification?
|
34
|
-
- if applicant.owner.outstanding_renewal_fees.present?
|
35
|
-
%li A renewal fee in their new category
|
36
|
-
- else
|
37
|
-
%li A #{month} prorated fee to the new category
|
38
|
-
%li A #{month} discount fee from their old category
|
39
|
-
|
40
|
-
- if applicant.reinstatement?
|
41
|
-
%li A #{month} prorated fee to their reinstatement category
|
25
|
+
= render('admin/applicants/fees_approve', f: f, applicant: applicant)
|
42
26
|
|
43
27
|
%p The following unpurchased fees will be deleted:
|
44
28
|
- outstanding_fee_payment_fees = applicant.owner.outstanding_fee_payment_fees
|
@@ -2,6 +2,7 @@
|
|
2
2
|
%h6= membership.owner
|
3
3
|
%p= membership.categories.map(&:membership_directory_title).to_sentence
|
4
4
|
%p= membership.statuses.map(&:membership_directory_title).to_sentence
|
5
|
+
%p= membership.number
|
5
6
|
|
6
7
|
- if membership.owner.try(:email).present?
|
7
8
|
%p= reveal_mail_to(membership.owner.email)
|
@@ -4,6 +4,7 @@
|
|
4
4
|
%h6= @membership.owner
|
5
5
|
%p= @membership.categories.map(&:membership_directory_title).to_sentence
|
6
6
|
%p= @membership.statuses.map(&:membership_directory_title).to_sentence
|
7
|
+
%p= @membership.number
|
7
8
|
|
8
9
|
- if @membership.owner.respond_to?(:rich_text_body)
|
9
10
|
.mb-4= @membership.owner.rich_text_body.to_s
|
@@ -457,6 +457,9 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
457
457
|
t.integer :category_id
|
458
458
|
t.string :category_type
|
459
459
|
|
460
|
+
t.integer :from_category_id
|
461
|
+
t.string :from_category_type
|
462
|
+
|
460
463
|
t.integer :with_status_id
|
461
464
|
t.string :with_status_type
|
462
465
|
|
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.13.1
|
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: 2023-03-
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -354,6 +354,7 @@ files:
|
|
354
354
|
- app/views/admin/applicant_endorsements/_applicant_endorsement.html.haml
|
355
355
|
- app/views/admin/applicant_references/_applicant_reference.html.haml
|
356
356
|
- app/views/admin/applicant_reviews/_applicant_review.html.haml
|
357
|
+
- app/views/admin/applicants/_fees_approve.html.haml
|
357
358
|
- app/views/admin/applicants/_form.html.haml
|
358
359
|
- app/views/admin/applicants/_form_applicant.html.haml
|
359
360
|
- app/views/admin/applicants/_form_approve.html.haml
|