effective_committees 0.3.8 → 0.3.10

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: ba248594c0b6174571533c4ada573c54e54acf95f13e8febb72c682d5aff64b9
4
- data.tar.gz: 39a0b4e7ec269615905514435bdf4176b451f26531b25b6cddbf01f4ff6f5307
3
+ metadata.gz: 0b032097e6b47124a29929799c7254e3a99723cca1b3112c2df96114cf5ca318
4
+ data.tar.gz: b8fdf374a35178b3ffb30828e9c61e30eb45457fa753f2d7228c17491d912f29
5
5
  SHA512:
6
- metadata.gz: bb7f1dcefae0181c0a63a43fa44ca45d0d30082f1678c8da11a82eb7035444ca0dd765104105e6e9f232c3a382083ce01abf80c796877c6d261d00557f29ff19
7
- data.tar.gz: '09a97531dbd864133290d0a30ae6401c04f27aa7aee9b4591065f9e4a807b64324dc9e945e34a6872f107df08b0b204ad22ca25fe7d7584c958e7ac5e7772bc9'
6
+ metadata.gz: c55b5c58cddb9a4fb3a607bd6a82e597d45dc58084cabde8e83ec41ba27df2865f3f25e801a76bcff08a2d906308b28352f9195240f10099991b3c0cc36108e2
7
+ data.tar.gz: 88ad856690e4aa85e670bfdce01876709b661129dfcf701c843371ede352800d0624bfab706a68525bfaba5fa3b9af4e3ced7607ea3ac177b9bff1f28868c9ef
@@ -7,6 +7,15 @@ module Admin
7
7
  col :committee, search: :string
8
8
  col :user, search: :string
9
9
 
10
+ if defined?(EffectiveMemberships)
11
+ col(:member_number, label: 'Member #', sort: false) do |committee_member|
12
+ committee_member.user.try(:membership).try(:number)
13
+ end.search do |collection, term|
14
+ memberships = Effective::Membership.where(owner_type: current_user.class.name).where('number ILIKE ?', "%#{term}%")
15
+ collection.where(user_id: memberships.select('owner_id'))
16
+ end
17
+ end
18
+
10
19
  unless attributes[:user_id]
11
20
  col :email do |committee_member|
12
21
  mail_to(committee_member.user.email)
@@ -8,7 +8,7 @@
8
8
  = f.hidden_field :committee_type
9
9
  = f.hidden_field :committee_id
10
10
 
11
- - ajax_url = (@select2_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
11
+ - ajax_url = (effective_resources.users_effective_ajax_index_path unless Rails.env.test?)
12
12
 
13
13
  - if f.object.new_record?
14
14
  - if inline_datatable? && inline_datatable.attributes[:committee_id].present?
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.3.8'.freeze
2
+ VERSION = '0.3.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_committees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.10
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-12-04 00:00:00.000000000 Z
11
+ date: 2024-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails