solidus_admin 0.5.0 → 0.5.1
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/builds/solidus_admin/tailwind.css +4 -0
- data/app/components/solidus_admin/ui/alert/component.html.erb +1 -1
- data/app/controllers/solidus_admin/stock_items_controller.rb +7 -1
- data/app/controllers/solidus_admin/stores_controller.rb +1 -1
- data/lib/solidus_admin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9976fca44d3e64ccb4f4dc321ca3ed988f654bec55498f0b1a624abcf7c15cb
|
|
4
|
+
data.tar.gz: 15267cab9e5166d3d8311c741c07d8f0e36d64e4efcaa8170a0860f3b04eac92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 339413880b765aed28876f823195d02527986164c174513665cdb2297ded7091d3d6a773654756e6733784ea8b18a48d9b423e843eb7d3335ae34f3e5796ab24
|
|
7
|
+
data.tar.gz: 1eeef37a4149c99f55a1c142f8aa210f82475da1af680212a04960ca64ad129ebab13179c79780803fe37c11c3c20957d9f1bab9bec0d45bc9ed21bc076c3497
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div class="flex flex-col px-2 pt-1 gap-3">
|
|
20
20
|
<p class="font-semibold text-base text-black leading-none"><%= @title %></p>
|
|
21
|
-
<p class="font-normal text-sm text-black leading-none"><%= @message
|
|
21
|
+
<p class="font-normal text-sm text-black leading-none whitespace-pre-line"><%= @message %></p>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
<div>
|
|
@@ -10,6 +10,8 @@ module SolidusAdmin
|
|
|
10
10
|
search_scope(:low_stock) { _1.where("count_on_hand > 0 AND count_on_hand < ?", SolidusAdmin::Config.low_stock_value) }
|
|
11
11
|
search_scope(:in_stock) { _1.where("count_on_hand > 0") }
|
|
12
12
|
|
|
13
|
+
before_action :authorize_stock_item, only: %i[edit update]
|
|
14
|
+
|
|
13
15
|
def index
|
|
14
16
|
respond_to do |format|
|
|
15
17
|
format.html { render component("stock_items/index").new(page: @page) }
|
|
@@ -34,12 +36,16 @@ module SolidusAdmin
|
|
|
34
36
|
def resource_class = Spree::StockItem
|
|
35
37
|
|
|
36
38
|
def resources_collection
|
|
37
|
-
Spree::StockItem.reorder(nil).includes(
|
|
39
|
+
Spree::StockItem.accessible_by(current_ability, action_name.to_sym).reorder(nil).includes(
|
|
38
40
|
:stock_location,
|
|
39
41
|
variant: [:product, :images, {option_values: :option_type}]
|
|
40
42
|
)
|
|
41
43
|
end
|
|
42
44
|
|
|
45
|
+
def authorize_stock_item
|
|
46
|
+
authorize! action_name.to_sym, @stock_item
|
|
47
|
+
end
|
|
48
|
+
|
|
43
49
|
def resources_sorting_options
|
|
44
50
|
{
|
|
45
51
|
variant_id: :desc,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solidus_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Solidus Team
|
|
@@ -682,7 +682,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
682
682
|
- !ruby/object:Gem::Version
|
|
683
683
|
version: 1.8.23
|
|
684
684
|
requirements: []
|
|
685
|
-
rubygems_version: 4.0.
|
|
685
|
+
rubygems_version: 4.0.10
|
|
686
686
|
specification_version: 4
|
|
687
687
|
summary: Admin interface for the Solidus e-commerce framework.
|
|
688
688
|
test_files: []
|