effective_events 0.20.2 → 0.20.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: 28f5c7415e3b84908b2656bbd58cf74e202b924086f0c735b640063ab2bfca2d
4
- data.tar.gz: c8cd136cfdfba553ddaf73c63d977d883486e72a775630fbcd85778baa38a4c7
3
+ metadata.gz: 0e12380e8bc5f8d3cb7c8aca29a41195601e80d5254679a416883ac4978f9ce3
4
+ data.tar.gz: 2640f55717703f890452ebd971978a639bcc72a344ec05d3c67466e8aa94ab85
5
5
  SHA512:
6
- metadata.gz: 6d515ddf50f3e622c92af47f17cb69cd4315da25001e7c236c0f98bb05b068ad3a19db2611ab66e58f461982a691ca7601cc473ad98a596fc41d07bab73ac198
7
- data.tar.gz: 7481e857dbc9bd01a2b1b192b3115cb0e8385e93ad4e011f060311d7432ff6cd7804f788657b0525550bc4200367a1e14e31321a95aaca3b15b6028505bc8d23
6
+ metadata.gz: 80f0a6730bf416ad9b51850487a7f0702d4b3c4a0e4fa07e923163a86384ee6958d423261fc63f98cb664faccd26dfb60166d240ec3879d9c3809a9e1db07a8a
7
+ data.tar.gz: 680987d30c84a812b21b11f4c50555ae2a79881f8e80023a14c53052037c2e8c4722d5f269442acbd216f9c65b0e18af514f6c3204945fbe8bbd490fd23066e6
@@ -21,7 +21,7 @@ module Admin
21
21
 
22
22
  col :event
23
23
 
24
- col :owner, visible: false
24
+ col :owner
25
25
  col :event_registration, visible: false
26
26
 
27
27
  if attributes[:event_id]
@@ -56,7 +56,7 @@ module Admin
56
56
  end
57
57
  end
58
58
 
59
- col :user, label: 'Member', visible: false
59
+ col :user, visible: false
60
60
  col :organization, visible: false
61
61
 
62
62
  col :orders, visible: false
@@ -81,6 +81,10 @@ module Admin
81
81
  scope = scope.where(event: event)
82
82
  end
83
83
 
84
+ if (user_id = attributes[:for_id]).present? && (user_type = attributes[:for_type]).present?
85
+ scope = scope.where(user_id: user_id, user_type: user_type).or(scope.where(owner_id: user_id, owner_type: user_type))
86
+ end
87
+
84
88
  scope
85
89
  end
86
90
 
@@ -94,8 +94,10 @@ module Effective
94
94
 
95
95
  save!
96
96
 
97
- order = Effective::Order.new(items: self, user: owner)
98
- order.purchase!(skip_buyer_validations: true, email: false)
97
+ unless registered?
98
+ order = Effective::Order.new(items: self, user: owner)
99
+ order.purchase!(skip_buyer_validations: true, email: false)
100
+ end
99
101
 
100
102
  true
101
103
  end
@@ -23,4 +23,7 @@
23
23
 
24
24
  = f.check_box :archived, label: "Archive this addon. It will be displayed as archived on the owner's event registration"
25
25
 
26
- = f.submit 'Save'
26
+ - if f.object.new_record?
27
+ = f.submit 'Save and Mark Registered'
28
+ - else
29
+ = f.submit 'Save'
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.20.2'.freeze
2
+ VERSION = '0.20.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.2
4
+ version: 0.20.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: 2024-08-28 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails