effective_organizations 0.0.3 → 0.0.4

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: 1d1867153f3a3fd958c18fd26c374fba6a439516480ffac3825aabdbc5dadf5f
4
- data.tar.gz: 14bf4b503c58169387f886c3781bb2843f51cf90fedd3994eb5333850abc8461
3
+ metadata.gz: 1680db25ffadd9aedde1cda52429e5b4d42ee4b2c6c2a16a801631099b7e3db6
4
+ data.tar.gz: b0ba4cfb29be4714b411101f2c2a50e073a433458c69453f0f032d73b0bcbc4d
5
5
  SHA512:
6
- metadata.gz: 7139213c4c010b19cb733d50c1b042fb25f23246c1c1295ca23fe05c1f17e9705f64476b46acbe19833b0b13c7ade72918207b0fceab50fc62586163c332ed92
7
- data.tar.gz: ee0dd2280a17fd2ba168a257a875608bf8027b7548db9d3482728f54e4b3898087645d212f860e8307eb0aa8fbfdbe55626327608858ad8aa6911365ad30d280
6
+ metadata.gz: cbb3f71d72a698486a909e5c7cb418adb1862254d4d1b3868ab4be56ce6a14c4fc18e7e6f3d1c71649700a7186f3ceeb144ef7fe866f5d5a7e71fe7589bbace4
7
+ data.tar.gz: 4e3bd0d65a5b370d3f8ad1284dc660720af0bc5b39165c82b265ac421d75ddab6dc1246f63aeba5aebed32f6c77298f211073671420dcbbb9abf8dac3709615a
@@ -5,5 +5,5 @@
5
5
 
6
6
  - if organization.persisted?
7
7
  %h2 Representatives
8
- - datatable = Admin::EffectiveRepresentativesDatatable.new(organization_id: organization.id)
8
+ - datatable = Admin::EffectiveRepresentativesDatatable.new(organization_id: organization.id, organization_type: organization.class.name)
9
9
  = render_inline_datatable(datatable)
@@ -4,12 +4,13 @@
4
4
  = f.hidden_field :user_id
5
5
  = f.hidden_field :user_type
6
6
  = f.hidden_field :organization_id
7
+ = f.hidden_field :organization_type
7
8
 
8
9
  - if f.object.new_record?
9
10
  - unless inline_datatable? && inline_datatable.attributes[:organization_id].present?
10
11
  = f.select :organization, { 'Organizations' => EffectiveOrganizations.Organization.sorted }, polymorphic: true
11
12
 
12
- = f.checks :roles, EffectiveRoles.roles_collection(f.object)
13
+ = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
13
14
 
14
15
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
15
16
  = f.radios :new_representative_user_action, ['Invite new user', 'Add existing user'], inline: true, label: 'Representative'
@@ -28,7 +29,7 @@
28
29
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
29
30
  = f.static_field :user
30
31
 
31
- = f.checks :roles, EffectiveRoles.roles_collection(f.object)
32
+ = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
32
33
 
33
34
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
34
35
  = f.fields_for :user, f.object.user do |fu|
@@ -10,7 +10,7 @@
10
10
  - unless inline_datatable? && inline_datatable.attributes[:organization_id].present?
11
11
  = f.select :organization, { 'Organizations' => EffectiveOrganizations.Organization.sorted }, polymorphic: true
12
12
 
13
- = f.checks :roles, EffectiveRoles.roles_collection(f.object)
13
+ = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
14
14
 
15
15
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
16
16
  = f.hidden_field :new_representative_user_action, value: 'Invite new user'
@@ -25,7 +25,7 @@
25
25
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
26
26
  = f.static_field :user
27
27
 
28
- = f.checks :roles, EffectiveRoles.roles_collection(f.object)
28
+ = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
29
29
 
30
30
  = f.fields_for :user, f.object.user do |fu|
31
31
  = render 'effective/representatives/user_fields', f: fu
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrganizations
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_organizations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect