effective_memberships 0.17.5 → 0.17.7

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: ef70771a4a2a9d5a9664b76dda457120845bd43ead1b684af0d71a8560331cb6
4
- data.tar.gz: 585c057a19577bf1f5e4c6abca5e62fe7d55131090dcaa3f0839573b4e3a7bb0
3
+ metadata.gz: a1c595c47725e74e8e78cd82360ca33ef5bb778a47f217ecfa6fb8a30452df6b
4
+ data.tar.gz: 41f45a5ac18a4c0f6448620e6c0b1bcfd6c937028c28783b7b35225a620496f6
5
5
  SHA512:
6
- metadata.gz: 5f0e3096d63739c7d5e9e4de4c82c5876e8f2b70bd9ce297c23aa71fc54a302d19c7c31c3ba9e64bd53469d1e7e7f44f4afb8bf0529125bc3d9da58b6092852c
7
- data.tar.gz: d1b95965cc3993a43f94273802aa8f7199d5107508be1858217a28644ab0fa3df48c003bd47352eef38be325ab1713398de15b2871de1d72f44ec98b526bbb85
6
+ metadata.gz: c6d24ab45dfce8b8e8f4efd2c93ca865408f2a3c4de8db61b9c0163cc750d22b5eb955bcc1bb0ea6d2cd4f9905707902bbd89d56c95bec9a17e4e02098e52adf
7
+ data.tar.gz: 132237106d797e86db32d255ae35404ca34ea140879cc51d6445705e20fbbbf61f94f016cc2fd02e31629d139daf808a036812626b7af54e0523c44d777c399e
@@ -37,6 +37,7 @@ module EffectiveMembershipsApplicant
37
37
  acts_as_email_form
38
38
  acts_as_purchasable_parent
39
39
  acts_as_tokened
40
+ acts_as_reportable if respond_to?(:acts_as_reportable)
40
41
 
41
42
  acts_as_statused(
42
43
  :draft, # Just Started
@@ -77,7 +78,6 @@ module EffectiveMembershipsApplicant
77
78
 
78
79
  has_many_attached :applicant_files
79
80
  has_many_attached :transcripts
80
-
81
81
  has_many_purgable if respond_to?(:has_many_purgable)
82
82
 
83
83
  # Transcripts Step
@@ -190,6 +190,11 @@ module EffectiveMembershipsApplicant
190
190
  timestamps
191
191
  end
192
192
 
193
+ # effective_reports
194
+ def reportable_scopes
195
+ { draft: nil, submitted: nil, in_progress: nil, done: nil }
196
+ end
197
+
193
198
  scope :deep, -> { includes(:user, :organization, :category, :from_category, :from_status, :orders) }
194
199
  scope :sorted, -> { order(:id) }
195
200
 
@@ -3,6 +3,7 @@ module Effective
3
3
  acts_as_purchasable
4
4
 
5
5
  log_changes(to: :owner) if respond_to?(:log_changes)
6
+ acts_as_reportable if respond_to?(:acts_as_reportable)
6
7
 
7
8
  # Every fee is charged to a owner: a user or an organization
8
9
  belongs_to :owner, polymorphic: true
@@ -39,6 +40,11 @@ module Effective
39
40
  timestamps
40
41
  end
41
42
 
43
+ # effective_reports
44
+ def reportable_scopes
45
+ { purchased: nil, not_purchased: nil }
46
+ end
47
+
42
48
  scope :sorted, -> { order(:id) }
43
49
  scope :deep, -> { includes(:owner, :parent, :category) }
44
50
 
@@ -0,0 +1,15 @@
1
+ %h2= et(EffectiveMemberships.MembershipCard)
2
+
3
+ - membership = current_user.membership
4
+ - card = EffectiveMemberships.MembershipCard.new(membership: membership)
5
+
6
+ - if membership.present? && EffectiveResources.authorized?(self, :show, card)
7
+ %p
8
+ Your membership card for
9
+ = membership.owner.to_s
10
+ = membership.categories.to_sentence
11
+ is available for download
12
+
13
+ %p= link_to "Download #{et(EffectiveMemberships.MembershipCard)}", effective_memberships.membership_card_membership_path(membership, format: :pdf), class: 'btn btn-primary'
14
+ - else
15
+ %p You don't have a membership card. When you do, we'll show it here.
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.17.5'
2
+ VERSION = '0.17.7'
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.17.5
4
+ version: 0.17.7
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-05-11 00:00:00.000000000 Z
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -515,6 +515,7 @@ files:
515
515
  - app/views/effective/fee_payments/summary.html.haml
516
516
  - app/views/effective/fees/_dashboard.html.haml
517
517
  - app/views/effective/fees/_fee.html.haml
518
+ - app/views/effective/membership_cards/_dashboard.html.haml
518
519
  - app/views/effective/membership_cards/index.html.haml
519
520
  - app/views/effective/membership_directory/_form.html.haml
520
521
  - app/views/effective/membership_directory/_layout.html.haml