effective_orders 6.6.0 → 6.6.2

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: 4e804f4ca70a3cb57e200abd2dc81f3148db743f3f76680dd3368f34a631d355
4
- data.tar.gz: d88242d6315a34d6fe4aca05f44b8a0445e688cea8265439659d7be693010f59
3
+ metadata.gz: 86a4f7535e5766ae1bff99cbabd94b9b134c381c255a8f745ef6e63f5685f7cb
4
+ data.tar.gz: e55dd3dd359e7e46bd5bedb251eece208e36cabefef22caaa8c57e3eb84ee9c1
5
5
  SHA512:
6
- metadata.gz: fc681292de818d3248e8cf757a80ffe1efa097685036ded498c6f322a0181e175d069f85b551139cd1f52253dd866da3f3c3708aa3bcb6f436ccb634814bc853
7
- data.tar.gz: fe83a4ee4de83547f88e18b75d30996c884d7edb3721161cf64b180ead5b7780da27857f6ba342d7657242cd73655461d824f6f1780e1157563f3ac94440e555
6
+ metadata.gz: 968a79995bdd6ea7bb51d170145dc375fa6db28095238fad9f18c3e18b6126b4179e692715ae02f68fa707f9c94506418039250691dbf771e690ebe6413784d1
7
+ data.tar.gz: 0a346ecf19463553ebf8ee7ced123067ac750809036de53ba09775fb72a8d870572bfb49d2d8a16d91a9e41c10ed3aff5bdf4d31f97861ee477cc66399688061
@@ -44,7 +44,7 @@ module Admin
44
44
  order.purchased_at&.strftime('%F %H:%M') || ('pending refund' if order.pending_refund?) || ("pending #{order.payment_provider}" if order.deferred?) || 'not purchased'
45
45
  end
46
46
 
47
- col :purchased_by, search: :string
47
+ col :purchased_by, search: :string, visible: EffectiveOrders.organization_enabled?
48
48
 
49
49
  if attributes[:user_id].blank?
50
50
  col :user, search: :string
@@ -17,6 +17,12 @@ module Admin
17
17
  end
18
18
 
19
19
  col :purchased_at
20
+ col :purchased_by, search: :string, visible: EffectiveOrders.organization_enabled?
21
+
22
+ if EffectiveOrders.organization_enabled?
23
+ col :organization
24
+ end
25
+
20
26
  col :user
21
27
  col :order_items
22
28
  col :payment_provider, search: EffectiveOrders.payment_providers
@@ -49,10 +55,9 @@ module Admin
49
55
  end
50
56
 
51
57
  collection do
52
- Effective::Order.purchased
58
+ Effective::Order.purchased.deep
53
59
  .where(purchased_at: date_range)
54
60
  .where('total != 0')
55
- .includes(:user, [order_items: :purchasable])
56
61
  end
57
62
  end
58
63
  end
@@ -29,7 +29,7 @@ class EffectiveOrdersDatatable < Effective::Datatable
29
29
  order.purchased_at&.strftime('%F %H:%M') || 'not purchased'
30
30
  end
31
31
 
32
- col :purchased_by, search: :string
32
+ col :purchased_by, search: :string, visible: EffectiveOrders.organization_enabled?
33
33
  end
34
34
 
35
35
  if EffectiveOrders.billing_address
@@ -3,4 +3,4 @@
3
3
 
4
4
  - if EffectiveResources.authorized?(controller, :send_buyer_receipt, order)
5
5
  = dropdown_link_to 'E-mail Receipt', effective_orders.send_buyer_receipt_order_path(order),
6
- data: { method: :post, confirm: "Send receipt to #{order.email}?" }
6
+ data: { method: :post, confirm: "Send receipt to #{order.emails.first}?" }
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '6.6.0'.freeze
2
+ VERSION = '6.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.0
4
+ version: 6.6.2
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-08-01 00:00:00.000000000 Z
11
+ date: 2023-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails