solidus_admin 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/components/solidus_admin/adjustment_reasons/index/component.rb +9 -19
  4. data/app/components/solidus_admin/base_component.rb +29 -1
  5. data/app/components/solidus_admin/option_types/index/component.rb +20 -6
  6. data/app/components/solidus_admin/orders/index/component.rb +20 -15
  7. data/app/components/solidus_admin/orders/index/component.yml +0 -1
  8. data/app/components/solidus_admin/payment_methods/index/component.rb +28 -18
  9. data/app/components/solidus_admin/payment_methods/index/component.yml +0 -5
  10. data/app/components/solidus_admin/products/index/component.rb +17 -10
  11. data/app/components/solidus_admin/products/index/component.yml +0 -2
  12. data/app/components/solidus_admin/promotion_categories/index/component.rb +12 -13
  13. data/app/components/solidus_admin/promotions/index/component.rb +17 -10
  14. data/app/components/solidus_admin/promotions/index/component.yml +0 -4
  15. data/app/components/solidus_admin/properties/index/component.rb +17 -18
  16. data/app/components/solidus_admin/refund_reasons/index/component.rb +18 -18
  17. data/app/components/solidus_admin/refunds_and_returns/component.rb +33 -13
  18. data/app/components/solidus_admin/reimbursement_types/index/component.rb +7 -25
  19. data/app/components/solidus_admin/return_reasons/index/component.rb +9 -19
  20. data/app/components/solidus_admin/shipping/component.rb +23 -11
  21. data/app/components/solidus_admin/shipping_categories/index/component.rb +18 -18
  22. data/app/components/solidus_admin/shipping_methods/index/component.rb +18 -18
  23. data/app/components/solidus_admin/stock_items/index/component.rb +9 -15
  24. data/app/components/solidus_admin/stock_locations/index/component.rb +18 -10
  25. data/app/components/solidus_admin/stock_locations/index/component.yml +0 -3
  26. data/app/components/solidus_admin/store_credit_reasons/index/component.rb +18 -18
  27. data/app/components/solidus_admin/stores/index/component.rb +17 -18
  28. data/app/components/solidus_admin/tax_categories/index/component.rb +20 -20
  29. data/app/components/solidus_admin/tax_rates/index/component.rb +18 -14
  30. data/app/components/solidus_admin/taxes/component.rb +8 -8
  31. data/app/components/solidus_admin/taxonomies/index/component.rb +17 -11
  32. data/app/components/solidus_admin/ui/pages/index/component.html.erb +30 -0
  33. data/app/components/solidus_admin/ui/pages/index/component.rb +119 -0
  34. data/app/components/solidus_admin/ui/table/component.html.erb +2 -1
  35. data/app/components/solidus_admin/ui/table/component.rb +1 -1
  36. data/app/components/solidus_admin/users/index/component.rb +17 -10
  37. data/app/components/solidus_admin/users/index/component.yml +0 -3
  38. data/app/components/solidus_admin/zones/index/component.rb +18 -10
  39. data/app/controllers/solidus_admin/promotion_categories_controller.rb +0 -9
  40. data/app/controllers/solidus_admin/properties_controller.rb +1 -1
  41. data/app/views/layouts/solidus_admin/preview.html.erb +2 -0
  42. data/config/initializers/view_component.rb +1 -1
  43. data/lib/solidus_admin/configuration.rb +3 -1
  44. data/lib/solidus_admin/version.rb +1 -1
  45. metadata +6 -43
  46. data/app/components/solidus_admin/adjustment_reasons/index/component.html.erb +0 -32
  47. data/app/components/solidus_admin/adjustment_reasons/index/component.yml +0 -4
  48. data/app/components/solidus_admin/option_types/index/component.html.erb +0 -30
  49. data/app/components/solidus_admin/orders/index/component.html.erb +0 -35
  50. data/app/components/solidus_admin/payment_methods/index/component.html.erb +0 -38
  51. data/app/components/solidus_admin/products/index/component.html.erb +0 -34
  52. data/app/components/solidus_admin/promotion_categories/index/component.html.erb +0 -26
  53. data/app/components/solidus_admin/promotion_categories/index/component.yml +0 -4
  54. data/app/components/solidus_admin/promotions/index/component.html.erb +0 -34
  55. data/app/components/solidus_admin/properties/index/component.html.erb +0 -34
  56. data/app/components/solidus_admin/properties/index/component.yml +0 -4
  57. data/app/components/solidus_admin/refund_reasons/index/component.html.erb +0 -31
  58. data/app/components/solidus_admin/refund_reasons/index/component.yml +0 -4
  59. data/app/components/solidus_admin/refunds_and_returns/component.html.erb +0 -26
  60. data/app/components/solidus_admin/reimbursement_types/index/component.html.erb +0 -22
  61. data/app/components/solidus_admin/reimbursement_types/index/component.yml +0 -4
  62. data/app/components/solidus_admin/return_reasons/index/component.html.erb +0 -31
  63. data/app/components/solidus_admin/return_reasons/index/component.yml +0 -4
  64. data/app/components/solidus_admin/shipping/component.html.erb +0 -30
  65. data/app/components/solidus_admin/shipping_categories/index/component.html.erb +0 -32
  66. data/app/components/solidus_admin/shipping_categories/index/component.yml +0 -4
  67. data/app/components/solidus_admin/shipping_methods/index/component.html.erb +0 -32
  68. data/app/components/solidus_admin/shipping_methods/index/component.yml +0 -4
  69. data/app/components/solidus_admin/stock_items/index/component.html.erb +0 -26
  70. data/app/components/solidus_admin/stock_locations/index/component.html.erb +0 -32
  71. data/app/components/solidus_admin/store_credit_reasons/index/component.html.erb +0 -31
  72. data/app/components/solidus_admin/store_credit_reasons/index/component.yml +0 -4
  73. data/app/components/solidus_admin/stores/index/component.html.erb +0 -34
  74. data/app/components/solidus_admin/stores/index/component.yml +0 -4
  75. data/app/components/solidus_admin/tax_categories/index/component.html.erb +0 -32
  76. data/app/components/solidus_admin/tax_categories/index/component.yml +0 -6
  77. data/app/components/solidus_admin/tax_rates/index/component.html.erb +0 -32
  78. data/app/components/solidus_admin/tax_rates/index/component.yml +0 -4
  79. data/app/components/solidus_admin/taxes/component.html.erb +0 -24
  80. data/app/components/solidus_admin/taxonomies/index/component.html.erb +0 -28
  81. data/app/components/solidus_admin/taxonomies/index/component.yml +0 -4
  82. data/app/components/solidus_admin/users/index/component.html.erb +0 -34
  83. data/app/components/solidus_admin/zones/index/component.html.erb +0 -35
  84. data/app/components/solidus_admin/zones/index/component.yml +0 -4
  85. /data/app/components/solidus_admin/{option_types → ui/pages}/index/component.yml +0 -0
