effective_memberships 0.15.2 → 0.16.0

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: 80b3be5df02d20bffe856bbfead08ca00bbbe1275de73180222c4d5b68325905
4
- data.tar.gz: e446910960afadbc36f2f427e9bfdd5e5e286a1f59681ea523f15cd30e9da5ac
3
+ metadata.gz: 2724aef02cc204497fbe0fea92c61ca1b61cfb37ac49711dd80ca3627577d90d
4
+ data.tar.gz: 46e0ac6f3754616c32c4d0bbbf581ae653ed90124e958e9d16ae512eff4e2a80
5
5
  SHA512:
6
- metadata.gz: 5e7fbe089ca906197c0fd7a6823b0100c60d0ac2b084ee9f6a77e5d0ee2e82de81be3ab2aaf356c58b9dfc220b2d6c26dc8e4c0157d7d1b7c83ac18f7f79e4dc
7
- data.tar.gz: b1305d1884b8a6c6f9bd67bfa5dcba9aa223caf22e11e961a85ff4c24f3d285d56dab1279ec1627ed7f4d0b64ae82147cab390454980cc48499902e553b5180a
6
+ metadata.gz: 36111838c17b71691f8d16e2b4638d106823cb5b78d879c92b675f6d87a8241f3c5c8f42c92e39ce3fc7b45228875ffeb292aa30803836ec6dd28b8cdc8529f1
7
+ data.tar.gz: 773521c071ea206c07191528a681cc79b5c22476d7158b98a7e4cd5e253a852d1307b0864244733be09d3ed9e15d2a31a0484a23e69e4d3f4d5a0cc944544a04
@@ -12,6 +12,7 @@ module Admin
12
12
  end
13
13
 
14
14
  col :roles, search: roles_collection
15
+ col :display_on_directory, label: 'Directory'
15
16
 
16
17
  actions_col
17
18
  end
@@ -12,6 +12,7 @@ class EffectiveRepresentativesDatatable < Effective::Datatable
12
12
  end
13
13
 
14
14
  col :roles, search: roles_collection
15
+ col :display_on_directory, label: 'Directory'
15
16
 
16
17
  unless attributes[:actions] == false
17
18
  actions_col
@@ -263,6 +263,12 @@ module EffectiveMembershipsCategory
263
263
  tax_exempt
264
264
  end
265
265
 
266
+ # This enables the permission to use the effective products stamp wizard
267
+ # To buy a stamp outside of the applicant process
268
+ def can_stamp_wizard?
269
+ applicant_wizard_steps.include?(:stamp)
270
+ end
271
+
266
272
  def stamp_fee
267
273
  0
268
274
  end
@@ -91,4 +91,8 @@ module EffectiveMembershipsUser
91
91
  false
92
92
  end
93
93
 
94
+ def can_stamp_wizard?
95
+ is?(:member) && membership.category.can_stamp_wizard?
96
+ end
97
+
94
98
  end
@@ -16,6 +16,7 @@ module Effective
16
16
 
17
17
  effective_resource do
18
18
  roles_mask :integer
19
+ display_on_directory :boolean
19
20
 
20
21
  timestamps
21
22
  end
@@ -11,6 +11,7 @@
11
11
  = f.select :organization, { 'Organizations' => EffectiveMemberships.Organization.sorted }, polymorphic: true
12
12
 
13
13
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
14
+ = f.check_box :display_on_directory
14
15
 
15
16
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
16
17
  = f.radios :new_representative_user_action, ['Invite new user', 'Add existing user'], inline: true, label: 'Representative'
@@ -30,9 +31,10 @@
30
31
  = f.static_field :user
31
32
 
32
33
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
34
+ = f.check_box :display_on_directory
33
35
 
34
36
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
35
37
  = f.fields_for :user, f.object.user do |fu|
36
38
  = render 'admin/representatives/user_fields', f: fu
37
39
 
38
- = f.submit
40
+ = f.submit "Save " + et(f.object)
@@ -11,6 +11,7 @@
11
11
  = f.select :organization, { 'Organizations' => EffectiveMemberships.Organization.sorted }, polymorphic: true
12
12
 
13
13
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
14
+ = f.check_box :display_on_directory
14
15
 
15
16
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
16
17
  = f.hidden_field :new_representative_user_action, value: 'Invite new user'
@@ -26,8 +27,9 @@
26
27
  = f.static_field :user
27
28
 
28
29
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
30
+ = f.check_box :display_on_directory
29
31
 
30
32
  = f.fields_for :user, f.object.user do |fu|
31
33
  = render 'effective/representatives/user_fields', f: fu
32
34
 
33
- = f.submit
35
+ = f.submit "Save " + et(f.object)
@@ -38,3 +38,7 @@ en:
38
38
  effective/membership_history: 'Membership History'
39
39
  effective/membership: 'Membership'
40
40
  effective/representative: 'Representative'
41
+
42
+ attributes:
43
+ effective/representative:
44
+ display_on_directory: 'Display this representative on the member directory'
@@ -184,6 +184,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
184
184
  t.string :user_type
185
185
 
186
186
  t.integer :roles_mask
187
+ t.boolean :display_on_directory, :boolean, default: false
187
188
 
188
189
  t.datetime :updated_at
189
190
  t.datetime :created_at
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.15.2'
2
+ VERSION = '0.16.0'
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.15.2
4
+ version: 0.16.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: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails