effective_memberships 0.13.0 → 0.13.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: ef95cbbf40f72c47c5ca64efd70d28d1cb879e52431b22471f2d570ef759d495
4
- data.tar.gz: a150c327ec0869e26822f7d484cdc99c414cd666679150e9ee0c83efc3b125aa
3
+ metadata.gz: d060a4560ac81c9ca5ff85d01017de52a187f9c488999cc8d070e487ce06e919
4
+ data.tar.gz: 61ff798a1d3dcb6bb1bc6b524fb1572d009f36faa4ef75dbe8df99c47d607fab
5
5
  SHA512:
6
- metadata.gz: cc04a6003782b0c39e4b67d03c012dc3e2247c93b5f43bd38fd47a843da7ee0c9fa11e5a02d56672724f95c453e5cf266179ea22f9e06da851c1d484a583edd2
7
- data.tar.gz: dc070be5820ad2f616c4320a745879ff26b8e153f24ddc99fb92913d753f96198c387b58b8656e443737cec8ea1b5417032faceb394eae2ea640c61efbb05cf4
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
@@ -9,6 +9,7 @@
9
9
  /= f.search_field :title
10
10
 
11
11
  = f.select :category, membership_directory.categories
12
+ = f.search_field :number
12
13
 
13
14
  = f.save('Search', class: 'btn btn-primary btn-search mr-3', name: nil)
14
15
  = link_to 'Reset filters', request.path
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.13.0'
2
+ VERSION = '0.13.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.13.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-16 00:00:00.000000000 Z
11
+ date: 2023-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails