effective_memberships 0.8.2 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/admin/effective_memberships_datatable.rb +9 -3
- data/app/models/concerns/effective_memberships_registrar.rb +1 -0
- data/app/models/effective/membership.rb +1 -1
- data/app/views/effective/applicants/equivalences.html.haml +5 -2
- 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: 9f9d47f303cc8f5ebcf269093828d5369969b288673007f98fa7589bd92f3c78
|
4
|
+
data.tar.gz: 2b2c1d4f6b31e31cc3e45dfe05a6a6666935a542623b85c2a6072460f7969f96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e4b227ffb1bf4798e8d87f7651a14c9d40ba0107c3a58501249380f66475e0ba883d46036958528b077d325722602c69bee535d2a7e90fd0e8714c31f94c07
|
7
|
+
data.tar.gz: 64007536a52a3ac533f5b69c122889b3fc804a908da5d7633e1a47bbae6c754cecdb36ea6568abfdefc174a55706134c0aa714c92910bf82154a901aea2730be
|
@@ -8,9 +8,15 @@ module Admin
|
|
8
8
|
col :owner_id, visible: false
|
9
9
|
col :owner_type, visible: false
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
col
|
11
|
+
col :owner
|
12
|
+
|
13
|
+
col(:categories, search: EffectiveMemberships.Category.sorted, sql_column: true, sort: false).search do |collection, term|
|
14
|
+
collection.with_category(EffectiveMemberships.Category.find(term))
|
15
|
+
end
|
16
|
+
|
17
|
+
col(:statuses, search: EffectiveMemberships.Status.sorted, sql_column: true, sort: false).search do |collection, term|
|
18
|
+
collection.with_status(EffectiveMemberships.Status.find(term))
|
19
|
+
end
|
14
20
|
|
15
21
|
col :number
|
16
22
|
col :number_as_integer, visible: false
|
@@ -99,6 +99,7 @@ module EffectiveMembershipsRegistrar
|
|
99
99
|
end
|
100
100
|
|
101
101
|
changed = membership.membership_categories.any? { |mc| mc.new_record? || mc.marked_for_destruction? }
|
102
|
+
changed ||= membership.membership_statuses.any? { |ms| ms.new_record? || ms.marked_for_destruction? }
|
102
103
|
|
103
104
|
if changed
|
104
105
|
membership.registration_on = date # Always new registration_on
|
@@ -27,7 +27,7 @@ module Effective
|
|
27
27
|
timestamps
|
28
28
|
end
|
29
29
|
|
30
|
-
scope :deep, -> { includes(:owner, membership_categories: :category) }
|
30
|
+
scope :deep, -> { includes(:owner, membership_categories: :category, membership_statuses: :status) }
|
31
31
|
scope :sorted, -> { order(:id) }
|
32
32
|
|
33
33
|
scope :with_status, -> (statuses) {
|
@@ -6,12 +6,15 @@
|
|
6
6
|
%p You must include #{resource.min_applicant_equivalences} or more equivalent memberships.
|
7
7
|
|
8
8
|
- if resource.min_applicant_equivalences == 0
|
9
|
-
%p Equivalent memberships are not required.
|
9
|
+
%p Equivalent memberships are not required.
|
10
|
+
|
11
|
+
- if resource.applicant_equivalences.blank?
|
12
|
+
%p Click Add Another to add an equivalent membership.
|
10
13
|
|
11
14
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
12
15
|
= f.hidden_field :id
|
13
16
|
|
14
|
-
= f.has_many(:applicant_equivalences, cards: true) do |aef|
|
17
|
+
= f.has_many(:applicant_equivalences, cards: true, build: false) do |aef|
|
15
18
|
%h4.mb-4 Equivalent Membership
|
16
19
|
|
17
20
|
= aef.text_field :name
|
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.8.
|
4
|
+
version: 0.8.4
|
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-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|