spree_backend 4.2.0.rc4 → 4.2.0.rc5
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/admin.js +4 -7
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +4 -0
- data/app/controllers/spree/admin/base_controller.rb +1 -0
- data/app/controllers/spree/admin/images_controller.rb +3 -3
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/prices_controller.rb +0 -13
- data/app/controllers/spree/admin/stores_controller.rb +0 -14
- data/app/helpers/spree/admin/base_helper.rb +46 -0
- data/app/views/kaminari/admin-twitter-bootstrap-4/_first_page.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_last_page.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_next_page.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_page.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_paginator.html.erb +2 -2
- data/app/views/kaminari/admin-twitter-bootstrap-4/_prev_page.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +2 -2
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +48 -48
- data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
- data/app/views/spree/admin/general_settings/edit.html.erb +3 -3
- data/app/views/spree/admin/images/edit.html.erb +1 -1
- data/app/views/spree/admin/log_entries/index.html.erb +1 -1
- data/app/views/spree/admin/option_types/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_adjustments.html.erb +2 -2
- data/app/views/spree/admin/orders/_form.html.erb +6 -10
- data/app/views/spree/admin/orders/_line_items.html.erb +1 -1
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +5 -8
- data/app/views/spree/admin/orders/_order_actions.html.erb +1 -2
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +3 -3
- data/app/views/spree/admin/orders/_shipment.html.erb +0 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/orders/cart.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +2 -0
- data/app/views/spree/admin/payment_methods/index.html.erb +1 -1
- data/app/views/spree/admin/payments/_form.html.erb +2 -3
- data/app/views/spree/admin/payments/show.html.erb +1 -2
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +2 -2
- data/app/views/spree/admin/prices/_variant_prices.html.erb +5 -5
- data/app/views/spree/admin/prices/index.html.erb +2 -2
- data/app/views/spree/admin/product_properties/index.html.erb +3 -4
- data/app/views/spree/admin/products/_form.html.erb +5 -6
- data/app/views/spree/admin/products/new.html.erb +3 -1
- data/app/views/spree/admin/products/stock.html.erb +2 -2
- data/app/views/spree/admin/promotions/_actions.html.erb +2 -3
- data/app/views/spree/admin/promotions/_form.html.erb +6 -6
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -1
- data/app/views/spree/admin/promotions/index.html.erb +7 -5
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
- data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
- data/app/views/spree/admin/prototypes/show.html.erb +1 -1
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +2 -2
- data/app/views/spree/admin/reimbursements/edit.html.erb +1 -2
- data/app/views/spree/admin/roles/index.html.erb +1 -1
- data/app/views/spree/admin/shared/_account_nav.html.erb +2 -2
- data/app/views/spree/admin/shared/_address_form.html.erb +2 -2
- data/app/views/spree/admin/shared/_error_messages.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +2 -2
- data/app/views/spree/admin/shared/_header.html.erb +0 -2
- data/app/views/spree/admin/shared/_main_menu.html.erb +1 -1
- data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +4 -2
- data/app/views/spree/admin/shared/_translations.html.erb +9 -38
- data/app/views/spree/admin/shipping_categories/index.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/index.html.erb +2 -2
- data/app/views/spree/admin/states/index.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/index.html.erb +4 -4
- data/app/views/spree/admin/stock_movements/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +2 -2
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/show.html.erb +0 -1
- data/app/views/spree/admin/stores/_form.html.erb +12 -12
- data/app/views/spree/admin/tax_categories/index.html.erb +2 -2
- data/app/views/spree/admin/tax_rates/index.html.erb +6 -6
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +1 -2
- data/app/views/spree/admin/taxonomies/_list.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +1 -2
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +0 -1
- data/app/views/spree/admin/users/edit.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +3 -1
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +2 -2
- data/app/views/spree/admin/zones/new.html.erb +1 -1
- data/app/views/spree/layouts/admin.html.erb +2 -3
- data/config/initializers/assets.rb +1 -1
- data/spree_backend.gemspec +1 -1
- metadata +10 -11
- data/app/assets/javascripts/spree/backend/flatpickr_locals.js +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 661c4ea54cb3f641be07d818710678496c47b7c52740291b6ed53083e28fb830
|
4
|
+
data.tar.gz: e4eb12865f64f1dd5de03dd5a70548556f588a0646c81776757b6b8d50b0aec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0438029b7fc2caa555ede1118025e7e5a47187052702089f2dc908eb4661c06171a3f421462a2764d93c27f5fc149a5d65882261609d3b2634dd4d058c8b5cc
|
7
|
+
data.tar.gz: f5c360a0f0a24849ab80171eddb29b2631ac5cb86fa51299c27710ac14b77a9a0b6078d3f4b40cebab4c167403f58f5303e228f6f3151c88049c615969b6d2ea
|
@@ -5,9 +5,6 @@ Hopefully, this will evolve into a propper class.
|
|
5
5
|
**/
|
6
6
|
|
7
7
|
/* global AUTH_TOKEN, order_number, Sortable, flatpickr, DOMPurify */
|
8
|
-
|
9
|
-
//= require spree/backend/flatpickr_locals
|
10
|
-
|
11
8
|
jQuery(function ($) {
|
12
9
|
// Add some tips
|
13
10
|
$('.with-tip').each(function() {
|
@@ -227,8 +224,8 @@ $.fn.radioControlsVisibilityOfElement = function (dependentElementSelector) {
|
|
227
224
|
|
228
225
|
document.addEventListener('DOMContentLoaded', function() {
|
229
226
|
var dateFrom = flatpickr('.datePickerFrom', {
|
227
|
+
locale: Spree.translations.flatpickr_locale,
|
230
228
|
time_24hr: true,
|
231
|
-
dateFormat: Spree.translations.date_picker,
|
232
229
|
monthSelectorType: 'static',
|
233
230
|
onChange: function(selectedDates) {
|
234
231
|
dateTo.set('minDate', selectedDates[0])
|
@@ -236,18 +233,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
236
233
|
})
|
237
234
|
|
238
235
|
var dateTo = flatpickr('.datePickerTo', {
|
236
|
+
locale: Spree.translations.flatpickr_locale,
|
239
237
|
monthSelectorType: 'static',
|
240
238
|
time_24hr: true,
|
241
|
-
dateFormat: Spree.translations.date_picker,
|
242
239
|
onChange: function(selectedDates) {
|
243
240
|
dateFrom.set('maxDate', selectedDates[0])
|
244
241
|
}
|
245
242
|
})
|
246
243
|
|
247
244
|
flatpickr('.datepicker', {
|
245
|
+
locale: Spree.translations.flatpickr_locale,
|
248
246
|
monthSelectorType: 'static',
|
249
|
-
time_24hr: true
|
250
|
-
dateFormat: Spree.translations.date_picker
|
247
|
+
time_24hr: true
|
251
248
|
})
|
252
249
|
})
|
253
250
|
|
@@ -18,15 +18,15 @@ module Spree
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def load_index_data
|
21
|
-
@product = Product.friendly.
|
21
|
+
@product = Product.friendly.preload(*variant_index_includes).find(params[:product_id])
|
22
22
|
end
|
23
23
|
|
24
24
|
def load_edit_data
|
25
|
-
@product = Product.friendly.
|
25
|
+
@product = Product.friendly.preload(*variant_edit_includes).find(params[:product_id])
|
26
26
|
@variants = @product.variants.map do |variant|
|
27
27
|
[variant.sku_and_options_text, variant.id]
|
28
28
|
end
|
29
|
-
@variants.insert(0, [Spree.t(:all), @product.
|
29
|
+
@variants.insert(0, [Spree.t(:all), @product.master_id])
|
30
30
|
end
|
31
31
|
|
32
32
|
def set_viewable
|
@@ -11,7 +11,7 @@ module Spree
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def edit
|
14
|
-
country_id = Address.default.
|
14
|
+
country_id = Address.default.country_id
|
15
15
|
@order.build_bill_address(country_id: country_id) if @order.bill_address.nil?
|
16
16
|
@order.build_ship_address(country_id: country_id) if @order.ship_address.nil?
|
17
17
|
|
@@ -3,8 +3,6 @@ module Spree
|
|
3
3
|
class PricesController < ResourceController
|
4
4
|
belongs_to 'spree/product', find_by: :slug
|
5
5
|
|
6
|
-
helper_method :supported_currencies_for_all_stores
|
7
|
-
|
8
6
|
def create
|
9
7
|
params.require(:vp).permit!
|
10
8
|
params[:vp].each do |variant_id, prices|
|
@@ -23,17 +21,6 @@ module Spree
|
|
23
21
|
flash[:success] = Spree.t('notice_messages.prices_saved')
|
24
22
|
redirect_to admin_product_path(parent)
|
25
23
|
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def supported_currencies_for_all_stores
|
30
|
-
@supported_currencies_for_all_stores = begin
|
31
|
-
(
|
32
|
-
Spree::Store.pluck(:supported_currencies).map { |c| c&.split(',') }.flatten + Spree::Store.pluck(:default_currency)
|
33
|
-
).
|
34
|
-
compact.uniq.map { |code| ::Money::Currency.find(code.strip) }
|
35
|
-
end
|
36
|
-
end
|
37
24
|
end
|
38
25
|
end
|
39
26
|
end
|
@@ -9,8 +9,6 @@ module Spree
|
|
9
9
|
before_action :load_all_countries, only: [:new, :edit, :update, :create]
|
10
10
|
before_action :load_all_zones, only: %i[new edit]
|
11
11
|
|
12
|
-
helper_method :all_locales_options
|
13
|
-
|
14
12
|
def index
|
15
13
|
if params[:ids]
|
16
14
|
load_stores_by_ids
|
@@ -132,18 +130,6 @@ module Spree
|
|
132
130
|
def set_default_country_id
|
133
131
|
@store.default_country_id = Spree::Config[:default_country_id]
|
134
132
|
end
|
135
|
-
|
136
|
-
def all_locales_options
|
137
|
-
if defined?(SpreeI18n)
|
138
|
-
SpreeI18n::Locale.all.map { |locale| locale_presentation(locale) }.push(['English (EN)', :en])
|
139
|
-
else
|
140
|
-
[['English (EN)', :en]]
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
def locale_presentation(locale)
|
145
|
-
[Spree.t('i18n.this_file_language', locale: locale), locale]
|
146
|
-
end
|
147
133
|
end
|
148
134
|
end
|
149
135
|
end
|
@@ -1,6 +1,18 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
module BaseHelper
|
4
|
+
SELECT2_SUPPORTED_LOCALES = %w[
|
5
|
+
af ar az bg bn bs ca cs da de dsb el en eo es et eu fa fi fr gl he
|
6
|
+
hi hr hsb hu hy id is it ja ka km ko lt lv mk ms nb ne nl pa pl ps
|
7
|
+
pt pt-BR ro ru sk sl sq sr sr-Cyrl sv th tk tr uk vi zh-CN zh-TW
|
8
|
+
].freeze
|
9
|
+
|
10
|
+
FLATPICKR_SUPPORTED_LOCALES = %w[
|
11
|
+
ar at az be bg bn bs cs cy da de eo es et fa fi fo fr ga gr he
|
12
|
+
hi hr hu id is it ja ka km ko kz lv mk mn ms my nl no pa pl pt ro ru
|
13
|
+
si sk sl sq sr sv th tr uk uz vn zh
|
14
|
+
].freeze
|
15
|
+
|
4
16
|
def flash_alert(flash)
|
5
17
|
if flash.present?
|
6
18
|
message = flash[:error] || flash[:notice] || flash[:success]
|
@@ -201,6 +213,40 @@ module Spree
|
|
201
213
|
class: 'btn-outline-secondary', icon: 'view.svg', id: 'admin_preview_taxon', target: :blank
|
202
214
|
)
|
203
215
|
end
|
216
|
+
|
217
|
+
def admin_logout_link
|
218
|
+
if defined?(admin_logout_path)
|
219
|
+
admin_logout_path
|
220
|
+
elsif defined?(spree_logout_path)
|
221
|
+
spree_logout_path
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
def select2_local_fallback
|
226
|
+
stripped_locale = I18n.locale.to_s.split('-').first
|
227
|
+
|
228
|
+
if ['zh-CN', 'zh-TW', 'sr-Cyrl', 'pt-BR'].include?(I18n.locale.to_s)
|
229
|
+
I18n.locale
|
230
|
+
elsif SELECT2_SUPPORTED_LOCALES.include? stripped_locale
|
231
|
+
stripped_locale
|
232
|
+
else
|
233
|
+
'en'
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
def flatpickr_local_fallback
|
238
|
+
stripped_locale = I18n.locale.to_s.split('-').first
|
239
|
+
|
240
|
+
if I18n.locale.to_s == 'zh-TW'
|
241
|
+
# Taiwanese is a popular language in Spree,
|
242
|
+
# it has been well translated.
|
243
|
+
'zh-tw'
|
244
|
+
elsif FLATPICKR_SUPPORTED_LOCALES.include? stripped_locale
|
245
|
+
stripped_locale
|
246
|
+
else
|
247
|
+
'default'
|
248
|
+
end
|
249
|
+
end
|
204
250
|
end
|
205
251
|
end
|
206
252
|
end
|
@@ -4,8 +4,8 @@
|
|
4
4
|
current_page: a page object for the currently displayed page
|
5
5
|
total_pages: total number of pages
|
6
6
|
per_page: number of items to fetch per page
|
7
|
-
remote: data-remote
|
8
|
-
|
7
|
+
remote: data-remote -%>
|
8
|
+
|
9
9
|
<% unless current_page.first? %>
|
10
10
|
<li class="first page-item">
|
11
11
|
<%= link_to_unless current_page.first?, svg_icon(name: "double-chevron-left.svg", width: '13', height: '16', classes: 'spree-icon-arrow-left mb-0'), url, remote: remote, class: 'page-link', 'aria-label': 'First page' %>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
current_page: a page object for the currently displayed page
|
4
4
|
total_pages: total number of pages
|
5
5
|
per_page: number of items to fetch per page
|
6
|
-
remote: data-remote
|
7
|
-
|
6
|
+
remote: data-remote -%>
|
7
|
+
|
8
8
|
<li class="page gap disabled page-item d-none d-lg-flex">
|
9
9
|
<a href="#" onclick="return false;" class="page-link">
|
10
10
|
<%= raw(t 'views.pagination.truncate') %>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
current_page: a page object for the currently displayed page
|
5
5
|
total_pages: total number of pages
|
6
6
|
per_page: number of items to fetch per page
|
7
|
-
remote: data-remote
|
8
|
-
|
7
|
+
remote: data-remote -%>
|
8
|
+
|
9
9
|
<% unless current_page.last? %>
|
10
10
|
<li class="last next page-item"><%# "next" class present for border styling in twitter bootstrap %>
|
11
11
|
<%= link_to_unless current_page.last?, svg_icon(name: "double-chevron-right.svg", width: '13', height: '16', classes: 'spree-icon-arrow-right mb-0'), url, remote: remote, class: 'page-link', 'aria-label': 'Last page' %>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
current_page: a page object for the currently displayed page
|
5
5
|
total_pages: total number of pages
|
6
6
|
per_page: number of items to fetch per page
|
7
|
-
remote: data-remote
|
8
|
-
|
7
|
+
remote: data-remote -%>
|
8
|
+
|
9
9
|
<% unless current_page.last? %>
|
10
10
|
<li class="next_page page-item">
|
11
11
|
<%= link_to_unless current_page.last?, svg_icon(name: "chevron-right.svg", width: '13', height: '16', classes: 'spree-icon-arrow-right mb-0'), url, rel: 'next', remote: remote, class: 'page-link', 'aria-label': 'Next page' %>
|
@@ -5,8 +5,8 @@
|
|
5
5
|
current_page: a page object for the currently displayed page
|
6
6
|
total_pages: total number of pages
|
7
7
|
per_page: number of items to fetch per page
|
8
|
-
remote: data-remote
|
9
|
-
|
8
|
+
remote: data-remote -%>
|
9
|
+
|
10
10
|
<li class="page<%= ' active' if page.current? %> page-item">
|
11
11
|
<%= link_to page,
|
12
12
|
url,
|
@@ -4,8 +4,8 @@
|
|
4
4
|
total_pages: total number of pages
|
5
5
|
per_page: number of items to fetch per page
|
6
6
|
remote: data-remote
|
7
|
-
paginator: the paginator that renders the pagination tags inside
|
8
|
-
|
7
|
+
paginator: the paginator that renders the pagination tags inside -%>
|
8
|
+
|
9
9
|
<% pagination_class ||= '' %>
|
10
10
|
|
11
11
|
<%= paginator.render do %>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
current_page: a page object for the currently displayed page
|
5
5
|
total_pages: total number of pages
|
6
6
|
per_page: number of items to fetch per page
|
7
|
-
remote: data-remote
|
8
|
-
|
7
|
+
remote: data-remote -%>
|
8
|
+
|
9
9
|
<% unless current_page.first? %>
|
10
10
|
<li class="prev page-item">
|
11
11
|
<%= link_to_unless current_page.first?, svg_icon(name: "chevron-left.svg", width: '13', height: '16', classes: 'spree-icon-arrow-left mb-0'), url, rel: 'prev', remote: remote, class: 'page-link', 'aria-label': 'Previous page' %>
|
@@ -1,54 +1,54 @@
|
|
1
1
|
<div class="table-responsive">
|
2
|
-
<table class="show return-items-table table table-condensed table-bordered index">
|
3
|
-
|
4
|
-
<tr>
|
5
|
-
<th><%= Spree.t(:product) %></th>
|
6
|
-
<th><%= Spree.t(:sku) %></th>
|
7
|
-
<th><%= Spree.t(:pre_tax_amount) %></th>
|
8
|
-
<th><%= Spree.t(:preferred_reimbursement_type) %></th>
|
9
|
-
<th><%= Spree.t(:exchange_for) %></th>
|
10
|
-
<th><%= Spree.t(:acceptance_errors) %></th>
|
11
|
-
<% if show_decision %>
|
12
|
-
<th></th>
|
13
|
-
<% end %>
|
14
|
-
</tr>
|
15
|
-
</thead>
|
16
|
-
<tbody>
|
17
|
-
<% return_items.each do |return_item| %>
|
2
|
+
<table class="show return-items-table table table-condensed table-bordered index">
|
3
|
+
<thead>
|
18
4
|
<tr>
|
19
|
-
<
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<td>
|
26
|
-
<%= return_item.inventory_unit.variant.sku %>
|
27
|
-
</td>
|
28
|
-
<td>
|
29
|
-
<%= return_item.display_pre_tax_amount %>
|
30
|
-
</td>
|
31
|
-
<td>
|
32
|
-
<%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
|
33
|
-
</td>
|
34
|
-
<td>
|
35
|
-
<%= return_item.exchange_variant.try(:exchange_name) %>
|
36
|
-
</td>
|
37
|
-
<td>
|
38
|
-
<%= return_item.acceptance_status_errors %>
|
39
|
-
</td>
|
5
|
+
<th><%= Spree.t(:product) %></th>
|
6
|
+
<th><%= Spree.t(:sku) %></th>
|
7
|
+
<th><%= Spree.t(:pre_tax_amount) %></th>
|
8
|
+
<th><%= Spree.t(:preferred_reimbursement_type) %></th>
|
9
|
+
<th><%= Spree.t(:exchange_for) %></th>
|
10
|
+
<th><%= Spree.t(:acceptance_errors) %></th>
|
40
11
|
<% if show_decision %>
|
41
|
-
<
|
42
|
-
<%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-success btn-sm', params: { "return_item[acceptance_status]" => 'accepted' }, "data-action" => 'save', title: Spree.t(:accept), method: 'put' } do %>
|
43
|
-
<%= Spree.t(:accept) %>
|
44
|
-
<% end if can?(:accept, return_item) %>
|
45
|
-
<%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-danger btn-sm', params: { "return_item[acceptance_status]" => 'rejected' }, "data-action" => 'remove', title: Spree.t(:reject), method: 'put' } do %>
|
46
|
-
<%= Spree.t(:reject) %>
|
47
|
-
<% end if can?(:reject, return_item) %>
|
48
|
-
</td>
|
12
|
+
<th></th>
|
49
13
|
<% end %>
|
50
14
|
</tr>
|
51
|
-
|
52
|
-
|
53
|
-
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<% return_items.each do |return_item| %>
|
18
|
+
<tr>
|
19
|
+
<td>
|
20
|
+
<div class="variant-name">
|
21
|
+
<%= link_to return_item.inventory_unit.variant.name, spree.edit_admin_product_path(return_item.inventory_unit.variant.product) %>
|
22
|
+
</div>
|
23
|
+
<div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
|
24
|
+
</td>
|
25
|
+
<td>
|
26
|
+
<%= return_item.inventory_unit.variant.sku %>
|
27
|
+
</td>
|
28
|
+
<td>
|
29
|
+
<%= return_item.display_pre_tax_amount %>
|
30
|
+
</td>
|
31
|
+
<td>
|
32
|
+
<%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= return_item.exchange_variant.try(:exchange_name) %>
|
36
|
+
</td>
|
37
|
+
<td>
|
38
|
+
<%= return_item.acceptance_status_errors if return_item.acceptance_status_errors.present? %>
|
39
|
+
</td>
|
40
|
+
<% if show_decision %>
|
41
|
+
<td class='actions actions-2'>
|
42
|
+
<%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-success btn-sm', params: { "return_item[acceptance_status]" => 'accepted' }, "data-action" => 'save', title: Spree.t(:accept), method: 'put' } do %>
|
43
|
+
<%= Spree.t(:accept) %>
|
44
|
+
<% end if can?(:accept, return_item) %>
|
45
|
+
<%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-danger btn-sm', params: { "return_item[acceptance_status]" => 'rejected' }, "data-action" => 'remove', title: Spree.t(:reject), method: 'put' } do %>
|
46
|
+
<%= Spree.t(:reject) %>
|
47
|
+
<% end if can?(:reject, return_item) %>
|
48
|
+
</td>
|
49
|
+
<% end %>
|
50
|
+
</tr>
|
51
|
+
<% end %>
|
52
|
+
</tbody>
|
53
|
+
</table>
|
54
54
|
</div>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
</fieldset>
|
45
45
|
|
46
46
|
<% if !@customer_return.fully_reimbursed? && @pending_reimbursements.empty? && can?(:create, Spree::Reimbursement) %>
|
47
|
-
<fieldset data-hook="reimbursements" class="
|
47
|
+
<fieldset data-hook="reimbursements" class="mb-3">
|
48
48
|
<% if @customer_return.completely_decided? %>
|
49
49
|
<%= form_for [:admin, @order, Spree::Reimbursement.new] do |f| %>
|
50
50
|
<%= hidden_field_tag :build_from_customer_return_id, @customer_return.id %>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<%#-------------------------------------------------%>
|
40
40
|
<div class="card mb-3" id="general-settings-cache" data-hook="general_settings_cache">
|
41
41
|
<div class="card-header">
|
42
|
-
<h1 class="card-title mb-0 h5"><%= Spree.t(:clear_cache)%></h1>
|
42
|
+
<h1 class="card-title mb-0 h5"><%= Spree.t(:clear_cache) %></h1>
|
43
43
|
</div>
|
44
44
|
|
45
45
|
<div class="card-body">
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<div class="card mb-3" id="general-settings-currency" data-hook="general_settings_currency">
|
62
62
|
<div class="card-header">
|
63
63
|
<h1 class="card-title mb-0 h5">
|
64
|
-
<%= Spree.t(:currency_settings)%>
|
64
|
+
<%= Spree.t(:currency_settings) %>
|
65
65
|
</h1>
|
66
66
|
</div>
|
67
67
|
|
@@ -79,7 +79,7 @@
|
|
79
79
|
<div class="card mb-3" id="general-settings-stores" data-hook="general_settings_stores">
|
80
80
|
<div class="card-header">
|
81
81
|
<h1 class="card-title mb-0 h5">
|
82
|
-
<%= Spree.t(:multiple_stores)%>
|
82
|
+
<%= Spree.t(:multiple_stores) %>
|
83
83
|
</h1>
|
84
84
|
</div>
|
85
85
|
<div class="card-body">
|