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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab9a748ab11ca8d852d0b69ed6f5d05e40e0e67b966e1c85f6cf98592db2dc32
4
- data.tar.gz: b048158b7cea70c82fa04ab13cc91a37fcc20edcd5b6356b0ff6d9efbb967314
3
+ metadata.gz: '094156a30bcf510cbd5c6023d496887f8b2b3d254ce4e1f540517648867b5e65'
4
+ data.tar.gz: bb3c32887f6a0765ea0f4ac5fd462a9f597138343b4f1f6ef6147ea4cd0c4054
5
5
  SHA512:
6
- metadata.gz: 0603ffd2a17a89df9de2e7325f0d2c4a0d03583da2d3f431425f2e69edbadb201878582a60086ff48c9313dfd218c6d7b173a876a17e35737ebb98e3ebecd7ef
7
- data.tar.gz: dbe77a3674d19fa2fed6be7bc23a09f1a66b7b7c2dfe7908516193c99f378b81e3a522d2a7ceaf2e105fd59d2247a2c1f87097451deadf9d29e0d22b92d6ff98
6
+ metadata.gz: 4b5f000b750d32d0ba69944fe926426144988e3dfd9f430e9a32afaffc205d4d3b71157ebdca9ceaf130ec3d966fd97c695e4137cf4ef10770e48d15b6058127
7
+ data.tar.gz: 5ac39c63eea4e9a46e989fefeaf21c5b2119c84d06fdb7d8c2a6dabcab331c89f5b9b6a06560cfb76d7e19ad8a3985e3c4d3017a79cf05e96d22d1289c28e525
@@ -260,4 +260,8 @@ module EffectiveMembershipsCategory
260
260
  tax_exempt
261
261
  end
262
262
 
263
+ def cpd_target_score(cpd_cycle:)
264
+ nil
265
+ end
266
+
263
267
  end
@@ -96,7 +96,9 @@ module EffectiveMembershipsRegistrar
96
96
 
97
97
  if changed
98
98
  membership.registration_on = date # Always new registration_on
99
- save!(owner, date: date)
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
- save!(owner, date: date)
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
- save!(owner, date: date)
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
- save!(owner, date: date)
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
- save!(owner, date: date, notes: notes)
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
@@ -144,7 +144,13 @@ module Effective
144
144
  end
145
145
 
146
146
  def default_title
147
- [period&.strftime('%Y'), category, fee_type, 'Fee'].compact.join(' ')
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,3 @@
1
+ = applicant.owner.to_s
2
+ %br
3
+ = mail_to(applicant.owner.email)
@@ -3,9 +3,7 @@
3
3
  %tr
4
4
  %th.border-0 Applicant
5
5
  %td.border-0
6
- = applicant.owner.to_s
7
- %br
8
- = mail_to(applicant.owner.email)
6
+ = render('effective/applicants/owner', applicant: applicant, owner: applicant.owner)
9
7
 
10
8
  - if request.path.start_with?('/admin')
11
9
  %tr
@@ -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'
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.1'
3
3
  end
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.11.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-02-24 00:00:00.000000000 Z
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