solidus_backend 4.3.5 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/namespaces.js +0 -1
- data/app/assets/javascripts/spree/backend/templates/index.js +0 -3
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +11 -8
- data/app/assets/javascripts/spree/backend/views/cart/empty_cart_button.js +1 -1
- data/app/assets/javascripts/spree/backend/views/index.js +0 -2
- data/app/assets/javascripts/spree/backend/views/order/details_adjustments.js +1 -2
- data/app/assets/javascripts/spree/backend.js +0 -2
- data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +0 -3
- data/app/assets/stylesheets/spree/backend/sections/index.scss +0 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/dashboards_controller.rb +4 -0
- data/app/controllers/spree/admin/option_types_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
- data/app/controllers/spree/admin/resource_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +2 -2
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +0 -1
- data/app/views/spree/admin/dashboards/home.html.erb +1 -0
- data/app/views/spree/admin/orders/_adjustments.html.erb +1 -1
- data/app/views/spree/admin/orders/_order_details.html.erb +3 -3
- data/app/views/spree/admin/orders/confirm.html.erb +3 -3
- data/app/views/spree/admin/orders/index.html.erb +4 -82
- data/app/views/spree/admin/products/index.html.erb +2 -2
- data/app/views/spree/admin/shared/_locale_selection_solidus_admin.html.erb +1 -1
- data/app/views/spree/admin/shared/search_fields/_checkbox.html.erb +8 -0
- data/app/views/spree/admin/shared/search_fields/_date_range_picker.html.erb +16 -0
- data/app/views/spree/admin/shared/search_fields/_select.html.erb +6 -0
- data/app/views/spree/admin/shared/search_fields/_text_field.html.erb +6 -0
- data/app/views/spree/admin/shared/search_fields/_variant_autocomplete.html.erb +6 -0
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +1 -1
- data/app/views/spree/admin/users/items.html.erb +3 -3
- data/app/views/spree/admin/users/orders.html.erb +3 -3
- data/app/views/spree/admin/variants/_form.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/config/routes.rb +0 -11
- data/lib/spree/backend_configuration.rb +83 -18
- data/solidus_backend.gemspec +2 -2
- metadata +13 -73
- data/app/assets/javascripts/spree/backend/promotions/activation.js +0 -26
- data/app/assets/javascripts/spree/backend/promotions.js +0 -35
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +0 -23
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +0 -23
- data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +0 -12
- data/app/assets/javascripts/spree/backend/views/calculators/tiered.js +0 -54
- data/app/assets/javascripts/spree/backend/views/promotions/option_values_rule.js +0 -79
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +0 -138
- data/app/controllers/spree/admin/promotion_actions_controller.rb +0 -51
- data/app/controllers/spree/admin/promotion_categories_controller.rb +0 -8
- data/app/controllers/spree/admin/promotion_code_batches_controller.rb +0 -30
- data/app/controllers/spree/admin/promotion_codes_controller.rb +0 -48
- data/app/controllers/spree/admin/promotion_rules_controller.rb +0 -60
- data/app/controllers/spree/admin/promotions_controller.rb +0 -67
- data/app/helpers/spree/admin/promotions_helper.rb +0 -15
- data/app/helpers/spree/promotion_rules_helper.rb +0 -12
- data/app/views/spree/admin/promotion_actions/create.js.erb +0 -10
- data/app/views/spree/admin/promotion_actions/destroy.js.erb +0 -1
- data/app/views/spree/admin/promotion_categories/_form.html.erb +0 -14
- data/app/views/spree/admin/promotion_categories/edit.html.erb +0 -10
- data/app/views/spree/admin/promotion_categories/index.html.erb +0 -47
- data/app/views/spree/admin/promotion_categories/new.html.erb +0 -10
- data/app/views/spree/admin/promotion_code_batches/_form_fields.html.erb +0 -22
- data/app/views/spree/admin/promotion_code_batches/download.csv.ruby +0 -8
- data/app/views/spree/admin/promotion_code_batches/index.html.erb +0 -65
- data/app/views/spree/admin/promotion_code_batches/new.html.erb +0 -8
- data/app/views/spree/admin/promotion_codes/index.csv.ruby +0 -8
- data/app/views/spree/admin/promotion_codes/index.html.erb +0 -32
- data/app/views/spree/admin/promotion_codes/new.html.erb +0 -31
- data/app/views/spree/admin/promotion_rules/create.js.erb +0 -8
- data/app/views/spree/admin/promotion_rules/destroy.js.erb +0 -3
- data/app/views/spree/admin/promotions/_actions.html.erb +0 -37
- data/app/views/spree/admin/promotions/_activations_edit.html.erb +0 -22
- data/app/views/spree/admin/promotions/_activations_new.html.erb +0 -43
- data/app/views/spree/admin/promotions/_form.html.erb +0 -67
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +0 -13
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +0 -12
- data/app/views/spree/admin/promotions/_rules.html.erb +0 -42
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +0 -2
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +0 -6
- data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +0 -10
- data/app/views/spree/admin/promotions/actions/_free_shipping.html.erb +0 -0
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +0 -29
- data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +0 -6
- data/app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb +0 -56
- data/app/views/spree/admin/promotions/calculators/flat_rate/_fields.html.erb +0 -6
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +0 -30
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +0 -30
- data/app/views/spree/admin/promotions/edit.html.erb +0 -35
- data/app/views/spree/admin/promotions/index.html.erb +0 -124
- data/app/views/spree/admin/promotions/new.html.erb +0 -9
- data/app/views/spree/admin/promotions/rules/_first_order.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +0 -13
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +0 -14
- data/app/views/spree/admin/promotions/rules/_minimum_quantity.html.erb +0 -5
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +0 -12
- data/app/views/spree/admin/promotions/rules/_one_use_per_user.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +0 -13
- data/app/views/spree/admin/promotions/rules/_product.html.erb +0 -15
- data/app/views/spree/admin/promotions/rules/_store.html.erb +0 -6
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +0 -9
- data/app/views/spree/admin/promotions/rules/_user.html.erb +0 -4
- data/app/views/spree/admin/promotions/rules/_user_logged_in.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +0 -12
- data/bin/rails +0 -13
@@ -19,6 +19,89 @@ module Spree
|
|
19
19
|
solidus_admin: 'spree/backend/themes/solidus_admin'
|
20
20
|
}
|
21
21
|
|
22
|
+
preference :search_fields, :hash, default: {
|
23
|
+
"spree/admin/orders" => [
|
24
|
+
{
|
25
|
+
partial: "spree/admin/shared/search_fields/date_range_picker",
|
26
|
+
locals: {
|
27
|
+
attribute: :created_at,
|
28
|
+
label: -> { I18n.t(:date_range, scope: :spree) }
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
partial: "spree/admin/shared/search_fields/select",
|
33
|
+
locals: {
|
34
|
+
ransack: :state_eq,
|
35
|
+
label: -> { I18n.t(:status, scope: :spree) },
|
36
|
+
options: -> {
|
37
|
+
Spree::Order.state_machines[:state].states.collect { |s| [I18n.t(s.name, scope: 'spree.order_state'), s.value] }
|
38
|
+
}
|
39
|
+
}
|
40
|
+
},
|
41
|
+
{
|
42
|
+
partial: "spree/admin/shared/search_fields/select",
|
43
|
+
locals: {
|
44
|
+
ransack: :shipment_state_eq,
|
45
|
+
label: -> { I18n.t(:shipment_state, scope: :spree) },
|
46
|
+
options: -> {
|
47
|
+
%i[backorder canceled partial pending ready shipped].map { |state| [I18n.t("spree.shipment_states.#{state}"), state] }
|
48
|
+
}
|
49
|
+
}
|
50
|
+
},
|
51
|
+
{
|
52
|
+
partial: "spree/admin/shared/search_fields/variant_autocomplete",
|
53
|
+
locals: {
|
54
|
+
ransack: :line_items_variant_id_in,
|
55
|
+
label: -> { I18n.t(:variant, scope: :spree) }
|
56
|
+
}
|
57
|
+
},
|
58
|
+
{
|
59
|
+
partial: "spree/admin/shared/search_fields/text_field",
|
60
|
+
locals: {
|
61
|
+
ransack: :number_start,
|
62
|
+
label: -> { I18n.t(:order_number, scope: :spree, number: "") }
|
63
|
+
}
|
64
|
+
},
|
65
|
+
{
|
66
|
+
partial: "spree/admin/shared/search_fields/text_field",
|
67
|
+
locals: {
|
68
|
+
ransack: :shipments_number_start,
|
69
|
+
label: -> { I18n.t(:shipment_number, scope: :spree) }
|
70
|
+
}
|
71
|
+
},
|
72
|
+
{
|
73
|
+
partial: "spree/admin/shared/search_fields/text_field",
|
74
|
+
locals: {
|
75
|
+
ransack: :bill_address_name_cont,
|
76
|
+
label: -> { I18n.t(:name_contains, scope: :spree) }
|
77
|
+
}
|
78
|
+
},
|
79
|
+
{
|
80
|
+
partial: "spree/admin/shared/search_fields/text_field",
|
81
|
+
locals: {
|
82
|
+
ransack: :email_start,
|
83
|
+
label: -> { I18n.t(:email, scope: :spree) }
|
84
|
+
}
|
85
|
+
},
|
86
|
+
{
|
87
|
+
partial: "spree/admin/shared/search_fields/select",
|
88
|
+
locals: {
|
89
|
+
ransack: :store_id_eq,
|
90
|
+
label: -> { I18n.t(:store, scope: :spree) },
|
91
|
+
options: -> { Spree::Store.all.map { |store| [store.name, store.id] } },
|
92
|
+
},
|
93
|
+
if: -> { Spree::Store.many? }
|
94
|
+
},
|
95
|
+
{
|
96
|
+
partial: "spree/admin/shared/search_fields/checkbox",
|
97
|
+
locals: {
|
98
|
+
ransack: :completed_at_not_null,
|
99
|
+
label: -> { I18n.t(:show_only_complete_orders, scope: :spree) }
|
100
|
+
}
|
101
|
+
}
|
102
|
+
]
|
103
|
+
}
|
104
|
+
|
22
105
|
# @!attribute [rw] theme
|
23
106
|
# @return [String] Default admin theme name
|
24
107
|
versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin", "4.4.0" => "solidus" }
|
@@ -129,24 +212,6 @@ module Spree
|
|
129
212
|
),
|
130
213
|
],
|
131
214
|
),
|
132
|
-
MenuItem.new(
|
133
|
-
label: :promotions,
|
134
|
-
icon: admin_updated_navbar ? 'ri-megaphone-line' : 'bullhorn',
|
135
|
-
partial: 'spree/admin/shared/promotion_sub_menu',
|
136
|
-
condition: -> { can?(:admin, Spree::Promotion) },
|
137
|
-
url: :admin_promotions_path,
|
138
|
-
data_hook: :admin_promotion_sub_tabs,
|
139
|
-
children: [
|
140
|
-
MenuItem.new(
|
141
|
-
label: :promotions,
|
142
|
-
condition: -> { can?(:admin, Spree::Promotion) },
|
143
|
-
),
|
144
|
-
MenuItem.new(
|
145
|
-
label: :promotion_categories,
|
146
|
-
condition: -> { can?(:admin, Spree::PromotionCategory) },
|
147
|
-
),
|
148
|
-
],
|
149
|
-
),
|
150
215
|
MenuItem.new(
|
151
216
|
label: :stock,
|
152
217
|
icon: admin_updated_navbar ? 'ri-stack-line' : 'cubes',
|
data/solidus_backend.gemspec
CHANGED
@@ -17,10 +17,10 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.metadata['rubygems_mfa_required'] = 'true'
|
18
18
|
|
19
19
|
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
-
f.match(%r{^(spec|
|
20
|
+
f.match(%r{^(spec|bin)/})
|
21
21
|
end
|
22
22
|
|
23
|
-
s.required_ruby_version = '>= 3.
|
23
|
+
s.required_ruby_version = '>= 3.1.0'
|
24
24
|
s.required_rubygems_version = '>= 1.8.23'
|
25
25
|
|
26
26
|
s.add_dependency 'solidus_api', s.version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.4.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
26
|
+
version: 4.4.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: solidus_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.
|
33
|
+
version: 4.4.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.
|
40
|
+
version: 4.4.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: font-awesome-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,8 +198,6 @@ files:
|
|
198
198
|
- app/assets/javascripts/spree/backend/product_picker.js
|
199
199
|
- app/assets/javascripts/spree/backend/products/index.js
|
200
200
|
- app/assets/javascripts/spree/backend/progress.js
|
201
|
-
- app/assets/javascripts/spree/backend/promotions.js
|
202
|
-
- app/assets/javascripts/spree/backend/promotions/activation.js
|
203
201
|
- app/assets/javascripts/spree/backend/shipments.js
|
204
202
|
- app/assets/javascripts/spree/backend/shipping_methods/stock_locations_picker.js
|
205
203
|
- app/assets/javascripts/spree/backend/spree-select2.js
|
@@ -218,9 +216,6 @@ files:
|
|
218
216
|
- app/assets/javascripts/spree/backend/templates/orders/shipping_method.hbs
|
219
217
|
- app/assets/javascripts/spree/backend/templates/products/sortable.hbs
|
220
218
|
- app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs
|
221
|
-
- app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs
|
222
|
-
- app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs
|
223
|
-
- app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs
|
224
219
|
- app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs
|
225
220
|
- app/assets/javascripts/spree/backend/templates/tables/return_item_sum_amount.hbs
|
226
221
|
- app/assets/javascripts/spree/backend/templates/tables/selectable_label.hbs
|
@@ -233,7 +228,6 @@ files:
|
|
233
228
|
- app/assets/javascripts/spree/backend/turbolinks-integration.js
|
234
229
|
- app/assets/javascripts/spree/backend/user_picker.js
|
235
230
|
- app/assets/javascripts/spree/backend/variant_autocomplete.js
|
236
|
-
- app/assets/javascripts/spree/backend/views/calculators/tiered.js
|
237
231
|
- app/assets/javascripts/spree/backend/views/cart/add_line_item_button.js
|
238
232
|
- app/assets/javascripts/spree/backend/views/cart/empty_cart_button.js
|
239
233
|
- app/assets/javascripts/spree/backend/views/cart/line_item_row.js
|
@@ -254,7 +248,6 @@ files:
|
|
254
248
|
- app/assets/javascripts/spree/backend/views/payment/new.js
|
255
249
|
- app/assets/javascripts/spree/backend/views/payment/payment_row.js
|
256
250
|
- app/assets/javascripts/spree/backend/views/product/search.js
|
257
|
-
- app/assets/javascripts/spree/backend/views/promotions/option_values_rule.js
|
258
251
|
- app/assets/javascripts/spree/backend/views/state_select.js
|
259
252
|
- app/assets/javascripts/spree/backend/views/stock/add_stock_item.js
|
260
253
|
- app/assets/javascripts/spree/backend/views/stock/edit_stock_item_row.js
|
@@ -306,7 +299,6 @@ files:
|
|
306
299
|
- app/assets/stylesheets/spree/backend/sections/_log_entries.scss
|
307
300
|
- app/assets/stylesheets/spree/backend/sections/_orders.scss
|
308
301
|
- app/assets/stylesheets/spree/backend/sections/_products.scss
|
309
|
-
- app/assets/stylesheets/spree/backend/sections/_promotions.scss
|
310
302
|
- app/assets/stylesheets/spree/backend/sections/_return_authorizations.scss
|
311
303
|
- app/assets/stylesheets/spree/backend/sections/_stock_management.scss
|
312
304
|
- app/assets/stylesheets/spree/backend/sections/_store_credits.scss
|
@@ -356,12 +348,6 @@ files:
|
|
356
348
|
- app/controllers/spree/admin/prices_controller.rb
|
357
349
|
- app/controllers/spree/admin/product_properties_controller.rb
|
358
350
|
- app/controllers/spree/admin/products_controller.rb
|
359
|
-
- app/controllers/spree/admin/promotion_actions_controller.rb
|
360
|
-
- app/controllers/spree/admin/promotion_categories_controller.rb
|
361
|
-
- app/controllers/spree/admin/promotion_code_batches_controller.rb
|
362
|
-
- app/controllers/spree/admin/promotion_codes_controller.rb
|
363
|
-
- app/controllers/spree/admin/promotion_rules_controller.rb
|
364
|
-
- app/controllers/spree/admin/promotions_controller.rb
|
365
351
|
- app/controllers/spree/admin/properties_controller.rb
|
366
352
|
- app/controllers/spree/admin/refund_reasons_controller.rb
|
367
353
|
- app/controllers/spree/admin/refunds_controller.rb
|
@@ -400,12 +386,10 @@ files:
|
|
400
386
|
- app/helpers/spree/admin/navigation_helper.rb
|
401
387
|
- app/helpers/spree/admin/orders_helper.rb
|
402
388
|
- app/helpers/spree/admin/products_helper.rb
|
403
|
-
- app/helpers/spree/admin/promotions_helper.rb
|
404
389
|
- app/helpers/spree/admin/reimbursement_type_helper.rb
|
405
390
|
- app/helpers/spree/admin/stock_locations_helper.rb
|
406
391
|
- app/helpers/spree/admin/stock_movements_helper.rb
|
407
392
|
- app/helpers/spree/admin/store_credit_events_helper.rb
|
408
|
-
- app/helpers/spree/promotion_rules_helper.rb
|
409
393
|
- app/views/kaminari/solidus_admin/_first_page.html.erb
|
410
394
|
- app/views/kaminari/solidus_admin/_gap.html.erb
|
411
395
|
- app/views/kaminari/solidus_admin/_last_page.html.erb
|
@@ -497,54 +481,6 @@ files:
|
|
497
481
|
- app/views/spree/admin/products/edit.html.erb
|
498
482
|
- app/views/spree/admin/products/index.html.erb
|
499
483
|
- app/views/spree/admin/products/new.html.erb
|
500
|
-
- app/views/spree/admin/promotion_actions/create.js.erb
|
501
|
-
- app/views/spree/admin/promotion_actions/destroy.js.erb
|
502
|
-
- app/views/spree/admin/promotion_categories/_form.html.erb
|
503
|
-
- app/views/spree/admin/promotion_categories/edit.html.erb
|
504
|
-
- app/views/spree/admin/promotion_categories/index.html.erb
|
505
|
-
- app/views/spree/admin/promotion_categories/new.html.erb
|
506
|
-
- app/views/spree/admin/promotion_code_batches/_form_fields.html.erb
|
507
|
-
- app/views/spree/admin/promotion_code_batches/download.csv.ruby
|
508
|
-
- app/views/spree/admin/promotion_code_batches/index.html.erb
|
509
|
-
- app/views/spree/admin/promotion_code_batches/new.html.erb
|
510
|
-
- app/views/spree/admin/promotion_codes/index.csv.ruby
|
511
|
-
- app/views/spree/admin/promotion_codes/index.html.erb
|
512
|
-
- app/views/spree/admin/promotion_codes/new.html.erb
|
513
|
-
- app/views/spree/admin/promotion_rules/create.js.erb
|
514
|
-
- app/views/spree/admin/promotion_rules/destroy.js.erb
|
515
|
-
- app/views/spree/admin/promotions/_actions.html.erb
|
516
|
-
- app/views/spree/admin/promotions/_activations_edit.html.erb
|
517
|
-
- app/views/spree/admin/promotions/_activations_new.html.erb
|
518
|
-
- app/views/spree/admin/promotions/_form.html.erb
|
519
|
-
- app/views/spree/admin/promotions/_promotion_action.html.erb
|
520
|
-
- app/views/spree/admin/promotions/_promotion_rule.html.erb
|
521
|
-
- app/views/spree/admin/promotions/_rules.html.erb
|
522
|
-
- app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
|
523
|
-
- app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
|
524
|
-
- app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb
|
525
|
-
- app/views/spree/admin/promotions/actions/_free_shipping.html.erb
|
526
|
-
- app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb
|
527
|
-
- app/views/spree/admin/promotions/calculators/_default_fields.html.erb
|
528
|
-
- app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
|
529
|
-
- app/views/spree/admin/promotions/calculators/flat_rate/_fields.html.erb
|
530
|
-
- app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
|
531
|
-
- app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
|
532
|
-
- app/views/spree/admin/promotions/edit.html.erb
|
533
|
-
- app/views/spree/admin/promotions/index.html.erb
|
534
|
-
- app/views/spree/admin/promotions/new.html.erb
|
535
|
-
- app/views/spree/admin/promotions/rules/_first_order.html.erb
|
536
|
-
- app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb
|
537
|
-
- app/views/spree/admin/promotions/rules/_item_total.html.erb
|
538
|
-
- app/views/spree/admin/promotions/rules/_minimum_quantity.html.erb
|
539
|
-
- app/views/spree/admin/promotions/rules/_nth_order.html.erb
|
540
|
-
- app/views/spree/admin/promotions/rules/_one_use_per_user.html.erb
|
541
|
-
- app/views/spree/admin/promotions/rules/_option_value.html.erb
|
542
|
-
- app/views/spree/admin/promotions/rules/_product.html.erb
|
543
|
-
- app/views/spree/admin/promotions/rules/_store.html.erb
|
544
|
-
- app/views/spree/admin/promotions/rules/_taxon.html.erb
|
545
|
-
- app/views/spree/admin/promotions/rules/_user.html.erb
|
546
|
-
- app/views/spree/admin/promotions/rules/_user_logged_in.html.erb
|
547
|
-
- app/views/spree/admin/promotions/rules/_user_role.html.erb
|
548
484
|
- app/views/spree/admin/properties/_form.html.erb
|
549
485
|
- app/views/spree/admin/properties/edit.html.erb
|
550
486
|
- app/views/spree/admin/properties/filtered.html.erb
|
@@ -625,6 +561,11 @@ files:
|
|
625
561
|
- app/views/spree/admin/shared/preference_fields/_password.html.erb
|
626
562
|
- app/views/spree/admin/shared/preference_fields/_string.html.erb
|
627
563
|
- app/views/spree/admin/shared/preference_fields/_text.html.erb
|
564
|
+
- app/views/spree/admin/shared/search_fields/_checkbox.html.erb
|
565
|
+
- app/views/spree/admin/shared/search_fields/_date_range_picker.html.erb
|
566
|
+
- app/views/spree/admin/shared/search_fields/_select.html.erb
|
567
|
+
- app/views/spree/admin/shared/search_fields/_text_field.html.erb
|
568
|
+
- app/views/spree/admin/shared/search_fields/_variant_autocomplete.html.erb
|
628
569
|
- app/views/spree/admin/shipping_categories/_form.html.erb
|
629
570
|
- app/views/spree/admin/shipping_categories/edit.html.erb
|
630
571
|
- app/views/spree/admin/shipping_categories/index.html.erb
|
@@ -724,7 +665,6 @@ files:
|
|
724
665
|
- app/views/spree/admin/zones/new.html.erb
|
725
666
|
- app/views/spree/layouts/admin.html.erb
|
726
667
|
- app/views/spree/layouts/admin_style_guide.html.erb
|
727
|
-
- bin/rails
|
728
668
|
- config/initializers/assets.rb
|
729
669
|
- config/initializers/form_builder.rb
|
730
670
|
- config/routes.rb
|
@@ -912,14 +852,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
912
852
|
requirements:
|
913
853
|
- - ">="
|
914
854
|
- !ruby/object:Gem::Version
|
915
|
-
version: 3.
|
855
|
+
version: 3.1.0
|
916
856
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
917
857
|
requirements:
|
918
858
|
- - ">="
|
919
859
|
- !ruby/object:Gem::Version
|
920
860
|
version: 1.8.23
|
921
861
|
requirements: []
|
922
|
-
rubygems_version: 3.5.
|
862
|
+
rubygems_version: 3.5.22
|
923
863
|
signing_key:
|
924
864
|
specification_version: 4
|
925
865
|
summary: Admin interface for the Solidus e-commerce framework.
|
@@ -1,26 +0,0 @@
|
|
1
|
-
Spree.PromotionActivationView = Backbone.View.extend({
|
2
|
-
events: {
|
3
|
-
"change [name=activation_type]": "render"
|
4
|
-
},
|
5
|
-
|
6
|
-
initialize: function(){
|
7
|
-
this.render();
|
8
|
-
},
|
9
|
-
|
10
|
-
render: function(){
|
11
|
-
var activation_type = this.$("[name=activation_type]:checked").val();
|
12
|
-
this.$('[data-activation-type]').each(function(){
|
13
|
-
var selected = ($(this).data('activation-type') === activation_type);
|
14
|
-
$(this).find(':input').prop("disabled", !selected);
|
15
|
-
$(this).toggle(selected);
|
16
|
-
});
|
17
|
-
}
|
18
|
-
});
|
19
|
-
|
20
|
-
Spree.ready(function(){
|
21
|
-
if($("#js_promotion_activation").length) {
|
22
|
-
new Spree.PromotionActivationView({
|
23
|
-
el: $("#js_promotion_activation")
|
24
|
-
});
|
25
|
-
}
|
26
|
-
});
|
@@ -1,35 +0,0 @@
|
|
1
|
-
// This is called on page load and via an ajax request in
|
2
|
-
// app/views/spree/admin/promotion_actions/create.js.erb
|
3
|
-
window.initPromotionActions = function() {
|
4
|
-
$('#promotion-filters').find('.variant_autocomplete').variantAutocomplete();
|
5
|
-
|
6
|
-
$('.promo-rule-option-values').each(function() {
|
7
|
-
if (!$(this).data('has-view')) {
|
8
|
-
$(this).data('has-view', true);
|
9
|
-
new Spree.Views.Promotions.OptionValuesRule({
|
10
|
-
el: this
|
11
|
-
});
|
12
|
-
}
|
13
|
-
});
|
14
|
-
|
15
|
-
$('.js-tiered-calculator').each(function() {
|
16
|
-
if (!$(this).data('has-view')) {
|
17
|
-
$(this).data('has-view', true);
|
18
|
-
new Spree.Views.Calculators.Tiered({
|
19
|
-
el: this
|
20
|
-
});
|
21
|
-
}
|
22
|
-
});
|
23
|
-
};
|
24
|
-
|
25
|
-
Spree.ready(function() {
|
26
|
-
// Add classes to boxes when hovering over delete
|
27
|
-
$('#promotion-filters').on('mouseover', 'a.delete', function(event) {
|
28
|
-
$(this).parent().addClass('action-remove');
|
29
|
-
});
|
30
|
-
$('#promotion-filters').on('mouseout', 'a.delete', function(event) {
|
31
|
-
$(this).parent().removeClass('action-remove');
|
32
|
-
});
|
33
|
-
|
34
|
-
window.initPromotionActions();
|
35
|
-
});
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<div class="fullwidth tier">
|
2
|
-
<a class="fa fa-trash remove js-remove-tier"></a>
|
3
|
-
<div class="row">
|
4
|
-
<div class="col-6">
|
5
|
-
<div class="input-group">
|
6
|
-
<div class="input-group-prepend">
|
7
|
-
<span class="input-group-text">$</span>
|
8
|
-
</div>
|
9
|
-
<input class="js-base-input form-control" type="text" value={{baseField.value}}>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<div class="col-6">
|
13
|
-
<div class="input-group">
|
14
|
-
<div class="input-group-prepend">
|
15
|
-
<span class="input-group-text">$</span>
|
16
|
-
</div>
|
17
|
-
<input class="js-value-input form-control"
|
18
|
-
name="{{valueField.name}}" type="text" value={{valueField.value}}>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
<div class="clear"></div>
|
23
|
-
</div>
|
data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
<div class="fullwidth tier">
|
2
|
-
<a class="fa fa-trash remove js-remove-tier"></a>
|
3
|
-
<div class="row">
|
4
|
-
<div class="col-6">
|
5
|
-
<div class="input-group">
|
6
|
-
<div class="input-group-prepend">
|
7
|
-
<span class="input-group-text">$</span>
|
8
|
-
</div>
|
9
|
-
<input class="js-base-input form-control" type="text" value={{baseField.value}}>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<div class="col-6">
|
13
|
-
<div class="input-group">
|
14
|
-
<input class="js-value-input form-control right-align"
|
15
|
-
name="{{valueField.name}}" type="text" value={{valueField.value}}>
|
16
|
-
<div class="input-group-append">
|
17
|
-
<span class="input-group-text">%</span>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
<div class="clear"></div>
|
23
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="fullwidth promo-rule-option-value">
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-6">
|
4
|
-
<input class="js-promo-rule-option-value-product-select fullwidth" type="hidden" value="{{ productSelect.value }}">
|
5
|
-
</div>
|
6
|
-
<div class="col-5">
|
7
|
-
<input class="js-promo-rule-option-value-option-values-select fullwidth" name="{{ paramPrefix }}[preferred_eligible_values][{{ productSelect.value }}]" type="hidden" value={{optionValuesSelect.value}}>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
<a class="fa fa-trash remove js-remove-promo-rule-option-value"></a>
|
11
|
-
<div class="clear"></div>
|
12
|
-
</div>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
Spree.Views.Calculators.Tiered = Backbone.View.extend({
|
2
|
-
initialize: function() {
|
3
|
-
this.calculatorName = this.$('.js-tiers').data('calculator');
|
4
|
-
this.tierFieldsTemplate = HandlebarsTemplates["promotions/calculators/fields/" + this.calculatorName];
|
5
|
-
this.originalTiers = this.$('.js-tiers').data('original-tiers');
|
6
|
-
this.formPrefix = this.$('.js-tiers').data('form-prefix');
|
7
|
-
|
8
|
-
for (var base in this.originalTiers) {
|
9
|
-
var value = this.originalTiers[base];
|
10
|
-
this.$('.js-tiers').append(
|
11
|
-
this.tierFieldsTemplate({
|
12
|
-
baseField: {
|
13
|
-
value: base
|
14
|
-
},
|
15
|
-
valueField: {
|
16
|
-
name: this.tierInputName(base),
|
17
|
-
value: value
|
18
|
-
}
|
19
|
-
})
|
20
|
-
);
|
21
|
-
}
|
22
|
-
},
|
23
|
-
|
24
|
-
events: {
|
25
|
-
'click .js-add-tier': 'onAdd',
|
26
|
-
'click .js-remove-tier': 'onRemove',
|
27
|
-
'change .js-base-input': 'onChange'
|
28
|
-
},
|
29
|
-
|
30
|
-
tierInputName: function(base) {
|
31
|
-
return this.formPrefix + "[calculator_attributes][preferred_tiers][" + base + "]";
|
32
|
-
},
|
33
|
-
|
34
|
-
onAdd: function(event) {
|
35
|
-
event.preventDefault();
|
36
|
-
this.$('.js-tiers').append(
|
37
|
-
this.tierFieldsTemplate({
|
38
|
-
valueField: {
|
39
|
-
name: null
|
40
|
-
}
|
41
|
-
})
|
42
|
-
);
|
43
|
-
},
|
44
|
-
|
45
|
-
onRemove: function(event) {
|
46
|
-
event.preventDefault();
|
47
|
-
$(event.target).parents('.tier').remove();
|
48
|
-
},
|
49
|
-
|
50
|
-
onChange: function(event) {
|
51
|
-
var valueInput = $(event.target).parents('.tier').find('.js-value-input');
|
52
|
-
valueInput.attr('name', this.tierInputName($(event.target).val()));
|
53
|
-
}
|
54
|
-
});
|
@@ -1,79 +0,0 @@
|
|
1
|
-
Spree.Views.Promotions.OptionValuesRuleRow = Backbone.View.extend({
|
2
|
-
optionValueTemplate: HandlebarsTemplates['promotions/rules/option_values'],
|
3
|
-
|
4
|
-
events: {
|
5
|
-
'click .js-remove-promo-rule-option-value': 'onRemove',
|
6
|
-
'change .js-promo-rule-option-value-product-select': 'onSelectProduct'
|
7
|
-
},
|
8
|
-
|
9
|
-
initialize: function(options) {
|
10
|
-
this.productId = options.productId;
|
11
|
-
this.values = options.values;
|
12
|
-
this.paramPrefix = options.paramPrefix;
|
13
|
-
},
|
14
|
-
|
15
|
-
render: function() {
|
16
|
-
this.$el.html(
|
17
|
-
this.optionValueTemplate({
|
18
|
-
productSelect: { value: this.productId },
|
19
|
-
optionValuesSelect: { value: this.values },
|
20
|
-
paramPrefix: this.paramPrefix
|
21
|
-
})
|
22
|
-
);
|
23
|
-
|
24
|
-
this.$('.js-promo-rule-option-value-product-select').productAutocomplete({multiple: false});
|
25
|
-
|
26
|
-
var productSelect = this.$el.find(".js-promo-rule-option-value-product-select")
|
27
|
-
|
28
|
-
this.$('.js-promo-rule-option-value-option-values-select').optionValueAutocomplete({ productSelect })
|
29
|
-
|
30
|
-
if(this.productId == null) {
|
31
|
-
this.$('.js-promo-rule-option-value-option-values-select').prop('disabled', true);
|
32
|
-
}
|
33
|
-
},
|
34
|
-
|
35
|
-
onSelectProduct: function(e) {
|
36
|
-
this.productId = this.$('input.js-promo-rule-option-value-product-select').val();
|
37
|
-
this.render();
|
38
|
-
},
|
39
|
-
|
40
|
-
onRemove: function(e) {
|
41
|
-
this.remove();
|
42
|
-
},
|
43
|
-
});
|
44
|
-
|
45
|
-
Spree.Views.Promotions.OptionValuesRule = Backbone.View.extend({
|
46
|
-
initialize: function() {
|
47
|
-
_.bindAll(this, 'addOptionValue')
|
48
|
-
this.$optionValues = this.$('.js-promo-rule-option-values');
|
49
|
-
this.paramPrefix = this.$('.param-prefix').data('param-prefix');
|
50
|
-
|
51
|
-
var originalOptionValues = this.$optionValues.data('original-option-values')
|
52
|
-
if ($.isEmptyObject(originalOptionValues)) {
|
53
|
-
this.addOptionValue(null, null);
|
54
|
-
} else {
|
55
|
-
$.each(originalOptionValues, this.addOptionValue);
|
56
|
-
}
|
57
|
-
},
|
58
|
-
|
59
|
-
events: {
|
60
|
-
'click .js-add-promo-rule-option-value': 'onAdd'
|
61
|
-
},
|
62
|
-
|
63
|
-
addOptionValue: function(product, values) {
|
64
|
-
var row = new Spree.Views.Promotions.OptionValuesRuleRow({
|
65
|
-
productId: product,
|
66
|
-
values: values,
|
67
|
-
paramPrefix: this.paramPrefix
|
68
|
-
});
|
69
|
-
|
70
|
-
this.$optionValues.append(row.el);
|
71
|
-
|
72
|
-
row.render();
|
73
|
-
},
|
74
|
-
|
75
|
-
onAdd: function(e) {
|
76
|
-
e.preventDefault();
|
77
|
-
this.addOptionValue(null, null);
|
78
|
-
},
|
79
|
-
});
|