@@ -0,0 +1,119 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SolidusAdmin::UI::Pages::Index::Component < SolidusAdmin::BaseComponent
4
+ include SolidusAdmin::Layout::PageHelpers
5
+
6
+ Tab = Struct.new(:text, :href, :current, keyword_init: true)
7
+
8
+ def tabs
9
+ nil
10
+ end
11
+
12
+ def initialize(page:)
13
+ @page = page
14
+ @tabs = tabs&.map { |tab| Tab.new(**tab) }
15
+ end
16
+
17
+ def row_fade(_record)
18
+ false
19
+ end
20
+
21
+ def model_class
22
+ nil
23
+ end
24
+
25
+ def title
26
+ model_class.model_name.human.pluralize
27
+ end
28
+
29
+ def search_key
30
+ nil
31
+ end
32
+
33
+ def search_params
34
+ params[:q]
35
+ end
36
+
37
+ def search_name
38
+ :q
39
+ end
40
+
41
+ def search_url
42
+ nil
43
+ end
44
+
45
+ def table_id
46
+ stimulus_id
47
+ end
48
+
49
+ def rows
50
+ @page.records
51
+ end
52
+
53
+ def row_url(_record)
54
+ nil
55
+ end
56
+
57
+ def batch_actions
58
+ []
59
+ end
60
+
61
+ def scopes
62
+ []
63
+ end
64
+
65
+ def filters
66
+ []
67
+ end
68
+
69
+ def columns
70
+ []
71
+ end
72
+
73
+ def prev_page_path
74
+ solidus_admin.url_for(**request.params, page: @page.number - 1, only_path: true) unless @page.first?
75
+ end
76
+
77
+ def next_page_path
78
+ solidus_admin.url_for(**request.params, page: @page.next_param, only_path: true) unless @page.last?
79
+ end
80
+
81
+ def search_options
82
+ return unless search_url
83
+
84
+ {
85
+ name: search_name,
86
+ value: search_params,
87
+ url: search_url,
88
+ searchbar_key: search_key,
89
+ filters: filters,
90
+ scopes: scopes,
91
+ }
92
+ end
93
+
94
+ def sortable_options
95
+ nil
96
+ end
97
+
98
+ def render_table
99
+ render component('ui/table').new(
100
+ id: stimulus_id,
101
+ data: {
102
+ class: model_class,
103
+ rows: rows,
104
+ fade: -> { row_fade(_1) },
105
+ prev: prev_page_path,
106
+ next: next_page_path,
107
+ columns: columns,
108
+ batch_actions: batch_actions,
109
+ url: -> { row_url(_1) },
110
+ },
111
+ search: search_options,
112
+ sortable: sortable_options,
113
+ )
114
+ end
115
+
116
+ def page_actions
117
+ nil
118
+ end
119
+ end
@@ -3,6 +3,7 @@
3
3
  rounded-lg
