Module: Workarea::Admin::OrdersHelper

Defined in:
app/helpers/workarea/admin/orders_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_order_timeline_entry(entry) ⇒ Object



4
5
6
7
8
9
# File 'app/helpers/workarea/admin/orders_helper.rb', line 4

def render_order_timeline_entry(entry)
  render "workarea/admin/orders/timeline/#{entry.slug}", entry: entry

rescue ActionView::MissingTemplate
  '' # we don't want to render anything if the partial is missing
end

#state_indicator_class(status) ⇒ Object



11
12
13
14
# File 'app/helpers/workarea/admin/orders_helper.rb', line 11

def state_indicator_class(status)
  state = Workarea.config.status_state_indicators[status]
  "state--#{state}" if state.present?
end