spree_backend 4.4.0.rc1 → 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/.gitignore +1 -0
- data/Gemfile +1 -1
- data/app/assets/javascripts/spree/backend/address_states.es6 +2 -0
- data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +6 -0
- data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +7 -0
- data/app/assets/javascripts/spree/backend/spree-select2.js +7 -0
- data/app/controllers/spree/admin/return_index_controller.rb +2 -3
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/orders/_order_actions.html.erb +1 -0
- data/app/views/spree/admin/products/_form.html.erb +0 -1
- data/app/views/spree/admin/products/index.html.erb +0 -1
- data/app/views/spree/admin/stores/_form.html.erb +1 -1
- data/config/routes.rb +3 -3
- data/lib/spree/backend/version.rb +1 -1
- data/package.json +1 -2
- data/yarn.lock +0 -15
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c101b687a3f716b2145719e2626b9428c43e44e87bc580b4ff2447aee1eb13c
|
4
|
+
data.tar.gz: 8a9e3dc7f6a9e9da168b03589669c13c5d11d1b8b79a92f29e2e4574f96d6f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5883634589b43baf572ce8199df95add3de48b11c90c15bd09704898f2ae833f894b2d52f686109869d07fc1708d90868ec74dad21e4eaf6bffa5af74a6e333b
|
7
|
+
data.tar.gz: d88d038a8163e67212e7e8d957f3e6c4340717cac6db40787a8ec5d00b5f5398b84f0c3a719f04d1235dcff602a6bb1be568c3e8e69c66a56b1fc875e138d119
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -4,6 +4,8 @@ function updateAddressState(region, successCallback) {
|
|
4
4
|
const stateSelect = $('#' + region + 'state select')
|
5
5
|
const stateInput = $('#' + region + 'state input.state_name')
|
6
6
|
|
7
|
+
if (!countryId) { return }
|
8
|
+
|
7
9
|
fetch(Spree.routes.countries_api_v2 + '/' + countryId + '?include=states', {
|
8
10
|
headers: Spree.apiV2Authentication()
|
9
11
|
}).then((response) => {
|
@@ -21,3 +21,9 @@ document.addEventListener("spree:load", function() {
|
|
21
21
|
flatpickr('.datepicker', {})
|
22
22
|
})
|
23
23
|
|
24
|
+
document.addEventListener("turbo:before-cache", function() {
|
25
|
+
document.querySelectorAll('.datePickerFrom, .datePickerTo, .datepicker').forEach(function(element) {
|
26
|
+
element._flatpickr.destroy()
|
27
|
+
})
|
28
|
+
})
|
29
|
+
|
@@ -25,6 +25,13 @@ document.addEventListener("spree:load", function() {
|
|
25
25
|
loadAutoCompleteParams()
|
26
26
|
})
|
27
27
|
|
28
|
+
// we need to delete select2 instances before document is saved to cache
|
29
|
+
// https://stackoverflow.com/questions/36497723/select2-with-ajax-gets-initialized-several-times-with-rails-turbolinks-events
|
30
|
+
document.addEventListener("turbo:before-cache", function() {
|
31
|
+
const select2Autocompletes = document.querySelectorAll('select[data-autocomplete-url-value]')
|
32
|
+
select2Autocompletes.forEach(element => $(element).select2('destroy'))
|
33
|
+
})
|
34
|
+
|
28
35
|
// eslint-disable-next-line no-unused-vars
|
29
36
|
function loadAutoCompleteParams() {
|
30
37
|
const select2Autocompletes = document.querySelectorAll('select[data-autocomplete-url-value]')
|
@@ -1,3 +1,10 @@
|
|
1
|
+
// we need to delete select2 instances before document is saved to cache
|
2
|
+
// https://stackoverflow.com/questions/36497723/select2-with-ajax-gets-initialized-several-times-with-rails-turbolinks-events
|
3
|
+
document.addEventListener("turbo:before-cache", function() {
|
4
|
+
$('select.select2').select2('destroy')
|
5
|
+
$('select.select2-clear').select2('destroy')
|
6
|
+
})
|
7
|
+
|
1
8
|
document.addEventListener("spree:load", function() {
|
2
9
|
// Initiate a standard Select2 on any select element with the class .select2
|
3
10
|
// Remember to add a place holder in the HTML as needed.
|
@@ -2,7 +2,7 @@ module Spree
|
|
2
2
|
module Admin
|
3
3
|
class ReturnIndexController < BaseController
|
4
4
|
def return_authorizations
|
5
|
-
collection(Spree::ReturnAuthorization)
|
5
|
+
collection(Spree::ReturnAuthorization.for_store(current_store))
|
6
6
|
respond_with(@collection)
|
7
7
|
end
|
8
8
|
|
@@ -18,9 +18,8 @@ module Spree
|
|
18
18
|
|
19
19
|
params[:q] ||= {}
|
20
20
|
|
21
|
-
@collection = resource.all
|
22
21
|
# @search needs to be defined as this is passed to search_form_for
|
23
|
-
@search =
|
22
|
+
@search = resource.ransack(params[:q])
|
24
23
|
per_page = params[:per_page] || Spree::Backend::Config[:admin_customer_returns_per_page]
|
25
24
|
@collection = @search.result.order(created_at: :desc).page(params[:page]).per(per_page)
|
26
25
|
end
|
@@ -21,10 +21,10 @@
|
|
21
21
|
<div class="card-footer">
|
22
22
|
<div class="row text-center pb-0">
|
23
23
|
<div class="col-12 col-lg-6">
|
24
|
-
<%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :
|
24
|
+
<%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :put, class: "btn btn-success" %>
|
25
25
|
</div>
|
26
26
|
<div class="col-12 col-lg-6">
|
27
|
-
<%= button_to Spree.t(:close_all_adjustments), close_adjustments_admin_order_path(@order), method: :
|
27
|
+
<%= button_to Spree.t(:close_all_adjustments), close_adjustments_admin_order_path(@order), method: :put, class: "btn btn-danger" %>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
</div>
|
@@ -231,7 +231,6 @@
|
|
231
231
|
<%= f.select :option_type_ids, options_from_collection_for_select(@product.option_types, :id, :name, @product.option_type_ids),
|
232
232
|
{ include_hidden: true },
|
233
233
|
multiple: true,
|
234
|
-
class: 'select2-hidden-accessible',
|
235
234
|
data: { autocomplete_url_value: 'option_types_api_v2',
|
236
235
|
autocomplete_return_attr_value: 'name',
|
237
236
|
autocomplete_multiple_value: true } %>
|
@@ -152,7 +152,7 @@
|
|
152
152
|
<% end %>
|
153
153
|
<%= f.field_container :checkout_zone_id do %>
|
154
154
|
<%= f.label :checkout_zone_id, Spree.t(:zone) %>
|
155
|
-
<%= f.select :checkout_zone_id, options_for_select(@zones
|
155
|
+
<%= f.select :checkout_zone_id, options_for_select(@zones), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %>
|
156
156
|
<small class="form-text text-muted">
|
157
157
|
<%= raw(Spree.t('store_form.checkout_zone_help')) %>
|
158
158
|
</small>
|
data/config/routes.rb
CHANGED
@@ -82,14 +82,14 @@ Spree::Core::Engine.add_routes do
|
|
82
82
|
member do
|
83
83
|
get :cart
|
84
84
|
post :resend
|
85
|
-
|
86
|
-
|
85
|
+
put :open_adjustments
|
86
|
+
put :close_adjustments
|
87
87
|
put :approve
|
88
88
|
put :cancel
|
89
89
|
put :resume
|
90
90
|
get :channel
|
91
91
|
put :set_channel
|
92
|
-
|
92
|
+
put :reset_digitals
|
93
93
|
end
|
94
94
|
|
95
95
|
resources :state_changes, only: [:index]
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spree/dashboard",
|
3
|
-
"version": "0.0
|
3
|
+
"version": "0.1.0",
|
4
4
|
"description": "Spree Dashboard",
|
5
5
|
"main": "app/assets/javascripts/spree-dashboard.js",
|
6
6
|
"type": "module",
|
@@ -22,7 +22,6 @@
|
|
22
22
|
"@hotwired/stimulus": "^3.0.1",
|
23
23
|
"@hotwired/turbo": "^7.0.1",
|
24
24
|
"@rails/request.js": "^0.0.5",
|
25
|
-
"@spree/dashboard": "^0.0.3",
|
26
25
|
"bootstrap": "4.6.1",
|
27
26
|
"flatpickr": "^4.6.9",
|
28
27
|
"jquery": "3.5.1",
|
data/yarn.lock
CHANGED
@@ -101,21 +101,6 @@
|
|
101
101
|
estree-walker "^1.0.1"
|
102
102
|
picomatch "^2.2.2"
|
103
103
|
|
104
|
-
"@spree/dashboard@^0.0.3":
|
105
|
-
version "0.0.3"
|
106
|
-
resolved "https://registry.yarnpkg.com/@spree/dashboard/-/dashboard-0.0.3.tgz#efa6488953d8dc2b3dd1011dd82e79464bb314a1"
|
107
|
-
integrity sha512-a5txJwwZ7uxq3HVBpq3dlwcO+rPzmqmj9IMMDNyPr3iTPQpZmoX6pL3xcJ9h/Bc8ddfPBqETI8S7YxRjY4GwGA==
|
108
|
-
dependencies:
|
109
|
-
"@hotwired/stimulus" "^3.0.1"
|
110
|
-
"@hotwired/turbo" "^7.0.1"
|
111
|
-
"@rails/request.js" "^0.0.5"
|
112
|
-
bootstrap "4.6.1"
|
113
|
-
flatpickr "^4.6.9"
|
114
|
-
jquery "3.5.1"
|
115
|
-
popper.js "1.16.1"
|
116
|
-
sortablejs "^1.14.0"
|
117
|
-
stimulus-sortable "^3.1.0"
|
118
|
-
|
119
104
|
"@types/estree@*":
|
120
105
|
version "0.0.50"
|
121
106
|
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree
|
@@ -900,9 +900,9 @@ licenses:
|
|
900
900
|
- BSD-3-Clause
|
901
901
|
metadata:
|
902
902
|
bug_tracker_uri: https://github.com/spree/spree_backend/issues
|
903
|
-
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.4.
|
903
|
+
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.4.1
|
904
904
|
documentation_uri: https://dev-docs.spreecommerce.org/
|
905
|
-
source_code_uri: https://github.com/spree/spree_backend/tree/v4.4.
|
905
|
+
source_code_uri: https://github.com/spree/spree_backend/tree/v4.4.1
|
906
906
|
post_install_message:
|
907
907
|
rdoc_options: []
|
908
908
|
require_paths:
|
@@ -914,12 +914,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
914
914
|
version: '2.5'
|
915
915
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
916
916
|
requirements:
|
917
|
-
- - "
|
917
|
+
- - ">="
|
918
918
|
- !ruby/object:Gem::Version
|
919
|
-
version:
|
919
|
+
version: '0'
|
920
920
|
requirements:
|
921
921
|
- none
|
922
|
-
rubygems_version: 3.
|
922
|
+
rubygems_version: 3.0.9
|
923
923
|
signing_key:
|
924
924
|
specification_version: 4
|
925
925
|
summary: Admin Dashboard for Spree eCommerce platform
|