<%= render component('ui/panel').new do %>
<%= render component("ui/forms/field").text_field(f, :name) %>
<%= render component("ui/forms/field").text_field(f, :slug) %>
<%= render component("ui/forms/field").text_area(f, :description) %>
<% end %>
<%= render component('ui/panel').new(title: 'SEO', title_hint: 'Search Engine Optimization') do %>
<%= render component("ui/forms/field").text_field(f, :meta_title) %>
<%= render component("ui/forms/field").text_field(f, :meta_description) %>
<%= render component("ui/forms/field").text_area(f, :meta_keywords) %>
<% end %>
<%= render component('ui/panel').new(title: "Media") do |panel| %>
<% panel.with_action(
name: t(".manage_images"),
href: spree.admin_product_images_path(@product)
) %>
<% end %>
<%= render component('ui/panel').new(title: 'Pricing') do %>
<%= render component("ui/forms/field").text_field(f, :price) %>
<%= render component("ui/forms/field").text_field(f, :cost_price) %>
<%= render component("ui/forms/field").text_field(f, :cost_currency) %>
<% end %>
<%= render component('ui/panel').new(title: 'Stock') do |panel| %>
<%= render component("ui/forms/field").text_field(f, :sku) %>
<% panel.with_action(
name: t(".manage_stock"),
href: spree.admin_product_stock_path(@product)
) %>
<% end %>
<%= render component('ui/panel').new(title: 'Shipping') do %>
<%= render component("ui/forms/field").select(
f,
:shipping_category_id,
[[t(".none"), nil]] + Spree::ShippingCategory.order(:name).pluck(:name, :id),
tip: t(".hints.shipping_category_html"),
) %>
<%= render component("ui/forms/field").select(
f,
:tax_category_id,
[[t(".none"), nil]] + Spree::TaxCategory.order(:name).pluck(:name, :id),
tip: t(
".hints.tax_category_html",
default_tax_category: Spree::TaxCategory.default&.name
),
) %>
<% end %>
<%= render component('ui/panel').new(title: "Options") do %>
<%= render component("ui/forms/field").select(
f,
:option_type_ids,
option_type_options,
multiple: true,
"size" => option_type_options.size,
) %>
<% end %>
<%= render component('ui/panel').new(title: "Specifications") do |panel| %>
<% panel.with_action(
name: t(".manage_properties"),
href: spree.admin_product_product_properties_path(@product)
) %>
<% end %>