Class: Crm::RevenueWidgetComponent

Inherits:
ApplicationComponent show all
Includes:
DashboardQueryLink
Defined in:
app/components/crm/revenue_widget_component.rb

Constant Summary collapse

ON_HOLD_STATES =
%i[
  pending pending_payment pending_release_authorization
  awaiting_carrier_assignment pre_pack in_cr_hold
  needs_programming_details needs_serial_number_reservation
  profit_review
].freeze

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags

Constructor Details

#initialize(employee: nil) ⇒ RevenueWidgetComponent

Returns a new instance of RevenueWidgetComponent.



13
14
15
16
17
18
# File 'app/components/crm/revenue_widget_component.rb', line 13

def initialize(employee: nil)
  super()
  @employee = employee
  @companies = Company.sales_companies
  @company_ids = @companies.map(&:id)
end