Class: SolidusAdmin::RefundsAndReturns::Component

Inherits:
UI::Pages::Index::Component
  • Object
show all
Defined in:
app/components/solidus_admin/refunds_and_returns/component.rb

Instance Method Summary collapse

Instance Method Details

#tabsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'app/components/solidus_admin/refunds_and_returns/component.rb', line 11

def tabs
  [
    {
      text: Spree::RefundReason.model_name.human(count: 2),
      href: solidus_admin.refund_reasons_path,
      current: model_class == Spree::RefundReason,
    },
    {
      text: Spree::ReimbursementType.model_name.human(count: 2),
      href: solidus_admin.reimbursement_types_path,
      current: model_class == Spree::ReimbursementType,
    },
    {
      text: Spree::ReturnReason.model_name.human(count: 2),
      href: solidus_admin.return_reasons_path,
      current: model_class == Spree::ReturnReason,
    },
    {
      text: Spree::AdjustmentReason.model_name.human(count: 2),
      href: solidus_admin.adjustment_reasons_path,
      current: model_class == Spree::AdjustmentReason,
    },
    {
      text: Spree::StoreCreditReason.model_name.human(count: 2),
      href: solidus_admin.store_credit_reasons_path,
      current: model_class == Spree::StoreCreditReason,
    },
  ]
end

#titleObject



4
5
6
7
8
9
# File 'app/components/solidus_admin/refunds_and_returns/component.rb', line 4

def title
  page_header_title safe_join([
    tag.div(t(".title")),
    tag.div(t(".subtitle"), class: "font-normal text-sm text-gray-500"),
  ])
end