Class: Crm::DailyFocusWidgetComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/crm/daily_focus_widget_component.rb

Overview

ViewComponent: renders the daily focus widget block.

Delegated Instance Attributes collapse

Methods inherited from ApplicationComponent

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

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#fetch_or_fallback

Constructor Details

#initialize(employee:, conversation:) ⇒ DailyFocusWidgetComponent

Returns a new instance of DailyFocusWidgetComponent.

Parameters:

  • employee (Employee, nil)

    employee whose daily focus analysis is
    shown; falls back to "your team" in the copy when nil

  • conversation (Assistant::Conversation, nil)

    Sunny conversation the
    latest assistant message is read from; the widget renders empty when nil



11
12
13
14
15
# File 'app/components/crm/daily_focus_widget_component.rb', line 11

def initialize(employee:, conversation:)
  super()
  @employee = employee
  @conversation = conversation
end

Instance Method Details

#fa_iconObject

Alias for Helpers#fa_icon

Returns:

  • (Object)

    Helpers#fa_icon

See Also:



5
# File 'app/components/crm/daily_focus_widget_component.rb', line 5

delegate :fa_icon, to: :helpers