effective_orders 3.0.1 → 3.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 087ee5d1dd1c2882afcbe2f455c21b9c9a88fb84
4
- data.tar.gz: c51480679d42773312d8fd384515f3ca302dfaf2
2
+ SHA256:
3
+ metadata.gz: 5d975c31db44e626807e5a0f7b1ccb5c21016034daeaad2aef937a79894a322e
4
+ data.tar.gz: 5c0ced22f719a0e4c63004d7e0a973f7ae1415665788c0e7bab17519fe23c5e8
5
5
  SHA512:
6
- metadata.gz: ae149e37f2810d9dea9cb2c2177e2349f7addd84cc53d3350836f2605c84ec958e8d5691750785aa7a3f3e247e3302756663e73bd205712d86f6d8cd01c641b5
7
- data.tar.gz: f52633ba98f00efe3c71740f7385106a9e557fbc3773d0f2c372a677ad1ff668585022ad3d7da952a2172e290bb9109e7295cb0a908146215dfbff248fb4aac0
6
+ metadata.gz: c2ab9082782d9ed8a5cf18881a1c2a6db96a863a7df47862053fa2a951c8d43c9ba7b5f5527a39f0f71a26ccf55fa477fb9c7605eb3352bef71affd1a84879c3
7
+ data.tar.gz: b2241e34923fa1a102f96957763e3eaac53079f2c71c82a2863aae3a589659bcee0d536e07a92f4912025efd7621b9ca568d5ac988bfcf7af06622e1c93ca3b4
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2018 Code and Effect Inc.
1
+ Copyright 2019 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -22,7 +22,14 @@ class EffectiveOrdersDatatable < Effective::Datatable
22
22
 
23
23
  col :purchased_at
24
24
 
25
- col :id
25
+ if EffectiveOrders.obfuscate_order_ids
26
+ col(:id, as: :obfuscated_id) do |order|
27
+ obfuscated_id = order.to_param
28
+ link_to(obfuscated_id, (admin_namespace? ? effective_orders.admin_order_path(obfuscated_id) : effective_orders.order_path(obfuscated_id)))
29
+ end
30
+ else
31
+ col :id
32
+ end
26
33
 
27
34
  if attributes[:user_id].blank?
28
35
  col :user, label: 'Buyer', search: :string, sort: :email do |order|
@@ -48,14 +55,14 @@ class EffectiveOrdersDatatable < Effective::Datatable
48
55
  col :shipping_address
49
56
  end
50
57
 
51
- col :purchase_state, label: 'State', search: { collection: EffectiveOrders::PURCHASE_STATES.invert } do |order|
58
+ col :purchase_state, label: 'State', search: { collection: EffectiveOrders::PURCHASE_STATES.invert, value: 'purchased' } do |order|
52
59
  EffectiveOrders::PURCHASE_STATES[order.purchase_state]
53
60
  end
54
61
 
55
62
  col :order_items, search: { as: :string }
56
63
 
57
- col :subtotal, as: :price
58
- col :tax, as: :price
64
+ col :subtotal, as: :price, visible: false
65
+ col :tax, as: :price, visible: false
59
66
 
60
67
  col :tax_rate, visible: false do |order|
61
68
  tax_rate_to_percentage(order.tax_rate)
@@ -10,7 +10,8 @@
10
10
  %tr
11
11
  %td
12
12
  - if order.billing_address.present?
13
- = render :partial => 'effective/addresses/address', :locals => {:address => order.billing_address}
13
+ = render :partial => 'effective/addresses/address',
14
+ locals: {address: order.billing_address, email: order.user.email }
14
15
  - else
15
16
  = order.billing_name
16
17
  %br
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '3.0.1'.freeze
2
+ VERSION = '3.0.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: 3.0.1
4
+ version: 3.0.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: 2018-03-09 00:00:00.000000000 Z
11
+ date: 2019-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -269,8 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
271
  requirements: []
272
- rubyforge_project:
273
- rubygems_version: 2.4.5.1
272
+ rubygems_version: 3.0.3
274
273
  signing_key:
275
274
  specification_version: 4
276
275
  summary: Quickly build an online store with carts, orders, automatic email receipts