effective_memberships 0.11.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_memberships_category.rb +4 -0
- data/app/models/concerns/effective_memberships_registrar.rb +13 -10
- data/app/models/effective/fee.rb +7 -1
- data/app/views/effective/applicants/_owner.html.haml +3 -0
- data/app/views/effective/applicants/_summary.html.haml +1 -3
- data/config/locales/effective_memberships.en.yml +39 -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: '094156a30bcf510cbd5c6023d496887f8b2b3d254ce4e1f540517648867b5e65'
|
4
|
+
data.tar.gz: bb3c32887f6a0765ea0f4ac5fd462a9f597138343b4f1f6ef6147ea4cd0c4054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b5f000b750d32d0ba69944fe926426144988e3dfd9f430e9a32afaffc205d4d3b71157ebdca9ceaf130ec3d966fd97c695e4137cf4ef10770e48d15b6058127
|
7
|
+
data.tar.gz: 5ac39c63eea4e9a46e989fefeaf21c5b2119c84d06fdb7d8c2a6dabcab331c89f5b9b6a06560cfb76d7e19ad8a3985e3c4d3017a79cf05e96d22d1289c28e525
|
@@ -96,7 +96,9 @@ module EffectiveMembershipsRegistrar
|
|
96
96
|
|
97
97
|
if changed
|
98
98
|
membership.registration_on = date # Always new registration_on
|
99
|
-
|
99
|
+
|
100
|
+
owner.build_membership_history(start_on: date)
|
101
|
+
owner.save!
|
100
102
|
end
|
101
103
|
|
102
104
|
# Assign member role
|
@@ -153,7 +155,8 @@ module EffectiveMembershipsRegistrar
|
|
153
155
|
add_member_role(owner)
|
154
156
|
|
155
157
|
# Save owner
|
156
|
-
|
158
|
+
owner.build_membership_history(start_on: date)
|
159
|
+
owner.save!
|
157
160
|
end
|
158
161
|
|
159
162
|
def reclassify!(owner, to:, status: nil, date: nil, skip_fees: false)
|
@@ -198,7 +201,9 @@ module EffectiveMembershipsRegistrar
|
|
198
201
|
end
|
199
202
|
end
|
200
203
|
|
201
|
-
|
204
|
+
# Save owner
|
205
|
+
owner.build_membership_history(start_on: date)
|
206
|
+
owner.save!
|
202
207
|
end
|
203
208
|
|
204
209
|
def reinstate!(owner, to: nil, date: nil, skip_fees: false)
|
@@ -254,7 +259,8 @@ module EffectiveMembershipsRegistrar
|
|
254
259
|
add_member_role(owner)
|
255
260
|
|
256
261
|
# Save owner
|
257
|
-
|
262
|
+
owner.build_membership_history(start_on: date)
|
263
|
+
owner.save!
|
258
264
|
end
|
259
265
|
|
260
266
|
def status_clear!(owner, date: nil)
|
@@ -302,7 +308,9 @@ module EffectiveMembershipsRegistrar
|
|
302
308
|
changed = membership.membership_statuses.any? { |ms| ms.new_record? || ms.marked_for_destruction? }
|
303
309
|
|
304
310
|
if changed
|
305
|
-
|
311
|
+
# Save owner
|
312
|
+
owner.build_membership_history(start_on: date, notes: notes)
|
313
|
+
owner.save!
|
306
314
|
end
|
307
315
|
|
308
316
|
true
|
@@ -552,9 +560,4 @@ module EffectiveMembershipsRegistrar
|
|
552
560
|
true
|
553
561
|
end
|
554
562
|
|
555
|
-
def save!(owner, date: Time.zone.now, notes: nil)
|
556
|
-
owner.build_membership_history(start_on: date, notes: notes)
|
557
|
-
owner.save!
|
558
|
-
end
|
559
|
-
|
560
563
|
end
|
data/app/models/effective/fee.rb
CHANGED
@@ -144,7 +144,13 @@ module Effective
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def default_title
|
147
|
-
|
147
|
+
return nil unless period.present? && fee_type.present?
|
148
|
+
|
149
|
+
[
|
150
|
+
period.strftime('%Y'),
|
151
|
+
category,
|
152
|
+
EffectiveResources.et("effective_memberships.fees.#{fee_type.downcase}")
|
153
|
+
].join(' ')
|
148
154
|
end
|
149
155
|
|
150
156
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
en:
|
2
|
+
effective_memberships:
|
3
|
+
name: 'Effective Memberships'
|
4
|
+
|
5
|
+
fees:
|
6
|
+
applicant: 'Applicant Fee'
|
7
|
+
prorated: 'Prorated Fee'
|
8
|
+
reinstatement: 'Reinstatement Fee'
|
9
|
+
renewal: 'Renewal Fee'
|
10
|
+
late: 'Late Fee'
|
11
|
+
discount: 'Discount Fee'
|
12
|
+
admin: 'Admin Fee'
|
13
|
+
|
14
|
+
activerecord:
|
15
|
+
models:
|
16
|
+
# These ones might be app level
|
17
|
+
app/applicant: 'Applicant'
|
18
|
+
app/applicant_review: 'Applicant Review'
|
19
|
+
app/membership_card: 'Membership Card'
|
20
|
+
app/category: 'Category'
|
21
|
+
app/directory: 'Directory'
|
22
|
+
app/fee_payment: 'Fee Payment'
|
23
|
+
app/organization: 'Organization'
|
24
|
+
app/status: 'Status'
|
25
|
+
|
26
|
+
# These ones should stay effective
|
27
|
+
effective/applicant_course_area: 'Course Area'
|
28
|
+
effective/applicant_course_name: 'Course Name'
|
29
|
+
effective/applicant_course: 'Course'
|
30
|
+
effective/applicant_education: 'Education'
|
31
|
+
effective/applicant_endorsement: 'Endorsement'
|
32
|
+
effective/applicant_equivalence: 'Equivalence'
|
33
|
+
effective/applicant_experience: 'Experience'
|
34
|
+
effective/applicant_reference: 'Reference'
|
35
|
+
effective/document: 'Document'
|
36
|
+
effective/fee: 'Fee'
|
37
|
+
effective/membership_history: 'Membership History'
|
38
|
+
effective/membership: 'Membership'
|
39
|
+
effective/representative: 'Representative'
|
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.12.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-
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -435,6 +435,7 @@ files:
|
|
435
435
|
- app/views/effective/applicants/_missing_info.html.haml
|
436
436
|
- app/views/effective/applicants/_orders.html.haml
|
437
437
|
- app/views/effective/applicants/_organization.html.haml
|
438
|
+
- app/views/effective/applicants/_owner.html.haml
|
438
439
|
- app/views/effective/applicants/_references.html.haml
|
439
440
|
- app/views/effective/applicants/_reinstatement.html.haml
|
440
441
|
- app/views/effective/applicants/_select.html.haml
|
@@ -513,6 +514,7 @@ files:
|
|
513
514
|
- app/views/users/_demographics.html.haml
|
514
515
|
- app/views/users/_fields_demographics.html.haml
|
515
516
|
- config/effective_memberships.rb
|
517
|
+
- config/locales/effective_memberships.en.yml
|
516
518
|
- config/routes.rb
|
517
519
|
- db/migrate/01_create_effective_memberships.rb.erb
|
518
520
|
- db/seeds.rb
|