solidus_admin 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc.json +7 -0
- data/README.md +1 -1
- data/Rakefile +26 -0
- data/app/assets/builds/.keep +0 -0
- data/app/assets/builds/solidus_admin/tailwind.css +2799 -0
- data/app/assets/config/solidus_admin_manifest.js +1 -0
- data/app/assets/stylesheets/solidus_admin/application.tailwind.css +4 -0
- data/app/assets/stylesheets/solidus_admin/dark.css +12 -0
- data/app/assets/stylesheets/solidus_admin/dimmed.css +11 -0
- data/app/components/solidus_admin/adjustment_reasons/index/component.html.erb +32 -0
- data/app/components/solidus_admin/adjustment_reasons/index/component.rb +53 -0
- data/app/components/solidus_admin/adjustment_reasons/index/component.yml +4 -0
- data/app/components/solidus_admin/layout/feedback/component.html.erb +15 -0
- data/app/components/solidus_admin/layout/feedback/component.rb +4 -0
- data/app/components/solidus_admin/layout/feedback/component.yml +3 -0
- data/app/components/solidus_admin/layout/navigation/account/component.html.erb +74 -0
- data/app/components/solidus_admin/layout/navigation/account/component.js +16 -0
- data/app/components/solidus_admin/layout/navigation/account/component.rb +36 -0
- data/app/components/solidus_admin/{sidebar → layout/navigation}/component.html.erb +9 -9
- data/app/components/solidus_admin/layout/navigation/component.rb +26 -0
- data/app/components/solidus_admin/{sidebar → layout/navigation}/item/component.html.erb +5 -5
- data/app/components/solidus_admin/{sidebar → layout/navigation}/item/component.rb +2 -2
- data/app/components/solidus_admin/layout/page_helpers.rb +55 -0
- data/app/components/solidus_admin/{skip_link → layout/skip_link}/component.rb +2 -4
- data/app/components/solidus_admin/option_types/index/component.html.erb +30 -0
- data/app/components/solidus_admin/option_types/index/component.rb +57 -0
- data/app/components/solidus_admin/option_types/index/component.yml +4 -0
- data/app/components/solidus_admin/orders/cart/component.html.erb +77 -0
- data/app/components/solidus_admin/orders/cart/component.js +37 -0
- data/app/components/solidus_admin/orders/cart/component.rb +7 -0
- data/app/components/solidus_admin/orders/cart/component.yml +3 -0
- data/app/components/solidus_admin/orders/cart/result/component.html.erb +26 -0
- data/app/components/solidus_admin/orders/cart/result/component.rb +11 -0
- data/app/components/solidus_admin/orders/index/component.html.erb +26 -22
- data/app/components/solidus_admin/orders/index/component.rb +80 -16
- data/app/components/solidus_admin/orders/index/component.yml +10 -3
- data/app/components/solidus_admin/orders/show/address/component.html.erb +67 -0
- data/app/components/solidus_admin/orders/show/address/component.js +9 -0
- data/app/components/solidus_admin/orders/show/address/component.rb +53 -0
- data/app/components/solidus_admin/orders/show/address/component.yml +14 -0
- data/app/components/solidus_admin/orders/show/component.html.erb +76 -0
- data/app/components/solidus_admin/orders/show/component.js +7 -0
- data/app/components/solidus_admin/orders/show/component.rb +40 -0
- data/app/components/solidus_admin/orders/show/component.yml +21 -0
- data/app/components/solidus_admin/orders/show/customer_search/component.html.erb +14 -0
- data/app/components/solidus_admin/orders/show/customer_search/component.js +14 -0
- data/app/components/solidus_admin/orders/show/customer_search/component.rb +7 -0
- data/app/components/solidus_admin/orders/show/customer_search/component.yml +2 -0
- data/app/components/solidus_admin/orders/show/customer_search/result/component.html.erb +17 -0
- data/app/components/solidus_admin/orders/show/customer_search/result/component.rb +11 -0
- data/app/components/solidus_admin/orders/show/email/component.html.erb +18 -0
- data/app/components/solidus_admin/orders/show/email/component.rb +15 -0
- data/app/components/solidus_admin/orders/show/email/component.yml +8 -0
- data/app/components/solidus_admin/orders/show/summary/component.html.erb +14 -0
- data/app/components/solidus_admin/orders/show/summary/component.rb +7 -0
- data/app/components/solidus_admin/orders/show/summary/component.yml +8 -0
- data/app/components/solidus_admin/payment_methods/index/component.html.erb +38 -0
- data/app/components/solidus_admin/payment_methods/index/component.rb +93 -0
- data/app/components/solidus_admin/payment_methods/index/component.yml +15 -0
- data/app/components/solidus_admin/products/index/component.html.erb +26 -22
- data/app/components/solidus_admin/products/index/component.rb +36 -36
- data/app/components/solidus_admin/products/index/component.yml +9 -6
- data/app/components/solidus_admin/products/show/component.html.erb +32 -38
- data/app/components/solidus_admin/products/show/component.rb +2 -0
- data/app/components/solidus_admin/products/show/component.yml +5 -5
- data/app/components/solidus_admin/products/status/component.rb +20 -18
- data/app/components/solidus_admin/products/status/component.yml +1 -0
- data/app/components/solidus_admin/products/stock/component.rb +38 -0
- data/app/components/solidus_admin/products/stock/component.yml +5 -0
- data/app/components/solidus_admin/promotion_categories/index/component.html.erb +26 -0
- data/app/components/solidus_admin/promotion_categories/index/component.rb +57 -0
- data/app/components/solidus_admin/promotion_categories/index/component.yml +4 -0
- data/app/components/solidus_admin/promotions/index/component.html.erb +34 -0
- data/app/components/solidus_admin/promotions/index/component.rb +97 -0
- data/app/components/solidus_admin/promotions/index/component.yml +14 -0
- data/app/components/solidus_admin/properties/index/component.html.erb +34 -0
- data/app/components/solidus_admin/properties/index/component.rb +65 -0
- data/app/components/solidus_admin/properties/index/component.yml +4 -0
- data/app/components/solidus_admin/refund_reasons/index/component.html.erb +31 -0
- data/app/components/solidus_admin/refund_reasons/index/component.rb +53 -0
- data/app/components/solidus_admin/refund_reasons/index/component.yml +4 -0
- data/app/components/solidus_admin/refunds_and_returns/component.html.erb +26 -0
- data/app/components/solidus_admin/refunds_and_returns/component.rb +20 -0
- data/app/components/solidus_admin/refunds_and_returns/component.yml +3 -0
- data/app/components/solidus_admin/reimbursement_types/index/component.html.erb +22 -0
- data/app/components/solidus_admin/reimbursement_types/index/component.rb +45 -0
- data/app/components/solidus_admin/reimbursement_types/index/component.yml +4 -0
- data/app/components/solidus_admin/return_reasons/index/component.html.erb +31 -0
- data/app/components/solidus_admin/return_reasons/index/component.rb +52 -0
- data/app/components/solidus_admin/return_reasons/index/component.yml +4 -0
- data/app/components/solidus_admin/shipping/component.html.erb +30 -0
- data/app/components/solidus_admin/shipping/component.rb +18 -0
- data/app/components/solidus_admin/shipping/component.yml +3 -0
- data/app/components/solidus_admin/shipping_categories/index/component.html.erb +32 -0
- data/app/components/solidus_admin/shipping_categories/index/component.rb +46 -0
- data/app/components/solidus_admin/shipping_categories/index/component.yml +4 -0
- data/app/components/solidus_admin/shipping_methods/index/component.html.erb +32 -0
- data/app/components/solidus_admin/shipping_methods/index/component.rb +61 -0
- data/app/components/solidus_admin/shipping_methods/index/component.yml +4 -0
- data/app/components/solidus_admin/stock_items/edit/component.html.erb +89 -0
- data/app/components/solidus_admin/stock_items/edit/component.js +17 -0
- data/app/components/solidus_admin/stock_items/edit/component.rb +23 -0
- data/app/components/solidus_admin/stock_items/edit/component.yml +10 -0
- data/app/components/solidus_admin/stock_items/index/component.html.erb +26 -0
- data/app/components/solidus_admin/stock_items/index/component.rb +180 -0
- data/app/components/solidus_admin/stock_items/index/component.yml +10 -0
- data/app/components/solidus_admin/stock_locations/index/component.html.erb +32 -0
- data/app/components/solidus_admin/stock_locations/index/component.rb +81 -0
- data/app/components/solidus_admin/stock_locations/index/component.yml +6 -0
- data/app/components/solidus_admin/store_credit_reasons/index/component.html.erb +31 -0
- data/app/components/solidus_admin/store_credit_reasons/index/component.rb +52 -0
- data/app/components/solidus_admin/store_credit_reasons/index/component.yml +4 -0
- data/app/components/solidus_admin/stores/index/component.html.erb +34 -0
- data/app/components/solidus_admin/stores/index/component.rb +59 -0
- data/app/components/solidus_admin/stores/index/component.yml +4 -0
- data/app/components/solidus_admin/tax_categories/index/component.html.erb +32 -0
- data/app/components/solidus_admin/tax_categories/index/component.rb +58 -0
- data/app/components/solidus_admin/tax_categories/index/component.yml +6 -0
- data/app/components/solidus_admin/tax_rates/index/component.html.erb +32 -0
- data/app/components/solidus_admin/tax_rates/index/component.rb +84 -0
- data/app/components/solidus_admin/tax_rates/index/component.yml +4 -0
- data/app/components/solidus_admin/taxes/component.html.erb +24 -0
- data/app/components/solidus_admin/taxes/component.rb +25 -0
- data/app/components/solidus_admin/taxes/component.yml +3 -0
- data/app/components/solidus_admin/taxonomies/index/component.html.erb +28 -0
- data/app/components/solidus_admin/taxonomies/index/component.rb +47 -0
- data/app/components/solidus_admin/taxonomies/index/component.yml +4 -0
- data/app/components/solidus_admin/ui/badge/component.rb +18 -8
- data/app/components/solidus_admin/ui/badge/component.yml +3 -0
- data/app/components/solidus_admin/ui/button/component.rb +32 -32
- data/app/components/solidus_admin/ui/details_list/component.html.erb +10 -0
- data/app/components/solidus_admin/ui/details_list/component.rb +7 -0
- data/app/components/solidus_admin/ui/dropdown/component.html.erb +50 -0
- data/app/components/solidus_admin/ui/dropdown/component.js +16 -0
- data/app/components/solidus_admin/ui/dropdown/component.rb +28 -0
- data/app/components/solidus_admin/ui/dropdown/component.yml +2 -0
- data/app/components/solidus_admin/ui/forms/address/component.html.erb +36 -0
- data/app/components/solidus_admin/ui/forms/address/component.js +34 -0
- data/app/components/solidus_admin/ui/forms/address/component.rb +14 -0
- data/app/components/solidus_admin/ui/forms/field/component.html.erb +5 -4
- data/app/components/solidus_admin/ui/forms/field/component.rb +53 -15
- data/app/components/solidus_admin/ui/forms/input/component.rb +11 -5
- data/app/components/solidus_admin/ui/forms/search/component.html.erb +52 -0
- data/app/components/solidus_admin/ui/forms/search/component.js +116 -0
- data/app/components/solidus_admin/ui/forms/search/component.rb +8 -0
- data/app/components/solidus_admin/ui/forms/search/component.yml +4 -0
- data/app/components/solidus_admin/ui/forms/search/result/component.rb +12 -0
- data/app/components/solidus_admin/ui/forms/search_field/component.html.erb +20 -0
- data/app/{javascript/solidus_admin/controllers/hello_controller.js → components/solidus_admin/ui/forms/search_field/component.js} +4 -2
- data/app/components/solidus_admin/ui/forms/search_field/component.rb +10 -0
- data/app/components/solidus_admin/ui/forms/search_field/component.yml +2 -0
- data/app/components/solidus_admin/ui/forms/switch/component.rb +27 -31
- data/app/components/solidus_admin/ui/forms/switch_field/component.html.erb +20 -0
- data/app/components/solidus_admin/ui/forms/switch_field/component.rb +11 -0
- data/app/components/solidus_admin/ui/icon/component.rb +4 -0
- data/app/components/solidus_admin/ui/modal/component.html.erb +37 -0
- data/app/components/solidus_admin/ui/modal/component.rb +12 -0
- data/app/components/solidus_admin/ui/modal/component.yml +2 -0
- data/app/components/solidus_admin/ui/panel/component.html.erb +26 -12
- data/app/components/solidus_admin/ui/panel/component.rb +17 -0
- data/app/components/solidus_admin/ui/panel/component.yml +1 -3
- data/app/components/solidus_admin/ui/resource_item/component.html.erb +10 -0
- data/app/components/solidus_admin/ui/resource_item/component.rb +9 -0
- data/app/components/solidus_admin/ui/tab/component.rb +9 -8
- data/app/components/solidus_admin/ui/table/component.html.erb +146 -135
- data/app/components/solidus_admin/ui/table/component.js +56 -17
- data/app/components/solidus_admin/ui/table/component.rb +94 -70
- data/app/components/solidus_admin/ui/table/component.yml +0 -1
- data/app/components/solidus_admin/ui/table/ransack_filter/component.html.erb +72 -0
- data/app/components/solidus_admin/ui/table/ransack_filter/component.js +73 -0
- data/app/components/solidus_admin/ui/table/ransack_filter/component.rb +68 -0
- data/app/components/solidus_admin/ui/table/ransack_filter/component.yml +3 -0
- data/app/components/solidus_admin/ui/table/toolbar/component.rb +21 -0
- data/app/components/solidus_admin/ui/thumbnail/component.rb +46 -0
- data/app/components/solidus_admin/ui/toast/component.html.erb +9 -5
- data/app/components/solidus_admin/ui/toast/component.js +9 -6
- data/app/components/solidus_admin/ui/toast/component.rb +2 -2
- data/app/components/solidus_admin/ui/toggletip/component.html.erb +14 -10
- data/app/components/solidus_admin/ui/toggletip/component.js +22 -4
- data/app/components/solidus_admin/ui/toggletip/component.rb +8 -85
- data/app/components/solidus_admin/users/index/component.html.erb +34 -0
- data/app/components/solidus_admin/users/index/component.rb +89 -0
- data/app/components/solidus_admin/users/index/component.yml +18 -0
- data/app/components/solidus_admin/zones/index/component.html.erb +35 -0
- data/app/components/solidus_admin/zones/index/component.rb +55 -0
- data/app/components/solidus_admin/zones/index/component.yml +4 -0
- data/app/controllers/solidus_admin/addresses_controller.rb +92 -0
- data/app/controllers/solidus_admin/adjustment_reasons_controller.rb +40 -0
- data/app/controllers/solidus_admin/base_controller.rb +1 -0
- data/app/controllers/solidus_admin/controller_helpers/authorization.rb +5 -1
- data/app/controllers/solidus_admin/controller_helpers/locale.rb +2 -2
- data/app/controllers/solidus_admin/controller_helpers/search.rb +48 -0
- data/app/controllers/solidus_admin/controller_helpers/theme.rb +30 -0
- data/app/controllers/solidus_admin/countries_controller.rb +12 -0
- data/app/controllers/solidus_admin/customers_controller.rb +29 -0
- data/app/controllers/solidus_admin/line_items_controller.rb +45 -0
- data/app/controllers/solidus_admin/option_types_controller.rb +46 -0
- data/app/controllers/solidus_admin/orders_controller.rb +104 -7
- data/app/controllers/solidus_admin/payment_methods_controller.rb +52 -0
- data/app/controllers/solidus_admin/products_controller.rb +26 -17
- data/app/controllers/solidus_admin/promotion_categories_controller.rb +38 -0
- data/app/controllers/solidus_admin/promotions_controller.rb +46 -0
- data/app/controllers/solidus_admin/properties_controller.rb +33 -0
- data/app/controllers/solidus_admin/refund_reasons_controller.rb +40 -0
- data/app/controllers/solidus_admin/reimbursement_types_controller.rb +31 -0
- data/app/controllers/solidus_admin/return_reasons_controller.rb +40 -0
- data/app/controllers/solidus_admin/shipping_categories_controller.rb +40 -0
- data/app/controllers/solidus_admin/shipping_methods_controller.rb +40 -0
- data/app/controllers/solidus_admin/stock_items_controller.rb +67 -0
- data/app/controllers/solidus_admin/stock_locations_controller.rb +40 -0
- data/app/controllers/solidus_admin/store_credit_reasons_controller.rb +40 -0
- data/app/controllers/solidus_admin/stores_controller.rb +40 -0
- data/app/controllers/solidus_admin/tax_categories_controller.rb +40 -0
- data/app/controllers/solidus_admin/tax_rates_controller.rb +40 -0
- data/app/controllers/solidus_admin/taxonomies_controller.rb +46 -0
- data/app/controllers/solidus_admin/users_controller.rb +50 -0
- data/app/controllers/solidus_admin/zones_controller.rb +40 -0
- data/app/javascript/solidus_admin/controllers/components.js +3 -1
- data/app/javascript/solidus_admin/controllers/confirm_controller.js +21 -0
- data/app/javascript/solidus_admin/controllers/details_click_outside_controller.js +12 -0
- data/app/javascript/solidus_admin/controllers/readonly_when_submitting_controller.js +17 -0
- data/app/javascript/solidus_admin/controllers/sortable_controller.js +33 -0
- data/app/views/layouts/solidus_admin/application.html.erb +16 -10
- data/app/views/layouts/solidus_admin/preview.html.erb +0 -1
- data/app/views/solidus_admin/base/unauthorized.html.erb +4 -0
- data/config/importmap.rb +2 -0
- data/config/initializers/view_component.rb +20 -0
- data/config/locales/adjustment_reasons.en.yml +6 -0
- data/config/locales/customers.en.yml +7 -0
- data/config/locales/errors.en.yml +7 -0
- data/config/locales/line_items.en.yml +9 -0
- data/config/locales/{main_nav.en.yml → menu_item.en.yml} +8 -2
- data/config/locales/option_types.en.yml +6 -0
- data/config/locales/orders.en.yml +9 -0
- data/config/locales/payment_methods.en.yml +6 -0
- data/config/locales/promotion_categories.en.yml +6 -0
- data/config/locales/promotions.en.yml +6 -0
- data/config/locales/properties.en.yml +6 -0
- data/config/locales/refund_reasons_.en.yml +6 -0
- data/config/locales/reimbursement_types.en.yml +4 -0
- data/config/locales/return_reasons.en.yml +6 -0
- data/config/locales/shipping_categories.en.yml +6 -0
- data/config/locales/shipping_methods.en.yml +6 -0
- data/config/locales/stock_items.en.yml +4 -0
- data/config/locales/stock_locations.en.yml +6 -0
- data/config/locales/store_credit_reasons.en.yml +6 -0
- data/config/locales/stores.en.yml +6 -0
- data/config/locales/tax_categories.en.yml +6 -0
- data/config/locales/tax_rates.en.yml +6 -0
- data/config/locales/taxonomies.en.yml +6 -0
- data/config/locales/users.en.yml +6 -0
- data/config/locales/zones.en.yml +6 -0
- data/config/routes.rb +50 -3
- data/config/tailwind.config.js +119 -0
- data/docs/{customizing_main_navigation.md → customizing_menu_items.md} +2 -2
- data/docs/customizing_tailwindcss.md +57 -0
- data/docs/customizing_view_components.md +17 -38
- data/lib/generators/solidus_admin/install/install_generator.rb +13 -4
- data/lib/generators/solidus_admin/install/templates/config/initializers/{solidus_admin.rb → solidus_admin.rb.tt} +10 -14
- data/lib/solidus_admin/admin_resources.rb +23 -0
- data/lib/solidus_admin/configuration.rb +93 -67
- data/lib/solidus_admin/install_tailwindcss.rb +102 -0
- data/lib/solidus_admin/{main_nav_item.rb → menu_item.rb} +2 -2
- data/lib/solidus_admin/version.rb +1 -1
- data/lib/solidus_admin.rb +1 -2
- data/lib/tasks/tailwind.rake +10 -0
- data/solidus_admin.gemspec +3 -4
- metadata +228 -48
- data/app/assets/stylesheets/solidus_admin/application.tailwind.css.erb +0 -35
- data/app/components/solidus_admin/feedback/component.html.erb +0 -11
- data/app/components/solidus_admin/feedback/component.rb +0 -4
- data/app/components/solidus_admin/feedback/component.yml +0 -5
- data/app/components/solidus_admin/sidebar/account_nav/component.html.erb +0 -67
- data/app/components/solidus_admin/sidebar/account_nav/component.rb +0 -15
- data/app/components/solidus_admin/sidebar/component.rb +0 -21
- data/app/components/solidus_admin/ui/panel/component.js +0 -14
- data/config/solidus_admin/tailwind.config.js.erb +0 -95
- data/docs/customizing_tailwind.md +0 -78
- data/lib/solidus_admin/tailwindcss.rb +0 -58
- data/lib/tasks/tailwindcss.rake +0 -55
- /data/app/components/solidus_admin/{sidebar/account_nav → layout/navigation/account}/component.yml +0 -0
- /data/app/components/solidus_admin/{sidebar → layout/navigation}/component.js +0 -0
- /data/app/components/solidus_admin/{sidebar → layout/navigation}/component.yml +0 -0
- /data/app/components/solidus_admin/{skip_link → layout/skip_link}/component.yml +0 -0
@@ -0,0 +1,32 @@
|
|
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 %>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class SolidusAdmin::AdjustmentReasons::Index::Component < SolidusAdmin::BaseComponent
|
4
|
+
include SolidusAdmin::Layout::PageHelpers
|
5
|
+
|
6
|
+
def initialize(page:)
|
7
|
+
@page = page
|
8
|
+
end
|
9
|
+
|
10
|
+
def title
|
11
|
+
Spree::AdjustmentReason.model_name.human.pluralize
|
12
|
+
end
|
13
|
+
|
14
|
+
def prev_page_path
|
15
|
+
solidus_admin.url_for(**request.params, page: @page.number - 1, only_path: true) unless @page.first?
|
16
|
+
end
|
17
|
+
|
18
|
+
def next_page_path
|
19
|
+
solidus_admin.url_for(**request.params, page: @page.next_param, only_path: true) unless @page.last?
|
20
|
+
end
|
21
|
+
|
22
|
+
def batch_actions
|
23
|
+
[
|
24
|
+
{
|
25
|
+
display_name: t('.batch_actions.delete'),
|
26
|
+
action: solidus_admin.adjustment_reasons_path,
|
27
|
+
method: :delete,
|
28
|
+
icon: 'delete-bin-7-line',
|
29
|
+
},
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
33
|
+
def scopes
|
34
|
+
[]
|
35
|
+
end
|
36
|
+
|
37
|
+
def filters
|
38
|
+
[]
|
39
|
+
end
|
40
|
+
|
41
|
+
def columns
|
42
|
+
[
|
43
|
+
:name,
|
44
|
+
:code,
|
45
|
+
{
|
46
|
+
header: :active,
|
47
|
+
data: ->(adjustment_reason) do
|
48
|
+
adjustment_reason.active? ? component('ui/badge').yes : component('ui/badge').no
|
49
|
+
end
|
50
|
+
},
|
51
|
+
]
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= link_to(
|
2
|
+
"https://solidus.io/feedback?category=solidus-admin",
|
3
|
+
class: 'whitespace-nowrap flex flex-col items-center gap-2 text-gray-500 text-small hover:text-black',
|
4
|
+
target: '_blank',
|
5
|
+
) do %>
|
6
|
+
|
7
|
+
<span>
|
8
|
+
<%= render component("ui/badge").new(name: "beta", size: :s, color: :blue) %>
|
9
|
+
<span class="underline"><%= t(".give_feedback") %></span>
|
10
|
+
</span>
|
11
|
+
|
12
|
+
<span class="font-normal text-sm text-center">
|
13
|
+
<%= t(".feedback_description_html") %>
|
14
|
+
</span>
|
15
|
+
<% end %>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<details
|
2
|
+
data-controller="<%= stimulus_id %>"
|
3
|
+
class="relative w-full"
|
4
|
+
aria-label="<%= t('.account') %>"
|
5
|
+
data-action="keydown.escape-><%= stimulus_id %>#close"
|
6
|
+
<%= :open if params[:account_menu_open] %>
|
7
|
+
>
|
8
|
+
<summary
|
9
|
+
class="
|
10
|
+
flex gap-1.5
|
11
|
+
p-3 mt-2 rounded
|
12
|
+
font-semibold text-sm text-gray-500
|
13
|
+
hover:bg-gray-25 [[open]_>_&]:bg-gray-25
|
14
|
+
cursor-pointer
|
15
|
+
">
|
16
|
+
<%= icon_tag("user-smile-fill", class: "inline-block align-text-bottom shrink-0 w-6 h-6 rounded-[4.81rem] font-normal text-sm fill-yellow bg-black") %>
|
17
|
+
<span class="overflow-hidden whitespace-nowrap text-ellipsis leading-6">
|
18
|
+
<%= @user_label %>
|
19
|
+
</span>
|
20
|
+
</summary>
|
21
|
+
|
22
|
+
<ul
|
23
|
+
class="
|
24
|
+
p-2 mb-1 absolute bottom-full left-0 w-full
|
25
|
+
font-normal text-sm text-black bg-white
|
26
|
+
border border-gray-100 rounded-lg
|
27
|
+
shadow-base
|
28
|
+
">
|
29
|
+
|
30
|
+
<% if (available_locales = Spree.i18n_available_locales).any? %>
|
31
|
+
<li class="h-8 flex items-center hover:bg-gray-25 rounded">
|
32
|
+
<%= autosubmit_select_tag(
|
33
|
+
"switch_to_locale",
|
34
|
+
options_for_select(locale_options_for_select(available_locales), selected: I18n.locale),
|
35
|
+
icon: 'global-line',
|
36
|
+
) %>
|
37
|
+
</li>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<li class="h-8 items-center hover:bg-gray-25 rounded dark:hidden flex">
|
41
|
+
<%= autosubmit_select_tag(
|
42
|
+
"switch_to_theme",
|
43
|
+
options_for_select(theme_options_for_select, session[:admin_light_theme]),
|
44
|
+
icon: 'sun-line',
|
45
|
+
) do %>
|
46
|
+
<%= hidden_field_tag(:system_theme, :light) %>
|
47
|
+
<% end %>
|
48
|
+
</li>
|
49
|
+
|
50
|
+
<li class="h-8 items-center hover:bg-gray-25 rounded hidden dark:flex">
|
51
|
+
<%= autosubmit_select_tag(
|
52
|
+
"switch_to_theme",
|
53
|
+
options_for_select(theme_options_for_select, session[:admin_dark_theme]),
|
54
|
+
icon: 'moon-line',
|
55
|
+
) do %>
|
56
|
+
<%= hidden_field_tag(:system_theme, :dark) %>
|
57
|
+
<% end %>
|
58
|
+
</li>
|
59
|
+
|
60
|
+
<li class="h-8 flex items-center hover:bg-gray-25 rounded">
|
61
|
+
<%= link_to @account_path, class: 'flex gap-2 items-center px-2' do %>
|
62
|
+
<%= icon_tag("user-3-line", class: "w-5 h-5 fill-current shrink") %>
|
63
|
+
<span><%= t('.account') %></span>
|
64
|
+
<% end %>
|
65
|
+
</li>
|
66
|
+
|
67
|
+
<li class="h-8 flex items-center hover:bg-gray-25 rounded">
|
68
|
+
<%= button_to @logout_path, method: @logout_method, class: 'flex gap-2 items-center px-2' do %>
|
69
|
+
<%= icon_tag("logout-box-line", class: "w-5 h-5 fill-current shrink") %>
|
70
|
+
<span><%= t('.logout') %></span>
|
71
|
+
<% end %>
|
72
|
+
</li>
|
73
|
+
</ul>
|
74
|
+
</details>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { useClickOutside } from "stimulus-use"
|
3
|
+
|
4
|
+
export default class extends Controller {
|
5
|
+
connect() {
|
6
|
+
useClickOutside(this)
|
7
|
+
}
|
8
|
+
|
9
|
+
clickOutside() {
|
10
|
+
this.close()
|
11
|
+
}
|
12
|
+
|
13
|
+
close() {
|
14
|
+
this.element.removeAttribute("open")
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class SolidusAdmin::Layout::Navigation::Account::Component < SolidusAdmin::BaseComponent
|
4
|
+
def initialize(user_label:, account_path:, logout_path:, logout_method:)
|
5
|
+
@user_label = user_label
|
6
|
+
@account_path = account_path
|
7
|
+
@logout_path = logout_path
|
8
|
+
@logout_method = logout_method
|
9
|
+
end
|
10
|
+
|
11
|
+
def locale_options_for_select(available_locales)
|
12
|
+
available_locales.map do |locale|
|
13
|
+
[
|
14
|
+
t("spree.i18n.this_file_language", locale: locale, default: locale.to_s, fallback: false),
|
15
|
+
locale,
|
16
|
+
]
|
17
|
+
end.sort
|
18
|
+
end
|
19
|
+
|
20
|
+
def theme_options_for_select
|
21
|
+
SolidusAdmin::Config.themes.keys.map { |theme| [theme.to_s.humanize, theme] }.sort
|
22
|
+
end
|
23
|
+
|
24
|
+
def autosubmit_select_tag(name, options, icon:, &block)
|
25
|
+
form_tag(request.fullpath, method: :get, 'data-turbo': false, class: "w-full") do
|
26
|
+
safe_join([
|
27
|
+
block_given? ? capture(&block) : nil,
|
28
|
+
tag.label(safe_join([
|
29
|
+
icon_tag(icon, class: "w-full max-w-[20px] h-5 fill-current shrink"),
|
30
|
+
tag.select(options, name: name, onchange: "this.form.requestSubmit()", class: "w-full appearance-none grow bg-transparent outline-none"),
|
31
|
+
icon_tag("expand-up-down-line", class: "w-full max-w-[20px] h-5 fill-current shrink"),
|
32
|
+
]), class: "flex gap-2 items-center px-2"),
|
33
|
+
])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -4,32 +4,32 @@
|
|
4
4
|
p-4
|
5
5
|
w-full
|
6
6
|
" data-controller="<%= stimulus_id %>" data-<%= stimulus_id %>-cookie-value="solidus_admin">
|
7
|
-
<%= link_to
|
7
|
+
<%= link_to spree.admin_path, class: "py-3 px-2 text-left flex mb-4" do %>
|
8
8
|
<%= image_tag @logo_path, alt: t('.visit_store'), class: "max-h-7" %>
|
9
9
|
<% end %>
|
10
10
|
|
11
|
-
<%= link_to @
|
12
|
-
<div class="flex-grow">
|
13
|
-
<p class="
|
14
|
-
<p class="
|
11
|
+
<%= link_to @store_url, target: :_blank, class: "flex mb-4 px-2 py-1.5 border border-gray-100 rounded-sm shadow-sm" do %>
|
12
|
+
<div class="flex-grow flex flex-col gap-0.5">
|
13
|
+
<p class="font-semibold text-sm text-black"><%= @store.name %></p>
|
14
|
+
<p class="font-normal text-xs text-gray-500"><%= @store.url %></p>
|
15
15
|
</div>
|
16
16
|
<%= render component("ui/icon").new(name: 'arrow-right-up-line', class: 'w-4 h-4 fill-gray-400') %>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
<ul>
|
20
|
-
<%= render component("
|
19
|
+
<ul class="flex flex-col gap-0.5">
|
20
|
+
<%= render component("layout/navigation/item").with_collection(items, fullpath: request.fullpath) %>
|
21
21
|
</ul>
|
22
22
|
|
23
23
|
<div class="mt-auto">
|
24
24
|
<div class="group mb-3">
|
25
|
-
<label class="flex gap-3 items-center py-0.5 px-3 pb-0.5 rounded hover:text-red-500 hover:bg-gray-50
|
25
|
+
<label class="flex gap-3 items-center py-0.5 px-3 pb-0.5 rounded hover:text-red-500 hover:bg-gray-50 font-semibold text-sm text-black cursor-pointer">
|
26
26
|
<%= t('spree.navigation.switch_to_legacy') %>
|
27
27
|
<div class="flex items-center">
|
28
28
|
<%= render component("ui/forms/switch").new(size: :s, checked: false, 'data-action': "#{stimulus_id}#setCookie:prevent") %>
|
29
29
|
</div>
|
30
30
|
</label>
|
31
31
|
</div>
|
32
|
-
<%= render component("
|
32
|
+
<%= render component("layout/navigation/account").new(
|
33
33
|
user_label: helpers.current_solidus_admin_user.email,
|
34
34
|
account_path: solidus_admin.account_path,
|
35
35
|
logout_path: helpers.solidus_admin_logout_path,
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class SolidusAdmin::Layout::Navigation::Component < SolidusAdmin::BaseComponent
|
4
|
+
def initialize(
|
5
|
+
store:,
|
6
|
+
logo_path: SolidusAdmin::Config.logo_path,
|
7
|
+
items: SolidusAdmin::Config.menu_items
|
8
|
+
)
|
9
|
+
@logo_path = logo_path
|
10
|
+
@items = items.map do |attrs|
|
11
|
+
children = attrs[:children].to_a.map { SolidusAdmin::MenuItem.new(**_1, top_level: false) }
|
12
|
+
SolidusAdmin::MenuItem.new(**attrs, children: children, top_level: true)
|
13
|
+
end
|
14
|
+
@store = store
|
15
|
+
end
|
16
|
+
|
17
|
+
def before_render
|
18
|
+
url = @store.url
|
19
|
+
url = "https://#{url}" unless url.start_with?("http")
|
20
|
+
@store_url = url
|
21
|
+
end
|
22
|
+
|
23
|
+
def items
|
24
|
+
@items.sort_by(&:position)
|
25
|
+
end
|
26
|
+
end
|
@@ -4,13 +4,13 @@
|
|
4
4
|
aria-current="<%= @item.current?(@url_helpers, @fullpath) ? "page" : "false" %>"
|
5
5
|
class="
|
6
6
|
flex gap-3 items-center
|
7
|
-
py-
|
7
|
+
py-1 px-3 rounded
|
8
8
|
hover:text-red-500 hover:bg-gray-50
|
9
|
-
<%= "text-red-
|
10
|
-
<%= @item.top_level ? "
|
9
|
+
<%= "text-red-600 bg-gray-50" if active? %>
|
10
|
+
<%= @item.top_level ? "font-semibold text-sm text-black" : "font-normal text-sm text-gray-600" %>
|
11
11
|
"
|
12
12
|
>
|
13
|
-
<i class="w-[1.125rem] h-[1.125rem]
|
13
|
+
<i class="w-[1.125rem] h-[1.125rem] font-normal text-sm flex">
|
14
14
|
<% if @item.icon %>
|
15
15
|
<%= icon_tag(@item.icon, class: "inline-block w-full h-full fill-current") %>
|
16
16
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</a>
|
20
20
|
|
21
21
|
<% if @item.children? %>
|
22
|
-
<ul class="<%= "hidden" unless active? %>">
|
22
|
+
<ul class="flex flex-col gap-0.5 pt-0.5 <%= "hidden" unless active? %>">
|
23
23
|
<%= render self.class.with_collection(@item.children, url_helpers: @url_helpers, fullpath: @fullpath) %>
|
24
24
|
</ul>
|
25
25
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Menu item within a {Sidebar}
|
4
|
-
class SolidusAdmin::
|
4
|
+
class SolidusAdmin::Layout::Navigation::Item::Component < SolidusAdmin::BaseComponent
|
5
5
|
with_collection_parameter :item
|
6
6
|
|
7
|
-
# @param item [SolidusAdmin::
|
7
|
+
# @param item [SolidusAdmin::MenuItem]
|
8
8
|
# @param fullpath [String] the current path
|
9
9
|
# @param url_helpers [#solidus_admin, #spree] context for generating paths
|
10
10
|
def initialize(
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusAdmin::Layout::PageHelpers
|
4
|
+
def page(**attrs, &block)
|
5
|
+
tag.div(capture(&block), class: "px-4 relative", "data-controller": stimulus_id, **attrs) +
|
6
|
+
tag.div(render(component("layout/feedback").new), class: "flex justify-center py-10")
|
7
|
+
end
|
8
|
+
|
9
|
+
def page_header_actions(&block)
|
10
|
+
tag.div(safe_join([
|
11
|
+
capture(&block),
|
12
|
+
]), class: "flex gap-2 items-center")
|
13
|
+
end
|
14
|
+
|
15
|
+
def page_header_back(back_path)
|
16
|
+
render component("ui/button").new(
|
17
|
+
tag: :a,
|
18
|
+
title: t(".back"),
|
19
|
+
icon: "arrow-left-line",
|
20
|
+
scheme: :secondary,
|
21
|
+
href: back_path
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def page_header_title(title, &block)
|
26
|
+
tag.h1(safe_join([
|
27
|
+
tag.span(title, class: "font-semibold text-xl"),
|
28
|
+
(capture(&block) if block_given?) || "",
|
29
|
+
]), class: "flex-1 text-2xl font-bold")
|
30
|
+
end
|
31
|
+
|
32
|
+
def page_header(&block)
|
33
|
+
tag.header(capture(&block), class: "py-6 flex items-center gap-4")
|
34
|
+
end
|
35
|
+
|
36
|
+
def page_with_sidebar(&block)
|
37
|
+
tag.div(capture(&block), class: "flex gap-4 items-start pb-4")
|
38
|
+
end
|
39
|
+
|
40
|
+
def page_with_sidebar_main(&block)
|
41
|
+
tag.div(capture(&block), class: "justify-center items-start gap-4 flex flex-col w-full")
|
42
|
+
end
|
43
|
+
|
44
|
+
def page_with_sidebar_aside(&block)
|
45
|
+
tag.aside(capture(&block), class: "justify-center items-start gap-4 flex flex-col w-full max-w-sm")
|
46
|
+
end
|
47
|
+
|
48
|
+
def page_footer(&block)
|
49
|
+
tag.div(capture(&block), class: "mt-4 py-4 px-2 pb-8 border-t border-gray-100 flex")
|
50
|
+
end
|
51
|
+
|
52
|
+
def page_footer_actions(&block)
|
53
|
+
tag.div(capture(&block), class: "flex gap-2 grow")
|
54
|
+
end
|
55
|
+
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
class SolidusAdmin::SkipLink::Component < SolidusAdmin::BaseComponent
|
5
|
-
# @param href [String] the href attribute for the skip link
|
3
|
+
class SolidusAdmin::Layout::SkipLink::Component < SolidusAdmin::BaseComponent
|
6
4
|
def initialize(href:)
|
7
5
|
@href = href
|
8
6
|
end
|
@@ -16,7 +14,7 @@ class SolidusAdmin::SkipLink::Component < SolidusAdmin::BaseComponent
|
|
16
14
|
inline-block
|
17
15
|
focus:p-2
|
18
16
|
focus:absolute
|
19
|
-
|
17
|
+
font-normal text-sm
|
20
18
|
text-white
|
21
19
|
bg-black
|
22
20
|
}
|
@@ -0,0 +1,30 @@
|
|
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 %>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class SolidusAdmin::OptionTypes::Index::Component < SolidusAdmin::BaseComponent
|
4
|
+
include SolidusAdmin::Layout::PageHelpers
|
5
|
+
|
6
|
+
def initialize(page:)
|
7
|
+
@page = page
|
8
|
+
end
|
9
|
+
|
10
|
+
def title
|
11
|
+
Spree::OptionType.model_name.human.pluralize
|
12
|
+
end
|
13
|
+
|
14
|
+
def prev_page_path
|
15
|
+
solidus_admin.url_for(**request.params, page: @page.number - 1, only_path: true) unless @page.first?
|
16
|
+
end
|
17
|
+
|
18
|
+
def next_page_path
|
19
|
+
solidus_admin.url_for(**request.params, page: @page.next_param, only_path: true) unless @page.last?
|
20
|
+
end
|
21
|
+
|
22
|
+
def batch_actions
|
23
|
+
[
|
24
|
+
{
|
25
|
+
display_name: t('.batch_actions.delete'),
|
26
|
+
action: solidus_admin.option_types_path,
|
27
|
+
method: :delete,
|
28
|
+
icon: 'delete-bin-7-line',
|
29
|
+
},
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
33
|
+
def columns
|
34
|
+
[
|
35
|
+
name_column,
|
36
|
+
presentation_column,
|
37
|
+
]
|
38
|
+
end
|
39
|
+
|
40
|
+
def name_column
|
41
|
+
{
|
42
|
+
header: :name,
|
43
|
+
data: ->(option_type) do
|
44
|
+
content_tag :div, option_type.name
|
45
|
+
end
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
def presentation_column
|
50
|
+
{
|
51
|
+
header: :presentation,
|
52
|
+
data: ->(option_type) do
|
53
|
+
content_tag :div, option_type.presentation
|
54
|
+
end
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<div
|
2
|
+
class="w-full relative overflow-visible"
|
3
|
+
data-controller="<%= stimulus_id %>"
|
4
|
+
data-<%= stimulus_id %>-products-url-value="<%= solidus_admin.variants_for_order_path(@order) %>"
|
5
|
+
data-action="
|
6
|
+
<%= component('ui/forms/search').stimulus_id %>:search-><%= stimulus_id %>#search
|
7
|
+
<%= component('ui/forms/search').stimulus_id %>:submit-><%= stimulus_id %>#selectResult
|
8
|
+
"
|
9
|
+
>
|
10
|
+
<%= render component('ui/panel').new(title: t('.title')) do |panel| %>
|
11
|
+
<% panel.with_section do %>
|
12
|
+
<%= render component('ui/forms/search').new(
|
13
|
+
placeholder: t('.search_placeholder'),
|
14
|
+
id: :order_cart,
|
15
|
+
) %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% panel.with_section(wide: true, high: true) do %>
|
19
|
+
<div class="rounded-b-lg overflow-hidden">
|
20
|
+
<table class="table-auto w-full" <%= :hidden if @order.line_items.empty? %>>
|
21
|
+
<thead>
|
22
|
+
<tr>
|
23
|
+
<th class="text-left font-semibold text-sm text-gray-800 bg-gray-15 px-6 py-3 leading-none">Product</th>
|
24
|
+
<th class="text-left font-semibold text-sm text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16">Quantity</th>
|
25
|
+
<th class="text-left font-semibold text-sm text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16">Price</th>
|
26
|
+
<th class="text-left font-semibold text-sm text-gray-800 bg-gray-15 px-6 py-3 leading-none w-16"><span class="sr-only">Actions</span></th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
<% @order.line_items.each do |line_item| %>
|
31
|
+
<tr class="border-gray-100 border-t">
|
32
|
+
<td class="px-6 py-4">
|
33
|
+
<%= render component("ui/resource_item").new(
|
34
|
+
thumbnail: (line_item.variant.images.first || line_item.variant.product.gallery.images.first)&.url(:small),
|
35
|
+
title: line_item.variant.name,
|
36
|
+
subtitle: "#{line_item.variant.sku}#{line_item.variant.options_text.presence&.prepend("- ")}",
|
37
|
+
) %>
|
38
|
+
</td>
|
39
|
+
<td class="px-6 py-4">
|
40
|
+
<%= form_for(line_item, url: solidus_admin.order_line_item_path(@order, line_item), html: {
|
41
|
+
"data-controller": "readonly-when-submitting"
|
42
|
+
}) do |f| %>
|
43
|
+
<%= render component("ui/forms/input").new(
|
44
|
+
name: "#{f.object_name}[quantity]",
|
45
|
+
type: :number,
|
46
|
+
value: line_item.quantity,
|
47
|
+
"aria-label": "Quantity",
|
48
|
+
min: 0,
|
49
|
+
class: "!w-16 inline-block",
|
50
|
+
"data-action": "input->#{stimulus_id}#updateLineItem",
|
51
|
+
) %>
|
52
|
+
<% render component("ui/button").new(type: :submit, text: "Update", class: "inline-block") %>
|
53
|
+
<% end %>
|
54
|
+
</td>
|
55
|
+
<td class="px-6 py-4">
|
56
|
+
<span class="text-gray-500 font-normal text-sm"><%= line_item.single_money.to_html %></span>
|
57
|
+
</td>
|
58
|
+
<td class="px-6 py-4 text-right">
|
59
|
+
<%= form_for(line_item, url: solidus_admin.order_line_item_path(@order, line_item), method: :delete) do |f| %>
|
60
|
+
<%= render component('ui/button').new(
|
61
|
+
scheme: :ghost,
|
62
|
+
size: :s,
|
63
|
+
title: t("spree.delete"),
|
64
|
+
icon: 'close-line',
|
65
|
+
"data-controller": "confirm",
|
66
|
+
"data-confirm-text-value": t("spree.are_you_sure"),
|
67
|
+
) %>
|
68
|
+
<% end %>
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
<% end %>
|
72
|
+
</tbody>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<% end %>
|
76
|
+
<% end %>
|
77
|
+
</div>
|