spree_admin 5.4.0.rc6 → 5.4.0.rc7
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/controllers/concerns/spree/admin/order_concern.rb +1 -1
- data/app/controllers/spree/admin/imports_controller.rb +2 -1
- data/app/controllers/spree/admin/orders/user_controller.rb +1 -1
- data/app/controllers/spree/admin/product_translations_controller.rb +64 -0
- data/app/controllers/spree/admin/stock_movements_controller.rb +37 -0
- data/app/helpers/spree/admin/base_helper.rb +3 -1
- data/app/views/spree/admin/dashboard/show.html.erb +1 -1
- data/app/views/spree/admin/exports/_export.html.erb +1 -1
- data/app/views/spree/admin/import_rows/_product.html.erb +4 -0
- data/app/views/spree/admin/imports/new.html.erb +1 -1
- data/app/views/spree/admin/markets/_form.html.erb +1 -1
- data/app/views/spree/admin/product_translations/index.html.erb +108 -0
- data/app/views/spree/admin/stock_movements/index.html.erb +15 -0
- data/app/views/spree/admin/tables/columns/_stock_movement_originator.html.erb +28 -0
- data/config/initializers/spree_admin_navigation.rb +18 -3
- data/config/initializers/spree_admin_tables.rb +63 -0
- data/config/locales/en.yml +10 -1
- data/config/routes.rb +3 -0
- data/lib/spree/admin/engine.rb +2 -0
- metadata +12 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6458ffb6c4174e9a472f42a28640be1fdcb253e8bfb49e1aac5f7d62f9e725c
|
|
4
|
+
data.tar.gz: 27987a653ae8d1c11515fc323bcac9e4c6e2da4da241992d0e903bbe3619b117
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9352b948c77b39c924911ade674732ec98a9a7ba2bf787fb58fc2b3015396197e9375ec21f7b51ca62d1a088c5533d0efff9a5e10ecb94b6a072c3ac79c48aab
|
|
7
|
+
data.tar.gz: 2a6320babac28aa0948ce2a15b7e48e8797dab9a496d536fc26504da383c5a50bad83c30faef640d021d622795f71bacd1feef104091aa1bcfa676f81de4d617
|
|
@@ -45,7 +45,8 @@ module Spree
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def assign_params
|
|
48
|
-
|
|
48
|
+
requested_type = params.dig(:import, :type) || params[:type]
|
|
49
|
+
@object.type = available_types.map(&:to_s).find { |type| type == requested_type } || available_types.first.to_s
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
def available_types
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Admin
|
|
3
|
+
class ProductTranslationsController < BaseController
|
|
4
|
+
include Pagy::Method
|
|
5
|
+
|
|
6
|
+
before_action :load_locales
|
|
7
|
+
|
|
8
|
+
def index
|
|
9
|
+
@total_products = store_product_ids.count
|
|
10
|
+
@coverage = build_coverage
|
|
11
|
+
@products = paginated_products
|
|
12
|
+
@translated_locales_map = build_translated_locales_map(@products.map(&:id))
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def load_locales
|
|
18
|
+
@default_locale = current_store.default_locale
|
|
19
|
+
@locales = (current_store.supported_locales_list - [@default_locale]).sort
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def store_product_ids
|
|
23
|
+
@store_product_ids ||= current_store.product_ids
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def build_coverage
|
|
27
|
+
return [] if @locales.empty?
|
|
28
|
+
|
|
29
|
+
counts = Spree::Product::Translation
|
|
30
|
+
.where(spree_product_id: store_product_ids)
|
|
31
|
+
.where(locale: @locales)
|
|
32
|
+
.where.not(name: [nil, ''])
|
|
33
|
+
.group(:locale)
|
|
34
|
+
.count
|
|
35
|
+
|
|
36
|
+
@locales.map do |locale|
|
|
37
|
+
translated = counts[locale] || 0
|
|
38
|
+
percentage = @total_products.positive? ? (translated * 100.0 / @total_products).round : 0
|
|
39
|
+
{ locale: locale, translated: translated, total: @total_products, percentage: percentage }
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def paginated_products
|
|
44
|
+
scope = current_store.products.order(:name)
|
|
45
|
+
scope = scope.ransack(params[:q]).result if params[:q].present?
|
|
46
|
+
@pagy, products = pagy(scope, limit: params[:per_page] || 25)
|
|
47
|
+
products
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def build_translated_locales_map(product_ids)
|
|
51
|
+
return {} if product_ids.empty? || @locales.empty?
|
|
52
|
+
|
|
53
|
+
rows = Spree::Product::Translation
|
|
54
|
+
.where(spree_product_id: product_ids, locale: @locales)
|
|
55
|
+
.where.not(name: [nil, ''])
|
|
56
|
+
.pluck(:spree_product_id, :locale)
|
|
57
|
+
|
|
58
|
+
rows.each_with_object({}) do |(product_id, locale), hash|
|
|
59
|
+
(hash[product_id] ||= []) << locale
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module Spree
|
|
2
|
+
module Admin
|
|
3
|
+
class StockMovementsController < ResourceController
|
|
4
|
+
include ProductsBreadcrumbConcern
|
|
5
|
+
include TableConcern
|
|
6
|
+
|
|
7
|
+
before_action :add_breadcrumbs
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def collection_default_sort
|
|
12
|
+
'created_at desc'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def scope
|
|
16
|
+
super.joins(stock_item: [:variant, :stock_location]).
|
|
17
|
+
merge(current_store.variants.eligible).
|
|
18
|
+
reorder('')
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def collection_includes
|
|
22
|
+
{
|
|
23
|
+
stock_item: {
|
|
24
|
+
stock_location: [],
|
|
25
|
+
variant: [option_values: :option_type, product: [variants: [:images], master: [:images]], images: []]
|
|
26
|
+
},
|
|
27
|
+
originator: []
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def add_breadcrumbs
|
|
32
|
+
add_breadcrumb Spree.t(:stock), spree.admin_stock_items_path
|
|
33
|
+
add_breadcrumb Spree.t(:stock_movements), spree.admin_stock_movements_path
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -293,7 +293,9 @@ module Spree
|
|
|
293
293
|
max = options[:max] || 100
|
|
294
294
|
percentage = (value.to_f / max * 100).round
|
|
295
295
|
|
|
296
|
-
|
|
296
|
+
css_class = options[:class] || 'progress'
|
|
297
|
+
|
|
298
|
+
content_tag(:div, class: css_class) do
|
|
297
299
|
content_tag(:div,
|
|
298
300
|
{ class: 'progress-bar', role: 'progressbar', style: "width: #{percentage}%",
|
|
299
301
|
aria: { valuenow: value, valuemin: min, valuemax: max } }) do
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<%= Spree.t('admin.dashboard.hi') %> <%= try_spree_current_user.first_name %>!
|
|
5
5
|
</h2>
|
|
6
6
|
<p class="mb-4">
|
|
7
|
-
<%= Spree.t('admin.dashboard.
|
|
7
|
+
<%= Spree.t('admin.dashboard.whats_happening_on_html', store_name: current_store.name) %>
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= turbo_frame_tag :drawer do %>
|
|
2
|
-
<%= drawer_header(Spree.t(:import) + ' ' + Spree.t(@import.type.demodulize.pluralize
|
|
2
|
+
<%= drawer_header(Spree.t(:import) + ' ' + Spree.t(@import.type.demodulize.underscore.pluralize)) %>
|
|
3
3
|
<%= form_for @import, url: spree.admin_imports_path, data: { controller: 'import-form' } do |f| %>
|
|
4
4
|
<div class="drawer-body">
|
|
5
5
|
<%= f.hidden_field :type %>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="card-body">
|
|
9
9
|
<%= f.spree_text_field :name, required: true %>
|
|
10
10
|
|
|
11
|
-
<%= f.spree_select :country_ids, @countries.map { |country| ["#{Spree::Country.iso_to_emoji_flag(country.iso)} #{country.name}", country.id] }, { include_blank: false, label: Spree.t(:
|
|
11
|
+
<%= f.spree_select :country_ids, @countries.map { |country| ["#{Spree::Country.iso_to_emoji_flag(country.iso)} #{country.name}", country.id] }, { include_blank: false, label: Spree.t(:countries), autocomplete: true, multiple: true } %>
|
|
12
12
|
|
|
13
13
|
<%= f.spree_select :currency, currency_options(f.object.currency), { label: Spree.t(:currency), required: true, autocomplete: true } %>
|
|
14
14
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<% content_for :page_title do %>
|
|
2
|
+
<%= Spree.t(:translations) %>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<% content_for :page_actions do %>
|
|
6
|
+
<%= link_to_with_icon 'table-import', Spree.t(:import), spree.new_admin_import_path(type: 'Spree::Imports::ProductTranslations'), class: 'btn btn-light', data: { action: 'drawer#open', turbo_frame: :drawer } if can?(:create, Spree::Import) %>
|
|
7
|
+
<%= link_to_export_modal if can?(:create, Spree::Export) %>
|
|
8
|
+
<% end if @locales.any? %>
|
|
9
|
+
|
|
10
|
+
<% if @locales.empty? %>
|
|
11
|
+
<div class="card-lg">
|
|
12
|
+
<div class="text-center py-16">
|
|
13
|
+
<%= icon 'language', class: 'w-12 h-12 mx-auto mb-4 text-gray-400' %>
|
|
14
|
+
<h3 class="text-lg font-medium text-gray-900 mb-2"><%= Spree.t('admin.product_translations.no_locales_title') %></h3>
|
|
15
|
+
<p class="text-gray-500 mb-4"><%= Spree.t('admin.product_translations.no_locales_description') %></p>
|
|
16
|
+
<%= link_to Spree.t('admin.product_translations.manage_markets'), spree.admin_markets_path, class: 'btn btn-primary' %>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<% else %>
|
|
20
|
+
<%= render 'spree/admin/shared/export_modal', export_type: Spree::Exports::ProductTranslations %>
|
|
21
|
+
|
|
22
|
+
<div class="card-lg mb-6">
|
|
23
|
+
<div class="card-header">
|
|
24
|
+
<h3 class="card-title"><%= Spree.t('admin.product_translations.coverage') %></h3>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="card-body p-0">
|
|
27
|
+
<div class="table-responsive">
|
|
28
|
+
<table class="table mb-0">
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th><%= Spree.t('admin.product_translations.locale') %></th>
|
|
32
|
+
<th class="text-center"><%= Spree.t('admin.product_translations.translated') %></th>
|
|
33
|
+
<th class="text-center"><%= Spree.t('admin.product_translations.total') %></th>
|
|
34
|
+
<th style="width: 40%;"><%= Spree.t('admin.product_translations.progress') %></th>
|
|
35
|
+
</tr>
|
|
36
|
+
</thead>
|
|
37
|
+
<tbody>
|
|
38
|
+
<% @coverage.each do |row| %>
|
|
39
|
+
<tr>
|
|
40
|
+
<td>
|
|
41
|
+
<strong><%= Spree.t('i18n.this_file_language', locale: row[:locale], default: row[:locale]) %></strong>
|
|
42
|
+
<span class="text-gray-400 ml-1"><%= row[:locale] %></span>
|
|
43
|
+
</td>
|
|
44
|
+
<td class="text-center"><%= row[:translated] %></td>
|
|
45
|
+
<td class="text-center"><%= row[:total] %></td>
|
|
46
|
+
<td>
|
|
47
|
+
<div class="flex items-center gap-3">
|
|
48
|
+
<%= progress_bar_component(row[:percentage].to_i, min: 0, max: 100, class: 'progress w-4/5') %>
|
|
49
|
+
<span class="text-sm text-gray-500 whitespace-nowrap"><%= row[:percentage] %>%</span>
|
|
50
|
+
</div>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<% end %>
|
|
54
|
+
</tbody>
|
|
55
|
+
</table>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="card-lg">
|
|
61
|
+
<div class="card-header">
|
|
62
|
+
<h3 class="card-title"><%= Spree.t(:products) %></h3>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="card-body p-0">
|
|
65
|
+
<% if @products.any? %>
|
|
66
|
+
<div class="table-responsive">
|
|
67
|
+
<table class="table">
|
|
68
|
+
<thead>
|
|
69
|
+
<tr>
|
|
70
|
+
<th><%= Spree.t(:product) %></th>
|
|
71
|
+
<% @locales.each do |locale| %>
|
|
72
|
+
<th class="text-center"><%= locale %></th>
|
|
73
|
+
<% end %>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody>
|
|
77
|
+
<% @products.each do |product| %>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>
|
|
80
|
+
<%= link_to spree.edit_admin_translation_path(resource_type: 'Spree::Product', id: product.id),
|
|
81
|
+
data: { action: 'drawer#open', turbo_frame: :drawer }, class: 'flex items-center gap-3 no-underline' do %>
|
|
82
|
+
<%= render 'spree/admin/shared/product_image', object: product %>
|
|
83
|
+
<span class="text-gray-900 font-medium">
|
|
84
|
+
<%= product.name %>
|
|
85
|
+
</span>
|
|
86
|
+
<% end %>
|
|
87
|
+
</td>
|
|
88
|
+
<% @locales.each do |locale| %>
|
|
89
|
+
<td class="text-center">
|
|
90
|
+
<% if @translated_locales_map[product.id]&.include?(locale) %>
|
|
91
|
+
<%= icon 'circle-check-filled', class: 'text-green-500' %>
|
|
92
|
+
<% else %>
|
|
93
|
+
<span class="text-gray-300">—</span>
|
|
94
|
+
<% end %>
|
|
95
|
+
</td>
|
|
96
|
+
<% end %>
|
|
97
|
+
</tr>
|
|
98
|
+
<% end %>
|
|
99
|
+
</tbody>
|
|
100
|
+
</table>
|
|
101
|
+
<%= render 'spree/admin/shared/index_table_options', collection: @products %>
|
|
102
|
+
</div>
|
|
103
|
+
<% else %>
|
|
104
|
+
<%= render 'spree/admin/shared/no_resource_found', new_object_url: nil %>
|
|
105
|
+
<% end %>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<% content_for :page_title do %>
|
|
2
|
+
<%= Spree.t(:stock) %>
|
|
3
|
+
<% end %>
|
|
4
|
+
|
|
5
|
+
<% content_for :page_tabs do %>
|
|
6
|
+
<%= render "spree/admin/shared/stock_nav" %>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<% content_for :page_actions do %>
|
|
10
|
+
<%= render_admin_partials(:stock_movements_actions_partials) %>
|
|
11
|
+
<% end %>
|
|
12
|
+
|
|
13
|
+
<%= render_admin_partials(:stock_movements_header_partials) %>
|
|
14
|
+
|
|
15
|
+
<%= render_table @collection, :stock_movements, edit_object_url: nil %>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<%# locals: (record:, column:, value:) %>
|
|
2
|
+
<% originator = record.originator %>
|
|
3
|
+
<% if originator.is_a?(Spree::StockTransfer) %>
|
|
4
|
+
<%= originator.class.model_name.human %>
|
|
5
|
+
<% if can?(:show, originator) %>
|
|
6
|
+
<%= link_to originator.number, spree.admin_stock_transfer_path(originator), data: { turbo_frame: '_top' } %>
|
|
7
|
+
<% else %>
|
|
8
|
+
<%= originator.number %>
|
|
9
|
+
<% end %>
|
|
10
|
+
<% elsif originator.is_a?(Spree::Shipment) %>
|
|
11
|
+
<%= originator.class.model_name.human %>
|
|
12
|
+
<% if can?(:show, originator.order) %>
|
|
13
|
+
<%= link_to originator.number, spree.edit_admin_order_path(originator.order), data: { turbo_frame: '_top' } %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<%= originator.number %>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% elsif originator.is_a?(Spree::ReturnAuthorization) %>
|
|
18
|
+
<%= originator.class.model_name.human %>
|
|
19
|
+
<% if can?(:show, originator.order) %>
|
|
20
|
+
<%= link_to originator.number, spree.edit_admin_order_path(originator.order), data: { turbo_frame: '_top' } %>
|
|
21
|
+
<% else %>
|
|
22
|
+
<%= originator.number %>
|
|
23
|
+
<% end %>
|
|
24
|
+
<% elsif originator.present? %>
|
|
25
|
+
<%= originator.class.model_name.human %>
|
|
26
|
+
<% else %>
|
|
27
|
+
<span class="text-gray-400"><%= Spree.t(:manual) %></span>
|
|
28
|
+
<% end %>
|
|
@@ -107,8 +107,16 @@ Rails.application.config.after_initialize do
|
|
|
107
107
|
label: :stock,
|
|
108
108
|
url: :admin_stock_items_path,
|
|
109
109
|
position: 20,
|
|
110
|
-
active: -> { %w[stock_items stock_transfers].include?(controller_name) },
|
|
111
|
-
if: -> { can?(:manage, Spree::StockItem) || can?(:manage, Spree::StockTransfer) }
|
|
110
|
+
active: -> { %w[stock_items stock_movements stock_transfers].include?(controller_name) },
|
|
111
|
+
if: -> { can?(:manage, Spree::StockItem) || can?(:manage, Spree::StockMovement) || can?(:manage, Spree::StockTransfer) }
|
|
112
|
+
|
|
113
|
+
# Translations
|
|
114
|
+
products.add :translations,
|
|
115
|
+
label: :translations,
|
|
116
|
+
url: :admin_product_translations_path,
|
|
117
|
+
position: 25,
|
|
118
|
+
active: -> { controller_name == 'product_translations' },
|
|
119
|
+
if: -> { can?(:manage, Spree::Product) && current_store.supported_locales_list.size > 1 }
|
|
112
120
|
|
|
113
121
|
# Taxonomies
|
|
114
122
|
products.add :taxonomies,
|
|
@@ -411,10 +419,17 @@ Rails.application.config.after_initialize do
|
|
|
411
419
|
active: -> { controller_name == 'stock_items' },
|
|
412
420
|
if: -> { can?(:manage, Spree::StockItem) }
|
|
413
421
|
|
|
422
|
+
stock_tabs_nav.add :stock_movements,
|
|
423
|
+
label: :stock_movements,
|
|
424
|
+
url: :admin_stock_movements_path,
|
|
425
|
+
position: 20,
|
|
426
|
+
active: -> { controller_name == 'stock_movements' },
|
|
427
|
+
if: -> { can?(:manage, Spree::StockMovement) }
|
|
428
|
+
|
|
414
429
|
stock_tabs_nav.add :stock_transfers,
|
|
415
430
|
label: :stock_transfers,
|
|
416
431
|
url: :admin_stock_transfers_path,
|
|
417
|
-
position:
|
|
432
|
+
position: 30,
|
|
418
433
|
active: -> { controller_name == 'stock_transfers' },
|
|
419
434
|
if: -> { can?(:manage, Spree::StockTransfer) }
|
|
420
435
|
|
|
@@ -933,6 +933,69 @@ Rails.application.config.after_initialize do
|
|
|
933
933
|
default: false,
|
|
934
934
|
position: 70
|
|
935
935
|
|
|
936
|
+
# Register Stock Movements table
|
|
937
|
+
Spree.admin.tables.register(:stock_movements, model_class: Spree::StockMovement, search_param: :stock_item_variant_product_name_cont, row_actions: false, new_resource: false)
|
|
938
|
+
|
|
939
|
+
Spree.admin.tables.stock_movements.add :variant,
|
|
940
|
+
label: :variant,
|
|
941
|
+
type: :custom,
|
|
942
|
+
sortable: false,
|
|
943
|
+
filterable: true,
|
|
944
|
+
default: true,
|
|
945
|
+
position: 10,
|
|
946
|
+
ransack_attribute: 'stock_item_variant_product_name',
|
|
947
|
+
partial: 'spree/admin/variants/variant',
|
|
948
|
+
partial_locals: ->(record) { { variant: record.variant } }
|
|
949
|
+
|
|
950
|
+
Spree.admin.tables.stock_movements.add :stock_location,
|
|
951
|
+
label: :stock_location,
|
|
952
|
+
type: :custom,
|
|
953
|
+
filter_type: :autocomplete,
|
|
954
|
+
sortable: false,
|
|
955
|
+
filterable: true,
|
|
956
|
+
default: true,
|
|
957
|
+
position: 20,
|
|
958
|
+
ransack_attribute: 'stock_item_stock_location_id',
|
|
959
|
+
operators: %i[eq],
|
|
960
|
+
search_url: ->(view_context) { view_context.spree.admin_stock_locations_select_options_path(format: :json) },
|
|
961
|
+
partial: 'spree/admin/tables/columns/stock_item_location',
|
|
962
|
+
partial_locals: ->(record) { { record: record.stock_item } }
|
|
963
|
+
|
|
964
|
+
Spree.admin.tables.stock_movements.add :quantity,
|
|
965
|
+
label: :quantity,
|
|
966
|
+
type: :number,
|
|
967
|
+
sortable: true,
|
|
968
|
+
filterable: false,
|
|
969
|
+
default: true,
|
|
970
|
+
position: 30
|
|
971
|
+
|
|
972
|
+
Spree.admin.tables.stock_movements.add :originator,
|
|
973
|
+
label: :originator,
|
|
974
|
+
type: :custom,
|
|
975
|
+
filter_type: :select,
|
|
976
|
+
sortable: false,
|
|
977
|
+
filterable: true,
|
|
978
|
+
default: true,
|
|
979
|
+
position: 40,
|
|
980
|
+
ransack_attribute: 'originator_type',
|
|
981
|
+
operators: %i[eq],
|
|
982
|
+
value_options: -> {
|
|
983
|
+
[
|
|
984
|
+
{ value: 'Spree::Shipment', label: Spree::Shipment.model_name.human },
|
|
985
|
+
{ value: 'Spree::StockTransfer', label: Spree::StockTransfer.model_name.human },
|
|
986
|
+
{ value: 'Spree::ReturnAuthorization', label: Spree::ReturnAuthorization.model_name.human }
|
|
987
|
+
]
|
|
988
|
+
},
|
|
989
|
+
partial: 'spree/admin/tables/columns/stock_movement_originator'
|
|
990
|
+
|
|
991
|
+
Spree.admin.tables.stock_movements.add :created_at,
|
|
992
|
+
label: :created_at,
|
|
993
|
+
type: :datetime,
|
|
994
|
+
sortable: true,
|
|
995
|
+
filterable: true,
|
|
996
|
+
default: true,
|
|
997
|
+
position: 50
|
|
998
|
+
|
|
936
999
|
# Register Metafield Definitions table
|
|
937
1000
|
Spree.admin.tables.register(:metafield_definitions, model_class: Spree::MetafieldDefinition, search_param: :search, row_actions: true)
|
|
938
1001
|
|
data/config/locales/en.yml
CHANGED
|
@@ -99,7 +99,7 @@ en:
|
|
|
99
99
|
hi: Hi
|
|
100
100
|
top_products: Top products
|
|
101
101
|
view_report: View report
|
|
102
|
-
|
|
102
|
+
whats_happening_on_html: Here's what's happening on <strong>%{store_name}</strong> today.
|
|
103
103
|
digital_shipment_fulfillment_note: This shipment will be marked as fulfilled once the user downloads the digital product
|
|
104
104
|
display_on_options:
|
|
105
105
|
back_end: Only on admin panel
|
|
@@ -244,6 +244,15 @@ en:
|
|
|
244
244
|
schedule: Schedule
|
|
245
245
|
scheduled: Price list has been scheduled
|
|
246
246
|
unschedule: Unschedule
|
|
247
|
+
product_translations:
|
|
248
|
+
coverage: Translation coverage
|
|
249
|
+
locale: Locale
|
|
250
|
+
manage_markets: Manage Markets
|
|
251
|
+
no_locales_description: Set up markets with additional locales to start translating your products.
|
|
252
|
+
no_locales_title: No additional locales configured
|
|
253
|
+
progress: Progress
|
|
254
|
+
total: Total
|
|
255
|
+
translated: Translated
|
|
247
256
|
products:
|
|
248
257
|
active: Active
|
|
249
258
|
all_statuses: All statuses
|
data/config/routes.rb
CHANGED
|
@@ -27,8 +27,11 @@ Spree::Core::Engine.add_routes do
|
|
|
27
27
|
# variant search
|
|
28
28
|
post 'variants/search'
|
|
29
29
|
get 'variants/search', defaults: { format: :json }
|
|
30
|
+
# product translations
|
|
31
|
+
resources :product_translations, only: [:index]
|
|
30
32
|
# stock
|
|
31
33
|
resources :stock_items, only: [:index, :update, :destroy]
|
|
34
|
+
resources :stock_movements, only: [:index]
|
|
32
35
|
resources :stock_transfers, except: [:edit, :update]
|
|
33
36
|
# price lists
|
|
34
37
|
resources :price_lists do
|
data/lib/spree/admin/engine.rb
CHANGED
|
@@ -96,6 +96,8 @@ module Spree
|
|
|
96
96
|
:stock_items_header_partials,
|
|
97
97
|
:stock_locations_actions_partials,
|
|
98
98
|
:stock_locations_header_partials,
|
|
99
|
+
:stock_movements_actions_partials,
|
|
100
|
+
:stock_movements_header_partials,
|
|
99
101
|
:stock_nav_partials,
|
|
100
102
|
:stock_transfers_actions_partials,
|
|
101
103
|
:stock_transfers_filters_partials,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.4.0.
|
|
4
|
+
version: 5.4.0.rc7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 5.4.0.
|
|
19
|
+
version: 5.4.0.rc7
|
|
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: 5.4.0.
|
|
26
|
+
version: 5.4.0.rc7
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: active_link_to
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -357,6 +357,7 @@ files:
|
|
|
357
357
|
- app/controllers/spree/admin/price_list_products_controller.rb
|
|
358
358
|
- app/controllers/spree/admin/price_lists_controller.rb
|
|
359
359
|
- app/controllers/spree/admin/price_rules_controller.rb
|
|
360
|
+
- app/controllers/spree/admin/product_translations_controller.rb
|
|
360
361
|
- app/controllers/spree/admin/products_controller.rb
|
|
361
362
|
- app/controllers/spree/admin/profile_controller.rb
|
|
362
363
|
- app/controllers/spree/admin/promotion_actions_controller.rb
|
|
@@ -379,6 +380,7 @@ files:
|
|
|
379
380
|
- app/controllers/spree/admin/shipping_methods_controller.rb
|
|
380
381
|
- app/controllers/spree/admin/stock_items_controller.rb
|
|
381
382
|
- app/controllers/spree/admin/stock_locations_controller.rb
|
|
383
|
+
- app/controllers/spree/admin/stock_movements_controller.rb
|
|
382
384
|
- app/controllers/spree/admin/stock_transfers_controller.rb
|
|
383
385
|
- app/controllers/spree/admin/store_credit_categories_controller.rb
|
|
384
386
|
- app/controllers/spree/admin/store_credits_controller.rb
|
|
@@ -615,6 +617,7 @@ files:
|
|
|
615
617
|
- app/views/spree/admin/gift_cards/new.html.erb
|
|
616
618
|
- app/views/spree/admin/gift_cards/show.html.erb
|
|
617
619
|
- app/views/spree/admin/import_mappings/update.turbo_stream.erb
|
|
620
|
+
- app/views/spree/admin/import_rows/_product.html.erb
|
|
618
621
|
- app/views/spree/admin/import_rows/_variant.html.erb
|
|
619
622
|
- app/views/spree/admin/import_rows/show.html.erb
|
|
620
623
|
- app/views/spree/admin/imports/_footer.html.erb
|
|
@@ -774,6 +777,7 @@ files:
|
|
|
774
777
|
- app/views/spree/admin/price_rules/forms/_volume_rule.html.erb
|
|
775
778
|
- app/views/spree/admin/price_rules/forms/_zone_rule.html.erb
|
|
776
779
|
- app/views/spree/admin/price_rules/new.html.erb
|
|
780
|
+
- app/views/spree/admin/product_translations/index.html.erb
|
|
777
781
|
- app/views/spree/admin/products/_edit_page_title.html.erb
|
|
778
782
|
- app/views/spree/admin/products/_form.html.erb
|
|
779
783
|
- app/views/spree/admin/products/_import_button.html.erb
|
|
@@ -942,6 +946,7 @@ files:
|
|
|
942
946
|
- app/views/spree/admin/stock_locations/edit.html.erb
|
|
943
947
|
- app/views/spree/admin/stock_locations/index.html.erb
|
|
944
948
|
- app/views/spree/admin/stock_locations/new.html.erb
|
|
949
|
+
- app/views/spree/admin/stock_movements/index.html.erb
|
|
945
950
|
- app/views/spree/admin/stock_transfers/_destination_movement_form.html.erb
|
|
946
951
|
- app/views/spree/admin/stock_transfers/_new_variant_modal.html.erb
|
|
947
952
|
- app/views/spree/admin/stock_transfers/_new_variant_template.html.erb
|
|
@@ -993,6 +998,7 @@ files:
|
|
|
993
998
|
- app/views/spree/admin/tables/columns/_stock_item_backorderable.html.erb
|
|
994
999
|
- app/views/spree/admin/tables/columns/_stock_item_count_on_hand.html.erb
|
|
995
1000
|
- app/views/spree/admin/tables/columns/_stock_item_location.html.erb
|
|
1001
|
+
- app/views/spree/admin/tables/columns/_stock_movement_originator.html.erb
|
|
996
1002
|
- app/views/spree/admin/tables/columns/_user_location.html.erb
|
|
997
1003
|
- app/views/spree/admin/tables/columns/_webhook_deliveries_stats.html.erb
|
|
998
1004
|
- app/views/spree/admin/tables/columns/_webhook_delivery_actions.html.erb
|
|
@@ -1169,9 +1175,9 @@ licenses:
|
|
|
1169
1175
|
- BSD-3-Clause
|
|
1170
1176
|
metadata:
|
|
1171
1177
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
1172
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.4.0.
|
|
1178
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.4.0.rc7
|
|
1173
1179
|
documentation_uri: https://docs.spreecommerce.org/
|
|
1174
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.4.0.
|
|
1180
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.4.0.rc7
|
|
1175
1181
|
post_install_message:
|
|
1176
1182
|
rdoc_options: []
|
|
1177
1183
|
require_paths:
|