4
4
  border
5
5
  border-gray-100
6
+ <%= 'overflow-hidden' unless @search %>
6
7
  "
7
8
  data-controller="<%= stimulus_id %>"
8
9
  data-<%= stimulus_id %>-selected-row-class="bg-gray-15"
@@ -111,7 +112,7 @@
111
112
  </tr>
112
113
  </thead>
113
114
 
114
- <% if @data.batch_actions %>
115
+ <% if @data.batch_actions && @data.rows.any? %>
115
116
  <thead
116
117
  data-<%= stimulus_id %>-target="batchHeader"
117
118
  class="bg-white color-black text-xs leading-none text-left"
@@ -59,7 +59,7 @@ class SolidusAdmin::UI::Table::Component < SolidusAdmin::BaseComponent
59
59
  def initialize(id:, data:, search: nil, sortable: nil)
60
60
  @id = id
61
61
  @data = Data.new(**data)
62
- @data.columns.unshift selectable_column if @data.batch_actions.present?
62
+ @data.columns.unshift selectable_column if @data.batch_actions.present? && @data.rows.present?
63
63
  @search = Search.new(**search) if search
64
64
  @sortable = Sortable.new(**sortable) if sortable
65
65
  end
@@ -1,22 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class SolidusAdmin::Users::Index::Component < SolidusAdmin::BaseComponent
4
- include SolidusAdmin::Layout::PageHelpers
3
+ class SolidusAdmin::Users::Index::Component < SolidusAdmin::UI::Pages::Index::Component
4
+ def model_class
5
+ Spree.user_class
6
+ end
5
7
 
6
- def initialize(page:)
7
- @page = page
8
+ def search_key
9
+ :email_cont
8
10
  end
9
11
 
10
- def title
11
- Spree.user_class.model_name.human.pluralize
12
+ def search_url
13
+ solidus_admin.users_path
12
14
  end
13
15
 
14
- def prev_page_path
15
- solidus_admin.url_for(**request.params, page: @page.number - 1, only_path: true) unless @page.first?
16
+ def row_url(user)
17
+ spree.admin_user_path(user)
16
18
  end
17
19
 
18
- def next_page_path
19
- solidus_admin.url_for(**request.params, page: @page.next_param, only_path: true) unless @page.last?
20
+ def page_actions
21
+ render component("ui/button").new(
22
+ tag: :a,
23
+ text: t('.add'),
24
+ href: spree.new_admin_user_path,
25
+ icon: "add-line",
26
+ )
20
27
  end
21
28
 
22
29
  def batch_actions
@@ -1,8 +1,5 @@
1
1
  en:
