effective_orders 4.2.5 → 4.2.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d19a1e1d922e08fadb09424738cfd86ae5c12db5e7553cbed17d4fb8a55ca57e
|
4
|
+
data.tar.gz: 0d65f0bbb387bbf804296a30f6822459bae66cdbd0053f82104f08af9d9b8c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ca8aa77355e8edfcb23834ff7f735f1ce3d775869ae9c6682d062b5fa4e0189e3afd7f29745d04abbd82d712b8272ec188cec8d210f8f8b23ec00d2ef0ff850
|
7
|
+
data.tar.gz: a4c3b95cfedd8600438a08e1f1b3ed93665e0f8ac45267ed6716a55079df483c731b2ffd4ce287a6d46488a4ccc8b9ec2ba04751f6d3e8338f04f84d0a0d5d45
|
@@ -22,13 +22,16 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
22
22
|
end
|
23
23
|
|
24
24
|
datatable do
|
25
|
-
order :id
|
25
|
+
order :id, :desc
|
26
26
|
|
27
27
|
bulk_actions_col
|
28
28
|
|
29
29
|
col :created_at, visible: false
|
30
30
|
col :updated_at, visible: false
|
31
|
-
|
31
|
+
|
32
|
+
col :id, label: 'Number' do |order|
|
33
|
+
'#' + order.to_param
|
34
|
+
end
|
32
35
|
|
33
36
|
col :purchased_at do |order|
|
34
37
|
order.purchased_at&.strftime('%F %H:%M') || 'not purchased'
|
@@ -9,14 +9,14 @@
|
|
9
9
|
%tbody
|
10
10
|
%tr
|
11
11
|
%td
|
12
|
-
-
|
12
|
+
- if order.billing_address.blank? || !EffectiveOrders.use_address_full_name
|
13
13
|
= order.billing_name
|
14
14
|
%br
|
15
15
|
|
16
16
|
- if order.billing_address.present?
|
17
|
-
= render :
|
17
|
+
= render partial: 'effective/addresses/address',
|
18
18
|
locals: { address: order.billing_address, email: order.user.email }
|
19
19
|
|
20
20
|
- if order.shipping_address.present?
|
21
21
|
%td
|
22
|
-
= render :
|
22
|
+
= render partial: 'effective/addresses/address', locals: { address: order.shipping_address }
|
@@ -6,6 +6,10 @@
|
|
6
6
|
- subscripter.quantity ||= subscripter.subscribable.subscribable_quantity_used
|
7
7
|
- subscripter.stripe_plan_id ||= Hash(plans.first)[:id]
|
8
8
|
|
9
|
+
- if subscripter.stripe_plan_id.present? && plans.present? && plans.none? { |plan| plan[:id] == subscripter.stripe_plan_id }
|
10
|
+
- closest_plan = plans.find { |plan| plan[:interval] == subscripter.plan[:interval] }
|
11
|
+
- subscripter.stripe_plan_id = closest_plan[:id] if closest_plan.present?
|
12
|
+
|
9
13
|
= effective_form_with(model: subscripter, url: effective_orders.subscripter_path, remote: true, data: { stripe: stripe, plans: plans }) do |f|
|
10
14
|
= f.hidden_field :subscribable_global_id
|
11
15
|
= f.hidden_field :stripe_token, value: nil
|
@@ -50,4 +54,7 @@
|
|
50
54
|
= render 'effective/subscripter/plan', plan: plan, f: f
|
51
55
|
|
52
56
|
= f.submit(border: false, center: true) do
|
53
|
-
|
57
|
+
- if f.object.token_required?
|
58
|
+
= f.save('Continue to Billing', class: 'effective-orders-stripe-token-required')
|
59
|
+
- else
|
60
|
+
= f.save('Upgrade Now')
|
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: 4.2.
|
4
|
+
version: 4.2.6
|
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: 2020-03-
|
11
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|