solidus_backend 2.11.14 → 2.11.17
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/assets/javascripts/spree/backend/components/sortable_table.js +9 -1
- data/app/assets/javascripts/spree/backend/views/order/address.js +4 -3
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -32
- data/app/controllers/spree/admin/users_controller.rb +2 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/refunds/new.html.erb +6 -6
- data/app/views/spree/admin/users/_form.html.erb +1 -0
- data/app/views/spree/admin/users/index.html.erb +1 -1
- data/config/routes.rb +3 -3
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_lists.scss +35 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac00b927565875614437f63f0e5ab707b7722c96988d83ddd01c306aee9b448
|
4
|
+
data.tar.gz: 0a18d3f2fa77aa217f71602cebe0529b0eedeb21ad56d7cf447c09f1d88c2d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1e390834e5d121f1c93c79581bbcd646eb3bf299ecfa91097772a56bd4607223416640d238c84de12d184846c5c54642c086b067c4a9c4dbde3e6bf33eabee
|
7
|
+
data.tar.gz: d29956ffb3501f2b0adaa70b94ca5fd0408d217f1ae0eed79592fb1f555d30bbdf078c1a053041a4268f47fcb02e18865d68c9d711b940e5ab72b4c3b17660af
|
@@ -1,6 +1,14 @@
|
|
1
1
|
//= require solidus_admin/Sortable
|
2
2
|
/* eslint no-unused-vars: "off" */
|
3
3
|
|
4
|
+
/* Check if string is valid UUID */
|
5
|
+
function isAValidUUID(str) {
|
6
|
+
// https://stackoverflow.com/a/13653180/8170555
|
7
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
8
|
+
|
9
|
+
return regexExp.test(str);
|
10
|
+
}
|
11
|
+
|
4
12
|
Spree.SortableTable = {
|
5
13
|
refresh: function() {
|
6
14
|
var sortable_tables = document.querySelectorAll('table.sortable');
|
@@ -16,7 +24,7 @@ Spree.SortableTable = {
|
|
16
24
|
var idAttr = el.id;
|
17
25
|
if (idAttr) {
|
18
26
|
var objId = idAttr.split('_').slice(-1);
|
19
|
-
if (!isNaN(objId)) {
|
27
|
+
if (!isNaN(objId) || isAValidUUID(objId)) {
|
20
28
|
positions['positions['+objId+']'] = index + 1;
|
21
29
|
}
|
22
30
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Spree.Views.Order.Address = Backbone.View.extend({
|
2
|
-
initialize: function(
|
2
|
+
initialize: function() {
|
3
3
|
// read initial values from page
|
4
4
|
this.onChange();
|
5
5
|
|
@@ -23,8 +23,9 @@ Spree.Views.Order.Address = Backbone.View.extend({
|
|
23
23
|
|
24
24
|
eachField: function(callback){
|
25
25
|
var view = this;
|
26
|
-
var fields = ["name", "
|
27
|
-
|
26
|
+
var fields = ["name", "firstname", "lastname", "company", "address1",
|
27
|
+
"address2", "city", "zipcode", "phone", "country_id",
|
28
|
+
"state_name"];
|
28
29
|
_.each(fields, function(field) {
|
29
30
|
var el = view.$('[name$="[' + field + ']"]');
|
30
31
|
if (el.length) callback(field, el);
|
@@ -57,38 +57,6 @@ ul.text_list {
|
|
57
57
|
padding-left: 0;
|
58
58
|
}
|
59
59
|
|
60
|
-
dl {
|
61
|
-
width: 100%;
|
62
|
-
overflow: hidden;
|
63
|
-
margin: 5px 0;
|
64
|
-
color: lighten($body-color, 15);
|
65
|
-
|
66
|
-
dt, dd {
|
67
|
-
float: left;
|
68
|
-
line-height: 16px;
|
69
|
-
padding: 5px;
|
70
|
-
}
|
71
|
-
|
72
|
-
dt {
|
73
|
-
width: 40%;
|
74
|
-
font-weight: $font-weight-bold;
|
75
|
-
padding-left: 0;
|
76
|
-
clear: left;
|
77
|
-
}
|
78
|
-
|
79
|
-
dd {
|
80
|
-
width: 60%;
|
81
|
-
padding-right: 0;
|
82
|
-
margin-left: 0;
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
.dl-collapse {
|
87
|
-
dt, dd {
|
88
|
-
width: auto;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
60
|
// Helpers
|
93
61
|
.align-center { text-align: center }
|
94
62
|
.align-right { text-align: right }
|
@@ -126,7 +126,7 @@ module Spree
|
|
126
126
|
|
127
127
|
@search = super.ransack(params[:q])
|
128
128
|
@collection = @search.result.includes(:spree_roles)
|
129
|
-
@collection = @collection.includes(:
|
129
|
+
@collection = @collection.includes(:orders)
|
130
130
|
@collection = @collection.page(params[:page]).per(Spree::Config[:admin_products_per_page])
|
131
131
|
end
|
132
132
|
|
@@ -155,7 +155,7 @@ module Spree
|
|
155
155
|
# handling raise from Spree::Admin::ResourceController#destroy
|
156
156
|
def user_destroy_with_orders_error
|
157
157
|
invoke_callbacks(:destroy, :fails)
|
158
|
-
render status: :forbidden,
|
158
|
+
render status: :forbidden, plain: t("spree.error_user_destroy_with_orders")
|
159
159
|
end
|
160
160
|
|
161
161
|
def sign_in_if_change_own_password
|
@@ -13,12 +13,12 @@
|
|
13
13
|
<tr data-hook="adjustment_buttons">
|
14
14
|
<td class="align-right" colspan="2" style="width: 50%">
|
15
15
|
<% if can? :update, Spree::Adjustment %>
|
16
|
-
<%= button_to t('spree.unfinalize_all_adjustments'), adjustments_unfinalize_admin_order_path(@order), method: :
|
16
|
+
<%= button_to t('spree.unfinalize_all_adjustments'), adjustments_unfinalize_admin_order_path(@order), method: :put %>
|
17
17
|
<% end %>
|
18
18
|
</td>
|
19
19
|
<td colspan="2" style="width: 50%">
|
20
20
|
<% if can? :update, Spree::Adjustment %>
|
21
|
-
<%= button_to t('spree.finalize_all_adjustments'), adjustments_finalize_admin_order_path(@order), method: :
|
21
|
+
<%= button_to t('spree.finalize_all_adjustments'), adjustments_finalize_admin_order_path(@order), method: :put %>
|
22
22
|
<% end %>
|
23
23
|
</td>
|
24
24
|
<td class='actions'> </td>
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<% allowed_actions = payment.actions.select { |a| can?(a.to_sym, payment) } %>
|
59
59
|
<% allowed_actions.each do |action| %>
|
60
60
|
<% if action == 'credit' %>
|
61
|
-
<%= link_to_with_icon 'reply', t('spree.refund'), new_admin_order_payment_refund_path(@order, payment), no_text: true %>
|
61
|
+
<%= link_to_with_icon 'mail-reply', t('spree.actions.refund'), new_admin_order_payment_refund_path(@order, payment), no_text: true %>
|
62
62
|
<% elsif action == 'capture' && !@order.completed? %>
|
63
63
|
<%# no capture prior to completion. payments get captured when the order completes. %>
|
64
64
|
<% else %>
|
@@ -10,14 +10,14 @@
|
|
10
10
|
<div data-hook="admin_refund_form_fields" class="row">
|
11
11
|
<div class="col-3">
|
12
12
|
<div class="field">
|
13
|
-
|
14
|
-
<%= @refund.payment.amount %>
|
13
|
+
<label><%= t('spree.payment_amount') %></label><br>
|
14
|
+
<%= Spree::Money.new(@refund.payment.amount) %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
<div class="col-3">
|
18
18
|
<div class="field">
|
19
|
-
|
20
|
-
<%= @refund.payment.credit_allowed %>
|
19
|
+
<label><%= t('spree.credit_allowed') %></label><br/>
|
20
|
+
<%= Spree::Money.new(@refund.payment.credit_allowed) %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
<div class="col-3">
|
@@ -29,13 +29,13 @@
|
|
29
29
|
<div class="col-3">
|
30
30
|
<div class="field">
|
31
31
|
<%= f.label :refund_reason_id %><br/>
|
32
|
-
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {
|
32
|
+
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {prompt: t("spree.choose_reason")}, {class: 'custom-select fullwidth'}) %>
|
33
33
|
</div>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
38
|
-
<%= f.submit
|
38
|
+
<%= f.submit t('spree.actions.refund'), class: 'btn btn-primary' %>
|
39
39
|
<%= link_to t('spree.actions.cancel'), admin_order_payments_url(@refund.payment.order), class: 'btn btn-primary' %>
|
40
40
|
</div>
|
41
41
|
</fieldset>
|
@@ -89,7 +89,7 @@
|
|
89
89
|
<% if can?(:edit, user) %>
|
90
90
|
<%= link_to_edit user, no_text: true %>
|
91
91
|
<% end %>
|
92
|
-
<% if can?(:destroy, user) && user.orders.
|
92
|
+
<% if can?(:destroy, user) && user.orders.none? %>
|
93
93
|
<%= link_to_delete user, no_text: true %>
|
94
94
|
<% end %>
|
95
95
|
</td>
|
data/config/routes.rb
CHANGED
@@ -77,8 +77,8 @@ Spree::Core::Engine.routes.draw do
|
|
77
77
|
get :confirm
|
78
78
|
put :complete
|
79
79
|
post :resend
|
80
|
-
|
81
|
-
|
80
|
+
put "/adjustments/unfinalize", to: "orders#unfinalize_adjustments"
|
81
|
+
put "/adjustments/finalize", to: "orders#finalize_adjustments"
|
82
82
|
put :approve
|
83
83
|
put :cancel
|
84
84
|
put :resume
|
@@ -91,7 +91,7 @@ Spree::Core::Engine.routes.draw do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
resources :adjustments
|
94
|
+
resources :adjustments, except: [:show]
|
95
95
|
resources :return_authorizations do
|
96
96
|
member do
|
97
97
|
put :fire
|
@@ -5,3 +5,38 @@
|
|
5
5
|
padding-left: 0;
|
6
6
|
list-style: none;
|
7
7
|
}
|
8
|
+
|
9
|
+
dl {
|
10
|
+
display: flex;
|
11
|
+
flex-wrap: wrap;
|
12
|
+
justify-content: space-between;
|
13
|
+
width: 100%;
|
14
|
+
overflow: hidden;
|
15
|
+
margin: 5px 0;
|
16
|
+
color: lighten($body-color, 15);
|
17
|
+
|
18
|
+
dt,
|
19
|
+
dd {
|
20
|
+
min-width: 40%;
|
21
|
+
line-height: 16px;
|
22
|
+
padding: 5px;
|
23
|
+
}
|
24
|
+
|
25
|
+
dt {
|
26
|
+
font-weight: $font-weight-bold;
|
27
|
+
padding-left: 0;
|
28
|
+
}
|
29
|
+
|
30
|
+
dd {
|
31
|
+
text-align: right;
|
32
|
+
padding-right: 0;
|
33
|
+
margin-left: 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.dl-collapse {
|
38
|
+
dt,
|
39
|
+
dd {
|
40
|
+
width: auto;
|
41
|
+
}
|
42
|
+
}
|
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: 2.11.
|
4
|
+
version: 2.11.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-15 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: 2.11.
|
19
|
+
version: 2.11.17
|
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: 2.11.
|
26
|
+
version: 2.11.17
|
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: 2.11.
|
33
|
+
version: 2.11.17
|
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: 2.11.
|
40
|
+
version: 2.11.17
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coffee-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|