Sha256: f8cf5f2d78d60f52582d1bab931fca024ae34aa7aa01b1750fdd987b345e7502

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::ReimbursementTypes::Index::Component < SolidusAdmin::RefundsAndReturns::Component
  def model_class
    Spree::ReimbursementType
  end

  def search_url
    solidus_admin.reimbursement_types_path
  end

  def search_key
    :name_cont
  end

  def columns
    [
      :name,
      {
        header: :active,
        data: ->(reimbursement_type) do
          reimbursement_type.active? ? component('ui/badge').yes : component('ui/badge').no
        end
      },
    ]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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