effective_memberships 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/datatables/admin/effective_organizations_datatable.rb +46 -3
- data/app/models/concerns/effective_memberships_organization.rb +1 -0
- data/app/views/admin/organizations/_fields.html.haml +0 -2
- data/app/views/admin/organizations/_form.html.haml +1 -5
- data/app/views/admin/organizations/_form_organization.html.haml +1 -3
- data/lib/effective_memberships/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20a57ae6829f25668b31b12a6a67ca6b0fb648810a6efba12c516a30a969144f
|
4
|
+
data.tar.gz: 7b67ecef9d09b021e924b8f8e1a0eb33a741a8a10c8a8912c6aae5aff7fd8545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d942c1d353f5b439392fe6a5646efd1f5dbd2d74959c65a776394c339e3bbc6aaf794bbd7d352cb192416bd04ea7f97db21931ab88ff48c3f773f4c707322c
|
7
|
+
data.tar.gz: 5ac8508dd130358939656a248d568b8257c3f751dafb2a5d9b49e5cc4d036982750e8f33bcae7a9b5be9957eb0b9a9f3e28f942ece9dfb26b7ac83684d36b4f4
|
@@ -1,7 +1,12 @@
|
|
1
1
|
module Admin
|
2
2
|
class EffectiveOrganizationsDatatable < Effective::Datatable
|
3
|
-
|
3
|
+
filters do
|
4
|
+
scope :unarchived, label: 'All'
|
5
|
+
scope :members
|
6
|
+
scope :archived
|
7
|
+
end
|
4
8
|
|
9
|
+
datatable do
|
5
10
|
col :updated_at, visible: false
|
6
11
|
col :created_at, visible: false
|
7
12
|
|
@@ -11,16 +16,54 @@ module Admin
|
|
11
16
|
col :category, search: categories
|
12
17
|
end
|
13
18
|
|
14
|
-
col :
|
19
|
+
col(:to_s, label: 'Organization', sql_column: true, action: :edit)
|
20
|
+
.search do |collection, term|
|
21
|
+
collection.where(id: effective_resource.search_any(term))
|
22
|
+
end.sort do |collection, direction|
|
23
|
+
collection.order(title: direction)
|
24
|
+
end
|
25
|
+
|
26
|
+
col :title, visible: false
|
27
|
+
|
28
|
+
col 'membership.joined_on'
|
29
|
+
col 'membership.fees_paid_through_period', label: 'Fees Paid Through'
|
30
|
+
col 'membership.categories'
|
15
31
|
|
16
32
|
col :representatives_count
|
17
33
|
col :representatives
|
18
34
|
|
35
|
+
col :email, visible: false
|
36
|
+
|
37
|
+
col :address1, visible: false do |organization|
|
38
|
+
organization.billing_address&.address1
|
39
|
+
end
|
40
|
+
col :address2, visible: false do |organization|
|
41
|
+
organization.billing_address&.address2
|
42
|
+
end
|
43
|
+
col :city, visible: false do |organization|
|
44
|
+
organization.billing_address&.city
|
45
|
+
end
|
46
|
+
col :state_code, label: 'Prov', visible: false do |organization|
|
47
|
+
organization.billing_address&.state_code
|
48
|
+
end
|
49
|
+
col :postal_code, label: 'Postal', visible: false do |organization|
|
50
|
+
organization.billing_address&.postal_code
|
51
|
+
end
|
52
|
+
col :country_code, label: 'Country', visible: false do |organization|
|
53
|
+
organization.billing_address&.country_code
|
54
|
+
end
|
55
|
+
|
56
|
+
col :phone, visible: false
|
57
|
+
col :fax, visible: false
|
58
|
+
col :website, visible: false
|
59
|
+
col :category, visible: false
|
60
|
+
col :notes, visible: false
|
61
|
+
|
19
62
|
actions_col
|
20
63
|
end
|
21
64
|
|
22
65
|
collection do
|
23
|
-
EffectiveMemberships.Organization.deep.
|
66
|
+
EffectiveMemberships.Organization.deep.left_joins(:membership).includes(membership: :membership_categories)
|
24
67
|
end
|
25
68
|
|
26
69
|
def categories
|
@@ -23,6 +23,7 @@ module EffectiveMembershipsOrganization
|
|
23
23
|
effective_memberships_owner
|
24
24
|
|
25
25
|
acts_as_addressable :billing # effective_addresses
|
26
|
+
acts_as_archived unless respond_to?(:acts_as_archived?)
|
26
27
|
log_changes(except: [:representatives, :users]) if respond_to?(:log_changes)
|
27
28
|
|
28
29
|
# rich_text_body
|
@@ -5,7 +5,7 @@
|
|
5
5
|
- if organization.persisted?
|
6
6
|
- if can?(:index, Effective::Membership)
|
7
7
|
= tab 'Membership' do
|
8
|
-
= render 'admin/
|
8
|
+
= render 'admin/memberships/form', owner: organization
|
9
9
|
|
10
10
|
= tab 'Representatives' do
|
11
11
|
= render_datatable(Admin::EffectiveRepresentativesDatatable.new(organization: organization), inline: true, namespace: :admin)
|
@@ -18,10 +18,6 @@
|
|
18
18
|
= tab 'Fee Payments' do
|
19
19
|
= render_inline_datatable(Admin::EffectiveFeePaymentsDatatable.new(organization: organization))
|
20
20
|
|
21
|
-
- if can?(:index, Effective::MembershipHistory)
|
22
|
-
= tab 'History' do
|
23
|
-
= render_datatable(Admin::EffectiveMembershipHistoriesDatatable.new(owner: organization))
|
24
|
-
|
25
21
|
- if can?(:index, Effective::Order)
|
26
22
|
= tab 'Orders' do
|
27
23
|
= render_datatable(Admin::EffectiveOrdersDatatable.new(user: organization))
|
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.4.
|
4
|
+
version: 0.4.6
|
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: 2022-
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|