effective_orders 6.23.2 → 6.24.0
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 +4 -4
- data/app/controllers/admin/order_reports_controller.rb +8 -0
- data/app/datatables/admin/effective_orders_datatable.rb +23 -13
- data/app/datatables/admin/report_transactions_grouped_by_name_datatable.rb +10 -8
- data/app/datatables/admin/report_transactions_grouped_by_qb_name_datatable.rb +10 -8
- data/config/routes.rb +1 -0
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da5a3039ab999f6469ee93178d23257c81724a4532548e536af212e082ea782
|
4
|
+
data.tar.gz: 94e9f7086405b091105bb47ffd9d7fc4181c04f9eba5cdfd1f176285959d2c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebb63ef8c77027aef6a2fa831a14c96e22044746f208054c364d556b458f137adf16fb357ae60b00b09c1eb45a11208b9f2ac879548be8ccad1e9c87a0dbd6da
|
7
|
+
data.tar.gz: 83182d0a3220cdf5cf6ea93c7828fc90d8d3c124b4e48a9f3e54a50693de6b77bb087cf64a6da5ebfe30204a0d20d1ee6bc3d5909139cb2890f64cb82fc0e36d
|
@@ -32,6 +32,14 @@ module Admin
|
|
32
32
|
render 'index'
|
33
33
|
end
|
34
34
|
|
35
|
+
# This is used by the transactions_grouped_by_name and transactions_grouped_by_qb_name datatables
|
36
|
+
# To display a nested datatable of the orders
|
37
|
+
def nested_orders
|
38
|
+
ids = params[:ids].to_s.split("|")
|
39
|
+
@datatable = Admin::EffectiveOrdersDatatable.new(ids: ids, skip_filters: true, skip_bulk_actions: true)
|
40
|
+
nested_datatable_action
|
41
|
+
end
|
42
|
+
|
35
43
|
def payment_providers
|
36
44
|
@datatable = Admin::ReportPaymentProvidersDatatable.new
|
37
45
|
@page_title = @datatable.datatable_name
|
@@ -1,17 +1,19 @@
|
|
1
1
|
module Admin
|
2
2
|
class EffectiveOrdersDatatable < Effective::Datatable
|
3
3
|
bulk_actions do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
unless attributes[:skip_bulk_actions]
|
5
|
+
bulk_action(
|
6
|
+
'Send payment request email to selected orders',
|
7
|
+
effective_orders.bulk_send_payment_request_admin_orders_path,
|
8
|
+
data: { confirm: 'Send payment request emails?' }
|
9
|
+
)
|
10
|
+
|
11
|
+
bulk_action(
|
12
|
+
'Send invoice email to selected purchased orders',
|
13
|
+
effective_orders.bulk_send_order_email_to_buyer_orders_path,
|
14
|
+
data: { confirm: 'Send invoice emails?' }
|
15
|
+
)
|
16
|
+
end
|
15
17
|
end
|
16
18
|
|
17
19
|
filters do
|
@@ -32,7 +34,9 @@ module Admin
|
|
32
34
|
datatable do
|
33
35
|
order :updated_at
|
34
36
|
|
35
|
-
|
37
|
+
unless attributes[:skip_bulk_actions]
|
38
|
+
bulk_actions_col
|
39
|
+
end
|
36
40
|
|
37
41
|
col :created_at, visible: false
|
38
42
|
col :updated_at, visible: false
|
@@ -116,7 +120,9 @@ module Admin
|
|
116
120
|
col :note_to_buyer, visible: false
|
117
121
|
col :note_internal, visible: false
|
118
122
|
|
119
|
-
|
123
|
+
unless attributes[:skip_actions]
|
124
|
+
actions_col
|
125
|
+
end
|
120
126
|
|
121
127
|
unless attributes[:total] == false
|
122
128
|
aggregate :total
|
@@ -147,6 +153,10 @@ module Admin
|
|
147
153
|
scope = scope.where(parent_id: attributes[:parent_id], parent_type: attributes[:parent_type])
|
148
154
|
end
|
149
155
|
|
156
|
+
if attributes[:ids].present?
|
157
|
+
scope = scope.where(id: attributes[:ids])
|
158
|
+
end
|
159
|
+
|
150
160
|
scope
|
151
161
|
end
|
152
162
|
|
@@ -18,14 +18,16 @@ module Admin
|
|
18
18
|
col("p - #{provider}", as: :price, visible: false)
|
19
19
|
end
|
20
20
|
|
21
|
-
col :orders_count
|
22
|
-
|
23
|
-
|
24
|
-
orders.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
col :orders_count, visible: false
|
22
|
+
|
23
|
+
col(:orders, col_class: 'col-actions') do |orders|
|
24
|
+
if orders.present?
|
25
|
+
title = pluralize(orders.length, 'orders')
|
26
|
+
order_ids = orders.map(&:id).join("|")
|
27
|
+
|
28
|
+
path = effective_orders.nested_orders_admin_order_reports_path(ids: order_ids)
|
29
|
+
nested_datatable_link_to(title, path)
|
30
|
+
end
|
29
31
|
end
|
30
32
|
|
31
33
|
col :users, visible: false
|
@@ -18,14 +18,16 @@ module Admin
|
|
18
18
|
col("p - #{provider}", as: :price, visible: false)
|
19
19
|
end
|
20
20
|
|
21
|
-
col :orders_count
|
22
|
-
|
23
|
-
|
24
|
-
orders.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
col :orders_count, visible: false
|
22
|
+
|
23
|
+
col(:orders, col_class: 'col-actions') do |orders|
|
24
|
+
if orders.present?
|
25
|
+
title = pluralize(orders.length, 'orders')
|
26
|
+
order_ids = orders.map(&:id).join("|")
|
27
|
+
|
28
|
+
path = effective_orders.nested_orders_admin_order_reports_path(ids: order_ids)
|
29
|
+
nested_datatable_link_to(title, path)
|
30
|
+
end
|
29
31
|
end
|
30
32
|
|
31
33
|
col :users, visible: false
|
data/config/routes.rb
CHANGED
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.
|
4
|
+
version: 6.24.0
|
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: 2025-
|
11
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|