2
- promotion_image: 'Image'
3
- add: 'Add new'
4
2
  batch_actions:
5
- delete: 'Delete'
6
3
  discontinue: 'Discontinue'
7
4
  activate: 'Activate'
8
5
  filters:
@@ -1,22 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class SolidusAdmin::Zones::Index::Component < SolidusAdmin::BaseComponent
4
- include SolidusAdmin::Layout::PageHelpers
3
+ class SolidusAdmin::Zones::Index::Component < SolidusAdmin::UI::Pages::Index::Component
4
+ def model_class
5
+ Spree::Zone
6
+ end
5
7
 
6
- def initialize(page:)
7
- @page = page
8
+ def search_key
9
+ :name_or_description_cont
8
10
  end
9
11
 
10
- def title
11
- Spree::Zone.model_name.human.pluralize
12
+ def search_url
13
+ solidus_admin.zones_path
12
14
  end
13
15
 
14
- def prev_page_path
15
- solidus_admin.url_for(**request.params, page: @page.number - 1, only_path: true) unless @page.first?
16
+ def row_url(zone)
17
+ spree.edit_admin_zone_path(zone)
16
18
  end
17
19
 
18
- def next_page_path
19
- solidus_admin.url_for(**request.params, page: @page.next_param, only_path: true) unless @page.last?
20
+ def page_actions
21
+ render component("ui/button").new(
22
+ tag: :a,
23
+ text: t('.add'),
24
+ href: spree.new_admin_zone_path,
25
+ icon: "add-line",
26
+ class: "align-self-end w-full",
27
+ )
20
28
  end
21
29
 
22
30
  def batch_actions
@@ -4,8 +4,6 @@ module SolidusAdmin
4
4
  class PromotionCategoriesController < SolidusAdmin::BaseController
5
5
  include SolidusAdmin::ControllerHelpers::Search
6
6
 
7
- before_action :load_promotion_category, only: [:move]
8
-
9
7
  def index
