effective_orders 5.2.3 → 5.2.7
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 419b2992feb9ade2fb499b58fc73083cd8a4f1079fb1e355477bf32c0f75a3f4
|
4
|
+
data.tar.gz: f31d171a1fd01cdf25dc897080e61797f9d7f2c98b769bde536e59046bee8761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8c6d641ed49d7560d37351dea431f39252cd9e29a0a523c3f4173b9bb72a61315c1ed332a9979938626a80ced4235baafd5c7f753ca6a37c3d1ac97cb4ef3a8
|
7
|
+
data.tar.gz: 6624bddc0a1e3c51b8f13cb3bb3f61830831ec7207233cc420187af0e5dc5cee5a49466fe5ea0896d58caff8980d5c4c1b3a3111ad7e603632ce0b535c5e8ea2
|
@@ -93,7 +93,10 @@ class Admin::EffectiveOrdersDatatable < Effective::Datatable
|
|
93
93
|
end
|
94
94
|
|
95
95
|
if attributes[:user_id].present?
|
96
|
-
|
96
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
97
|
+
user_klass ||= current_user.class
|
98
|
+
|
99
|
+
user = user_klass.find(attributes[:user_id])
|
97
100
|
scope = scope.where(user: user)
|
98
101
|
end
|
99
102
|
|
@@ -62,7 +62,10 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
62
62
|
end
|
63
63
|
|
64
64
|
collection do
|
65
|
-
|
65
|
+
user_klass = (attributes[:user_type].constantize if attributes[:user_type].present?)
|
66
|
+
user_klass ||= current_user.class
|
67
|
+
|
68
|
+
user = user_klass.find(attributes[:user_id])
|
66
69
|
|
67
70
|
scope = Effective::Order.all.deep.where(user: user)
|
68
71
|
|
@@ -320,7 +320,7 @@ module Effective
|
|
320
320
|
|
321
321
|
# For moneris and moneris_checkout. Just a unique value.
|
322
322
|
def transaction_id
|
323
|
-
[to_param, billing_name.to_s.parameterize.presence, Time.zone.now.to_i].compact.join('-')
|
323
|
+
[to_param, billing_name.to_s.parameterize.presence, Time.zone.now.to_i, rand(10000)].compact.join('-')
|
324
324
|
end
|
325
325
|
|
326
326
|
def billing_first_name
|
@@ -596,7 +596,7 @@ module Effective
|
|
596
596
|
end
|
597
597
|
|
598
598
|
def assign_email
|
599
|
-
self.email = user&.email
|
599
|
+
self.email = user&.email if user&.email.present?
|
600
600
|
end
|
601
601
|
|
602
602
|
def assign_last_address
|
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: 5.2.
|
4
|
+
version: 5.2.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: 2021-12-
|
11
|
+
date: 2021-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|