Sha256: 97541de05051dfa5025fe9218e0ddda782e2d8ae3098ca7bcfd39df9b72b059a

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::Orders::Show::Adjustments::Index::Source::Component < SolidusAdmin::BaseComponent
  attr_reader :adjustment, :source, :model_name

  def initialize(adjustment)
    @adjustment = adjustment
    @source = adjustment.source
    @model_name = source&.model_name&.human
  end

  def call
    render component("ui/thumbnail_with_caption").new(icon:, caption:, detail:)
  end

  def caption
    adjustment.label
  end

  def detail
  end

  def icon
    "question-line"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/orders/show/adjustments/index/source/component.rb