10
8
  promotion_categories = apply_search_to(
11
9
  Spree::PromotionCategory.all,
@@ -27,12 +25,5 @@ module SolidusAdmin
27
25
  flash[:notice] = t('.success')
28
26
  redirect_back_or_to promotion_categories_path, status: :see_other
29
27
  end
30
-
31
- private
32
-
33
- def load_promotion_category
34
- @promotion_category = Spree::PromotionCategory.find(params[:id])
35
- authorize! action_name, @promotion_category
36
- end
37
28
  end
38
29
  end
@@ -23,7 +23,7 @@ module SolidusAdmin
23
23
  @properties = Spree::Property.where(id: params[:id])
24
24
 
25
25
  Spree::Property.transaction do
26
- @properties.discard_all
26
+ @properties.destroy_all
27
27
  end
28
28
 
29
29
  flash[:notice] = t('.success')
@@ -1,6 +1,8 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
+ <%= stylesheet_link_tag SolidusAdmin::Config.theme_path(session[:admin_light_theme]), media: '(prefers-color-scheme: light)', "data-turbo-track": "reload" %>
5
+ <%= stylesheet_link_tag SolidusAdmin::Config.theme_path(session[:admin_dark_theme]), media: '(prefers-color-scheme: dark)', "data-turbo-track": "reload" %>
4
6
  <%= javascript_importmap_tags "solidus_admin/application", shim: false, importmap: SolidusAdmin.importmap %>
5
7
  </head>
6
8
  <body class="p-3">
@@ -10,7 +10,7 @@ if Rails.env.development? || Rails.env.test?
10
10
  clear = "\e[0m"
11
11
 
12
12
  ActiveSupport::Notifications.subscribe("render.view_component") do |*args|
13
- next unless args.last[:name].starts_with?("SolidusAdmin::")
13
+ next unless args.last[:name]&.starts_with?("SolidusAdmin::")
14
14
 
15
15
  event = ActiveSupport::Notifications::Event.new(*args)
16
16
  SolidusAdmin::BaseComponent.logger.debug \
@@ -44,7 +44,9 @@ module SolidusAdmin
44
44
  # Setting this to `true` enables access to alpha stage features that might still be in testing or development.
45
45
  # Use with caution, as these features may not be fully stable or complete.
46
46
  # Default: false
47
- preference :enable_alpha_features?, :boolean, default: false
47
+ preference :enable_alpha_features, :boolean, default: false
48
+
49
+ alias enable_alpha_features? enable_alpha_features
48
50
 
49
51
  preference :storefront_product_path_proc, :proc, default: ->(_version) {
50
52
  ->(product) { "/products/#{product.slug}" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusAdmin
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-22 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: geared_pagination
@@ -137,9 +137,7 @@ files:
137
137
  - app/assets/stylesheets/solidus_admin/application.tailwind.css
138
138
  - app/assets/stylesheets/solidus_admin/dark.css
139
139
  - app/assets/stylesheets/solidus_admin/dimmed.css
140
- - app/components/solidus_admin/adjustment_reasons/index/component.html.erb
141
140
  - app/components/solidus_admin/adjustment_reasons/index/component.rb
142
- - app/components/solidus_admin/adjustment_reasons/index/component.yml
143
141
  - app/components/solidus_admin/base_component.rb
144
142
  - app/components/solidus_admin/layout/feedback/component.html.erb
145
143
  - app/components/solidus_admin/layout/feedback/component.rb
@@ -157,16 +155,13 @@ files:
157
155
  - app/components/solidus_admin/layout/page_helpers.rb
158
156
  - app/components/solidus_admin/layout/skip_link/component.rb
159
157
  - app/components/solidus_admin/layout/skip_link/component.yml
160
- - app/components/solidus_admin/option_types/index/component.html.erb
161
158
  - app/components/solidus_admin/option_types/index/component.rb
162
- - app/components/solidus_admin/option_types/index/component.yml
163
159
  - app/components/solidus_admin/orders/cart/component.html.erb
164
160
  - app/components/solidus_admin/orders/cart/component.js
165
161
  - app/components/solidus_admin/orders/cart/component.rb
166
162
  - app/components/solidus_admin/orders/cart/component.yml
167
163
  - app/components/solidus_admin/orders/cart/result/component.html.erb
168
164
  - app/components/solidus_admin/orders/cart/result/component.rb
169
- - app/components/solidus_admin/orders/index/component.html.erb
170
165
  - app/components/solidus_admin/orders/index/component.rb
171
166
  - app/components/solidus_admin/orders/index/component.yml
172
167
  - app/components/solidus_admin/orders/show/address/component.html.erb
@@ -189,10 +184,8 @@ files:
189
184
  - app/components/solidus_admin/orders/show/summary/component.html.erb
190
185
  - app/components/solidus_admin/orders/show/summary/component.rb
191
186
  - app/components/solidus_admin/orders/show/summary/component.yml
192
- - app/components/solidus_admin/payment_methods/index/component.html.erb
193
187
  - app/components/solidus_admin/payment_methods/index/component.rb
194
188
  - app/components/solidus_admin/payment_methods/index/component.yml
195
- - app/components/solidus_admin/products/index/component.html.erb
196
189
  - app/components/solidus_admin/products/index/component.rb
197
190
  - app/components/solidus_admin/products/index/component.yml
198
191
  - app/components/solidus_admin/products/show/component.html.erb
@@ -203,64 +196,34 @@ files:
203
196
  - app/components/solidus_admin/products/status/component.yml
204
197
  - app/components/solidus_admin/products/stock/component.rb
205
198
  - app/components/solidus_admin/products/stock/component.yml
206
- - app/components/solidus_admin/promotion_categories/index/component.html.erb
207
199
  - app/components/solidus_admin/promotion_categories/index/component.rb
208
- - app/components/solidus_admin/promotion_categories/index/component.yml
209
- - app/components/solidus_admin/promotions/index/component.html.erb
210
200
  - app/components/solidus_admin/promotions/index/component.rb
211
201
  - app/components/solidus_admin/promotions/index/component.yml
212
- - app/components/solidus_admin/properties/index/component.html.erb
213
202
  - app/components/solidus_admin/properties/index/component.rb
214
- - app/components/solidus_admin/properties/index/component.yml
215
- - app/components/solidus_admin/refund_reasons/index/component.html.erb
216
203
  - app/components/solidus_admin/refund_reasons/index/component.rb
217
- - app/components/solidus_admin/refund_reasons/index/component.yml
218
- - app/components/solidus_admin/refunds_and_returns/component.html.erb
219
204
  - app/components/solidus_admin/refunds_and_returns/component.rb
220
205
  - app/components/solidus_admin/refunds_and_returns/component.yml
221
- - app/components/solidus_admin/reimbursement_types/index/component.html.erb
222
206
  - app/components/solidus_admin/reimbursement_types/index/component.rb
223
- - app/components/solidus_admin/reimbursement_types/index/component.yml
224
- - app/components/solidus_admin/return_reasons/index/component.html.erb
225
207
  - app/components/solidus_admin/return_reasons/index/component.rb
226
- - app/components/solidus_admin/return_reasons/index/component.yml
227
- - app/components/solidus_admin/shipping/component.html.erb
228
208
  - app/components/solidus_admin/shipping/component.rb
229
209
  - app/components/solidus_admin/shipping/component.yml
230
- - app/components/solidus_admin/shipping_categories/index/component.html.erb
231
210
  - app/components/solidus_admin/shipping_categories/index/component.rb
232
- - app/components/solidus_admin/shipping_categories/index/component.yml
233
- - app/components/solidus_admin/shipping_methods/index/component.html.erb
234
211
  - app/components/solidus_admin/shipping_methods/index/component.rb
235
- - app/components/solidus_admin/shipping_methods/index/component.yml
236
212
  - app/components/solidus_admin/stock_items/edit/component.html.erb
237
213
  - app/components/solidus_admin/stock_items/edit/component.js
238
214
  - app/components/solidus_admin/stock_items/edit/component.rb
239
215
  - app/components/solidus_admin/stock_items/edit/component.yml
240
- - app/components/solidus_admin/stock_items/index/component.html.erb
241
216
  - app/components/solidus_admin/stock_items/index/component.rb
242
217
  - app/components/solidus_admin/stock_items/index/component.yml
243
- - app/components/solidus_admin/stock_locations/index/component.html.erb
244
218
  - app/components/solidus_admin/stock_locations/index/component.rb
245
219
  - app/components/solidus_admin/stock_locations/index/component.yml
246
- - app/components/solidus_admin/store_credit_reasons/index/component.html.erb
247
220
  - app/components/solidus_admin/store_credit_reasons/index/component.rb
248
- - app/components/solidus_admin/store_credit_reasons/index/component.yml
249
- - app/components/solidus_admin/stores/index/component.html.erb
250
221
  - app/components/solidus_admin/stores/index/component.rb
251
- - app/components/solidus_admin/stores/index/component.yml
252
- - app/components/solidus_admin/tax_categories/index/component.html.erb
253
222
  - app/components/solidus_admin/tax_categories/index/component.rb
254
- - app/components/solidus_admin/tax_categories/index/component.yml
255
- - app/components/solidus_admin/tax_rates/index/component.html.erb
256
223
  - app/components/solidus_admin/tax_rates/index/component.rb
257
- - app/components/solidus_admin/tax_rates/index/component.yml
258
- - app/components/solidus_admin/taxes/component.html.erb
259
224
  - app/components/solidus_admin/taxes/component.rb
260
225
  - app/components/solidus_admin/taxes/component.yml
261
- - app/components/solidus_admin/taxonomies/index/component.html.erb
262
226
  - app/components/solidus_admin/taxonomies/index/component.rb
263
- - app/components/solidus_admin/taxonomies/index/component.yml
264
227
  - app/components/solidus_admin/ui/badge/component.rb
265
228
  - app/components/solidus_admin/ui/badge/component.yml
266
229
  - app/components/solidus_admin/ui/button/component.rb
@@ -295,6 +258,9 @@ files:
295
258
  - app/components/solidus_admin/ui/modal/component.html.erb
296
259
  - app/components/solidus_admin/ui/modal/component.rb
297
260
  - app/components/solidus_admin/ui/modal/component.yml
261
+ - app/components/solidus_admin/ui/pages/index/component.html.erb
262
+ - app/components/solidus_admin/ui/pages/index/component.rb
263
+ - app/components/solidus_admin/ui/pages/index/component.yml
298
264
  - app/components/solidus_admin/ui/panel/component.html.erb
299
265
  - app/components/solidus_admin/ui/panel/component.rb
300
266
  - app/components/solidus_admin/ui/panel/component.yml
@@ -322,12 +288,9 @@ files:
322
288
  - app/components/solidus_admin/ui/toggletip/component.js
323
289
  - app/components/solidus_admin/ui/toggletip/component.rb
324
290
  - app/components/solidus_admin/ui/toggletip/component.yml
325
- - app/components/solidus_admin/users/index/component.html.erb
326
291
  - app/components/solidus_admin/users/index/component.rb
327
292
  - app/components/solidus_admin/users/index/component.yml
328
- - app/components/solidus_admin/zones/index/component.html.erb
329
293
  - app/components/solidus_admin/zones/index/component.rb
330
- - app/components/solidus_admin/zones/index/component.yml
331
294
  - app/controllers/solidus_admin/accounts_controller.rb
332
295
  - app/controllers/solidus_admin/addresses_controller.rb
333
296
  - app/controllers/solidus_admin/adjustment_reasons_controller.rb
@@ -454,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
454
417
  - !ruby/object:Gem::Version
455
418
  version: 1.8.23
456
419
  requirements: []
457
- rubygems_version: 3.4.10
420
+ rubygems_version: 3.5.3
458
421
  signing_key:
459
422
  specification_version: 4
460
423
  summary: Admin interface for the Solidus e-commerce framework.
@@ -1,32 +0,0 @@
1
- <%= render component('refunds_and_returns').new(current_class: Spree::AdjustmentReason) do |layout| %>
2
- <% layout.with_actions do %>
3
- <%= render component("ui/button").new(
4
- tag: :a,
5
- text: t('.add'),
6
- href: spree.new_admin_adjustment_reason_path,
7
- icon: "add-line",
8
- class: "align-self-end w-full",
9
- ) %>
10
- <% end %>
11
-
12
- <%= render component('ui/table').new(
13
- id: stimulus_id,
14
- data: {
15
- class: Spree::AdjustmentReason,
16
- rows: @page.records,
17
- url: ->(adjustment_reason) { spree.edit_admin_adjustment_reason_path(adjustment_reason) },
18
- prev: prev_page_path,
19
- next: next_page_path,
20
- columns: columns,
21
- batch_actions: batch_actions,
22
- },
23
- search: {
24
- name: :q,
25
- value: params[:q],
26
- url: solidus_admin.adjustment_reasons_path,
27
- searchbar_key: :name_or_code_cont,
28
- scopes: scopes,
29
- filters: filters,
30
- },
31
- ) %>
32
- <% end %>
@@ -1,4 +0,0 @@
1
- en:
2
- add: 'Add new'
3
- batch_actions:
4
- delete: 'Delete'
@@ -1,30 +0,0 @@
1
- <%= page do %>
2
- <%= page_header do %>
3
- <%= page_header_title title %>
4
- <%= page_header_actions do %>
5
- <%= render component("ui/button").new(
6
- tag: :a,
7
- text: t('.add'),
8
- href: spree.new_admin_option_type_path,
9
- icon: "add-line",
10
- ) %>
11
- <% end %>
12
- <% end %>
13
-
14
- <%= render component('ui/table').new(
15
- id: stimulus_id,
16
- data: {
17
- class: Spree::OptionType,
18
- rows: @page.records,
19
- url: ->(option_type) { spree.edit_admin_option_type_path(option_type) },
20
- prev: prev_page_path,
21
- next: next_page_path,
22
- columns: columns,
23
- batch_actions: batch_actions,
24
- },
25
- sortable: {
26
- url: ->(option_type) { solidus_admin.move_option_type_path(option_type) },
27
- param: 'position',
28
- },
29
- ) %>
30
- <% end %>
@@ -1,35 +0,0 @@
1
- <%= page do %>
2
- <%= page_header do %>
3
- <%= page_header_title title %>
4
- <%= page_header_actions do %>
5
- <%= render component("ui/button").new(
6
- tag: :a,
7
- text: t('.create_order'),
8
- href: spree.new_admin_order_path,
9
- icon: "add-line",
10
- ) %>
11
- <% end %>
12
- <% end %>
13
-
14
- <%= render component('ui/table').new(
15
- id: stimulus_id,
16
- data: {
17
- class: Spree::Order,
18
- rows: @page.records,
19
- fade: row_fade,
20
- url: ->(order) { spree.edit_admin_order_path(order) },
21
- batch_actions: batch_actions,
22
- columns: columns,
23
- prev: prev_page_path,
24
- next: next_page_path,
25
- },
26
- search: {
27
- name: :q,
28
- value: params[:q],
29
- searchbar_key: :number_or_shipments_number_or_bill_address_name_or_email_cont,
30
- url: solidus_admin.orders_path(scope: params[:scope]),
31
- scopes: scopes,
32
- filters: filters,
33
- },
34
- ) %>
35
- <% end %>
@@ -1,38 +0,0 @@
1
- <%= page do %>
2
- <%= page_header do %>
3
- <%= page_header_title title %>
4
- <%= page_header_actions do %>
5
- <%= render component("ui/button").new(
6
- tag: :a,
7
- text: t('.add'),
8
- href: spree.new_admin_payment_method_path,
9
- icon: "add-line",
10
- ) %>
11
- <% end %>
12
- <% end %>
13
-
14
- <%= render component('ui/table').new(
15
- id: stimulus_id,
16
- data: {
17
- class: Spree::PaymentMethod,
18
- rows: @page.records,
19
- prev: prev_page_path,
20
- next: next_page_path,
21
- url: ->(payment_method) { spree.edit_admin_payment_method_path(payment_method) },
22
- columns: columns,
23
- batch_actions: batch_actions,
24
- },
25
- search: {
26
- name: :q,
27
- value: params[:q],
28
- url: solidus_admin.payment_methods_path,
29
- searchbar_key: :name_or_description_cont,
30
- scopes: scopes,
31
- filters: filters,
32
- },
33
- sortable: {
34
- url: ->(payment_method) { solidus_admin.move_payment_method_path(payment_method) },
35
- param: 'position',
36
- },
37
- ) %>
38
- <% end %>
@@ -1,34 +0,0 @@
1
- <%= page do %>
2
- <%= page_header do %>
3
- <%= page_header_title title %>
4
- <%= page_header_actions do %>
5
- <%= render component("ui/button").new(
6
- tag: :a,
7
- text: t('.add'),
8
- href: spree.new_admin_product_path,
9
- icon: "add-line",
10
- ) %>
11
- <% end %>
12
- <% end %>
13
-
14
- <%= render component('ui/table').new(
15
- id: stimulus_id,
16
- data: {
17
- class: Spree::Product,
18
- rows: @page.records,
19
- url: ->(product) { solidus_admin.product_path(product) },
20
- prev: prev_page_path,
21
- next: next_page_path,
22
- columns: columns,
23
- batch_actions: batch_actions,
24
- },
25
- search: {
26
- name: :q,
27
- value: params[:q],
28
- url: solidus_admin.products_path,
29
- searchbar_key: :name_or_variants_including_master_sku_cont,
30
- scopes: scopes,
31
- filters: filters,
32
- },
33
- ) %>
34
- <% end %>
@@ -1,26 +0,0 @@
1
- <%= page do %>
2
- <%= page_header do %>
3
- <%= page_header_title title %>
4
- <%= page_header_actions do %>
5
- <%= render component("ui/button").new(
6
- tag: :a,
7
- text: t('.add'),
8
- href: spree.new_admin_promotion_category_path,
9
- icon: "add-line",
10
- ) %>
11
- <% end %>
12
- <% end %>
13
-
14
- <%= render component('ui/table').new(
15
- id: stimulus_id,
16
- data: {
17
- class: Spree::PromotionCategory,
18
- rows: @page.records,
19
- url: ->(promotion_category) { spree.edit_admin_promotion_category_path(promotion_category) },
20
- prev: prev_page_path,
21
- next: next_page_path,
22
- columns: columns,
23
- batch_actions: batch_actions,
24
- },
25
- ) %>
26
- <% end %>