Sha256: 4f272341432ae753b0cd8ebc5be5ca6875b36d1bca7d169b2dd6f9f431849d57

Contents?: true

Size: 876 Bytes

Versions: 4

Compression:

Stored size: 876 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::Shipping::Component < SolidusAdmin::UI::Pages::Index::Component
  def title
    page_header_title safe_join([
      tag.div(t(".title")),
      tag.div(t(".subtitle"), class: "font-normal text-sm text-gray-500"),
    ])
  end

  def tabs
    [
      {
        text: Spree::ShippingMethod.model_name.human.pluralize,
        href: solidus_admin.shipping_methods_path,
        current: model_class == Spree::ShippingMethod,
      },
      {
        text: Spree::ShippingCategory.model_name.human.pluralize,
        href: solidus_admin.shipping_categories_path,
        current: model_class == Spree::ShippingCategory,
      },
      {
        text: Spree::StockLocation.model_name.human.pluralize,
        href: solidus_admin.stock_locations_path,
        current: model_class == Spree::StockLocation,
      },
    ]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/shipping/component.rb
solidus_admin-0.3.1 app/components/solidus_admin/shipping/component.rb
solidus_admin-0.3.0 app/components/solidus_admin/shipping/component.rb
solidus_admin-0.2.0 app/components/solidus_admin/shipping/component.rb