effective_memberships 0.1.9 → 0.1.13
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/controllers/admin/fee_payments_controller.rb +1 -1
- data/app/controllers/admin/memberships_controller.rb +9 -0
- data/app/datatables/admin/effective_memberships_datatable.rb +40 -0
- data/app/models/concerns/effective_memberships_applicant.rb +2 -0
- data/app/models/concerns/effective_memberships_fee_payment.rb +2 -0
- data/app/models/effective/fee.rb +2 -2
- data/app/models/effective/membership.rb +1 -1
- data/app/views/admin/categories/_form_renewals.html.haml +3 -3
- data/app/views/admin/registrar_actions/_form_bad_standing.html.haml +1 -1
- data/app/views/effective/applicants/_layout.html.haml +1 -1
- data/app/views/effective/fee_payments/_layout.html.haml +1 -1
- data/app/views/effective/fee_payments/submitted.html.haml +5 -4
- data/app/views/effective/fees/_dashboard.html.haml +2 -2
- data/config/routes.rb +1 -0
- data/lib/effective_memberships/version.rb +1 -1
- data/lib/effective_memberships.rb +0 -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: 85325bfcecbc3b898f17f1a1c4730444fa9ac8e6ec66541cb371be4b7f973b93
|
4
|
+
data.tar.gz: 1976fed9cc0b3a4cd9e1bc2b3660d5402d629f00d975dda8875988415bb194ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00702ddf38a7849b8464e08bd37a9c3904e5de3e44d7eb0d32c1583a2ebbaf6e8c3d110742d1a1ef2f0b5a55085f4d38b9b43725f96d98e9b2ee003d5c3bca18
|
7
|
+
data.tar.gz: 0552411b75063d00698c1707d5a6b04cb2bd7c89bd804a9ecc619598ee32ee63ddd99a40cb9cf6c3b368df49b5ac4d12e10e35c20a5be343841dfd561b3a43fd
|
@@ -11,7 +11,7 @@ module Admin
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def permitted_params
|
14
|
-
model = (params.key?(:
|
14
|
+
model = (params.key?(:effective_fee_payment) ? :effective_fee_payment : :fee_payment)
|
15
15
|
params.require(model).permit!
|
16
16
|
end
|
17
17
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Admin
|
2
|
+
class EffectiveMembershipsDatatable < Effective::Datatable
|
3
|
+
|
4
|
+
datatable do
|
5
|
+
order :id
|
6
|
+
col :id, visible: false
|
7
|
+
|
8
|
+
col :owner
|
9
|
+
col :categories
|
10
|
+
|
11
|
+
col :number
|
12
|
+
col :number_as_integer, visible: false
|
13
|
+
|
14
|
+
col :joined_on
|
15
|
+
col :registration_on
|
16
|
+
|
17
|
+
col :fees_paid_period, visible: false, label: 'Fees Paid'
|
18
|
+
col :fees_paid_through_period, label: 'Fees Paid Through'
|
19
|
+
|
20
|
+
col :bad_standing
|
21
|
+
col :bad_standing_admin, visible: false
|
22
|
+
col :bad_standing_reason, visible: false
|
23
|
+
|
24
|
+
actions_col
|
25
|
+
end
|
26
|
+
|
27
|
+
collection do
|
28
|
+
memberships = Effective::Membership.deep.all
|
29
|
+
|
30
|
+
raise('expected an owner_id, not user_id') if attributes[:user_id].present?
|
31
|
+
|
32
|
+
if attributes[:owner_id].present?
|
33
|
+
memberships = memberships.where(owner_id: attributes[:owner_id])
|
34
|
+
end
|
35
|
+
|
36
|
+
memberships
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
data/app/models/effective/fee.rb
CHANGED
@@ -131,11 +131,11 @@ module Effective
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def default_qb_item_name
|
134
|
-
"#{fee_type} Fee"
|
134
|
+
category.present? ? category.qb_item_name : "#{fee_type} Fee"
|
135
135
|
end
|
136
136
|
|
137
137
|
def default_tax_exempt
|
138
|
-
false
|
138
|
+
category.present? ? category.tax_exempt : false
|
139
139
|
end
|
140
140
|
|
141
141
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
= f.show_if(:create_renewal_fees, true) do
|
8
8
|
- date = EffectiveMemberships.Registrar.renewal_fee_date(date: Time.zone.now)
|
9
9
|
|
10
|
-
%p Charged to members, every #{date.strftime('%B %
|
10
|
+
%p Charged to members, every #{date.strftime('%B %e')}, to renew their dues.
|
11
11
|
= f.price_field :renewal_fee
|
12
12
|
|
13
13
|
%h3 Late Fees
|
@@ -17,7 +17,7 @@
|
|
17
17
|
- period = EffectiveMemberships.Registrar.current_period
|
18
18
|
- date = EffectiveMemberships.Registrar.late_fee_date(period: period)
|
19
19
|
|
20
|
-
%p Charged to members, on #{date.strftime('%B %
|
20
|
+
%p Charged to members, on #{date.strftime('%B %e')}, with outstanding renewal fees
|
21
21
|
= f.price_field :late_fee
|
22
22
|
|
23
23
|
%h3 Bad Standing
|
@@ -27,6 +27,6 @@
|
|
27
27
|
- period = EffectiveMemberships.Registrar.current_period
|
28
28
|
- date = EffectiveMemberships.Registrar.bad_standing_date(period: period)
|
29
29
|
|
30
|
-
%p Members with outstanding fees, on #{date.strftime('%B %
|
30
|
+
%p Members with outstanding fees, on #{date.strftime('%B %e')}, will automatically be marked in bad standing.
|
31
31
|
|
32
32
|
= effective_submit(f)
|
@@ -14,7 +14,7 @@
|
|
14
14
|
%p.text-muted
|
15
15
|
- if date.present?
|
16
16
|
Members with outstanding renewal fees are automatically marked
|
17
|
-
not in good standing on #{date.strftime('%B %
|
17
|
+
not in good standing on #{date.strftime('%B %e')}.
|
18
18
|
The status is cleared when they pay their fees.
|
19
19
|
You can also mark a member as always in bad standing.
|
20
20
|
|
@@ -4,11 +4,12 @@
|
|
4
4
|
- raise('expected a submitted fee_payment') unless resource.was_submitted?
|
5
5
|
- raise('expected a purchased fee_payment submit_order') unless resource.submit_order&.purchased?
|
6
6
|
|
7
|
-
.alert.alert-
|
8
|
-
|
9
|
-
|
7
|
+
.alert.alert-warning.mb-4
|
8
|
+
Successfully paid on #{resource.submit_order.purchased_at.strftime('%F')}.
|
9
|
+
|
10
|
+
= link_to "Return to Dashboard", root_path, class: 'btn btn-lg btn-primary mb-4'
|
10
11
|
|
11
12
|
= render 'effective/fee_payments/fee_payment', fee_payment: resource
|
12
13
|
= render 'effective/fee_payments/orders', fee_payment: resource
|
13
14
|
|
14
|
-
= link_to "Return to Dashboard", root_path, class: 'btn btn-lg btn-primary
|
15
|
+
= link_to "Return to Dashboard", root_path, class: 'btn btn-lg btn-primary'
|
@@ -7,11 +7,11 @@
|
|
7
7
|
- if membership.present?
|
8
8
|
- if membership.category.create_renewal_fees?
|
9
9
|
- date = EffectiveMemberships.Registrar.renewal_fee_date(date: Time.zone.now)
|
10
|
-
%p Annual fees become available for purchase on #{date.strftime('%B %
|
10
|
+
%p Annual fees become available for purchase on #{date.strftime('%B %e')} of each year.
|
11
11
|
|
12
12
|
- if membership.category.create_late_fees?
|
13
13
|
- date = EffectiveMemberships.Registrar.late_fee_date(date: Time.zone.now)
|
14
|
-
%p Late fees will be applied on #{date.strftime('%B %
|
14
|
+
%p Late fees will be applied on #{date.strftime('%B %e')}.
|
15
15
|
|
16
16
|
- if fees.present?
|
17
17
|
.alert.alert-warning.mb-3 You have #{pluralize(fees.length , 'outstanding fee')}.
|
data/config/routes.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.13
|
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:
|
11
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- app/controllers/admin/categories_controller.rb
|
217
217
|
- app/controllers/admin/fee_payments_controller.rb
|
218
218
|
- app/controllers/admin/fees_controller.rb
|
219
|
+
- app/controllers/admin/memberships_controller.rb
|
219
220
|
- app/controllers/admin/registrar_actions_controller.rb
|
220
221
|
- app/controllers/effective/applicant_references_controller.rb
|
221
222
|
- app/controllers/effective/applicants_controller.rb
|
@@ -227,6 +228,7 @@ files:
|
|
227
228
|
- app/datatables/admin/effective_fee_payments_datatable.rb
|
228
229
|
- app/datatables/admin/effective_fees_datatable.rb
|
229
230
|
- app/datatables/admin/effective_membership_histories_datatable.rb
|
231
|
+
- app/datatables/admin/effective_memberships_datatable.rb
|
230
232
|
- app/datatables/effective_applicant_courses_datatable.rb
|
231
233
|
- app/datatables/effective_applicant_educations_datatable.rb
|
232
234
|
- app/datatables/effective_applicant_experiences_datatable.rb
|