solidus_backend 3.4.1 → 4.0.0
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/variant_autocomplete.js +8 -26
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +0 -5
- data/app/helpers/spree/admin/orders_helper.rb +0 -7
- data/app/views/spree/admin/promotions/_rules.html.erb +0 -10
- data/app/views/spree/admin/promotions/index.html.erb +2 -2
- data/solidus_backend.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2202f63de288c8136a2ab58c767ece0c0ea53b75c8a5c28471bb8d438feb1f01
|
4
|
+
data.tar.gz: 3b656bcb71b1f02cf8427930cca7b29581965ddeb730b6f2e2005e8e8a6d3e0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c98a8dc12d30a38582517aa506c6af966ca08861e8d14b6ee885bd99c4f7431830fb63b9a207774daa78f62af4fce81c63bd830bd7381372f37882c35223d06
|
7
|
+
data.tar.gz: fcbf9ce1234507ea551ac98fb0fe0eac2a70fbc4cfd1113aeea42b658fd92d92fb359a6c78e8fd8bca09a3e287b37127839cb9634a2240bb97cb05c6bc16c13e
|
@@ -17,27 +17,8 @@
|
|
17
17
|
* you need to ensure that the attributes are allowed to be Ransacked.
|
18
18
|
*/
|
19
19
|
$.fn.variantAutocomplete = function(options) {
|
20
|
-
|
21
|
-
|
22
|
-
if (typeof(options['searchParameters']) === 'function') {
|
23
|
-
return options['searchParameters'](term)
|
24
|
-
} else {
|
25
|
-
console.warn(
|
26
|
-
"Solidus deprecation: Passing an object of parameters to variantAutocomplete is deprecated. Instead, on the options object, please declare `searchParameters` as a function returning the parameters.\n\n",
|
27
|
-
"Deprecated usage:\n",
|
28
|
-
"$('#id').variantAutocomplete({\n",
|
29
|
-
" suppliable_only: true\n",
|
30
|
-
"})",
|
31
|
-
"\n\nNew usage:\n",
|
32
|
-
"$('#id').variantAutocomplete({\n",
|
33
|
-
" searchParameters: function (_selectSearchTerm) { return { suppliable_only: true } }\n",
|
34
|
-
"})"
|
35
|
-
)
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
return {}
|
40
|
-
}
|
20
|
+
// Default options
|
21
|
+
options = options || {}
|
41
22
|
|
42
23
|
this.select2({
|
43
24
|
placeholder: Spree.translations.variant_placeholder,
|
@@ -58,14 +39,15 @@
|
|
58
39
|
}
|
59
40
|
},
|
60
41
|
data: function(term, page) {
|
61
|
-
|
42
|
+
const extraParameters = options["searchParameters"] ? options["searchParameters"](term) : {}
|
43
|
+
|
44
|
+
return {
|
62
45
|
variant_search_term: term,
|
63
46
|
token: Spree.api_key,
|
64
|
-
page: page
|
65
|
-
|
66
|
-
|
47
|
+
page: page,
|
48
|
+
...extraParameters,
|
49
|
+
}
|
67
50
|
},
|
68
|
-
|
69
51
|
results: function(data, page) {
|
70
52
|
window.variants = data["variants"];
|
71
53
|
return {
|
@@ -22,13 +22,6 @@ module Spree
|
|
22
22
|
safe_join(links, " ".html_safe)
|
23
23
|
end
|
24
24
|
|
25
|
-
# @deprecated use `Spree::LineItem#display_amount` instead
|
26
|
-
def line_item_shipment_price(line_item, quantity)
|
27
|
-
Spree::Money.new(line_item.price * quantity, { currency: line_item.currency })
|
28
|
-
end
|
29
|
-
deprecate deprecator: Spree::Deprecation,
|
30
|
-
line_item_shipment_price: "use Spree::LineItem#display_amount instead"
|
31
|
-
|
32
25
|
# Addresss Verification System response code
|
33
26
|
#
|
34
27
|
# @see https://en.wikipedia.org/wiki/Address_verification_service
|
@@ -18,16 +18,6 @@
|
|
18
18
|
|
19
19
|
<%= form_for @promotion, url: object_url, method: :put do |f| %>
|
20
20
|
<fieldset class="no-border-top">
|
21
|
-
<% if Spree::Config.allow_promotions_any_match_policy %>
|
22
|
-
<div id="promotion-policy-select" class="align-center row">
|
23
|
-
<% Spree::Promotion::MATCH_POLICIES.each do |policy| %>
|
24
|
-
<div class="col-6">
|
25
|
-
<label><%= f.radio_button :match_policy, policy %> <%= t "spree.promotion_form.match_policies.#{policy}" %></label>
|
26
|
-
</div>
|
27
|
-
<% end %>
|
28
|
-
</div>
|
29
|
-
<% end %>
|
30
|
-
|
31
21
|
<div id="rules" class="filter_list">
|
32
22
|
<% if @promotion.rules.any? %>
|
33
23
|
<div class="col-12">
|
@@ -98,10 +98,10 @@
|
|
98
98
|
<%= promotion.usage_count %>
|
99
99
|
</td>
|
100
100
|
<td>
|
101
|
-
<%=
|
101
|
+
<%= promotion.starts_at.to_fs(:long) if promotion.starts_at %>
|
102
102
|
</td>
|
103
103
|
<td>
|
104
|
-
<%=
|
104
|
+
<%= promotion.expires_at.to_fs(:long) if promotion.expires_at %>
|
105
105
|
</td>
|
106
106
|
<td class="actions">
|
107
107
|
<% if can?(:edit, promotion) %>
|
data/solidus_backend.gemspec
CHANGED
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
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-08 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:
|
19
|
+
version: 4.0.0
|
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:
|
26
|
+
version: 4.0.0
|
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:
|
33
|
+
version: 4.0.0
|
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:
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: font-awesome-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -904,14 +904,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
904
904
|
requirements:
|
905
905
|
- - ">="
|
906
906
|
- !ruby/object:Gem::Version
|
907
|
-
version:
|
907
|
+
version: 3.0.0
|
908
908
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
909
909
|
requirements:
|
910
910
|
- - ">="
|
911
911
|
- !ruby/object:Gem::Version
|
912
912
|
version: 1.8.23
|
913
913
|
requirements: []
|
914
|
-
rubygems_version: 3.4.
|
914
|
+
rubygems_version: 3.4.9
|
915
915
|
signing_key:
|
916
916
|
specification_version: 4
|
917
917
|
summary: Admin interface for the Solidus e-commerce framework.
|