Class: Crm::Reports::StatusTimelineReportController

Inherits:
CrmController
  • Object
show all
Defined in:
app/controllers/crm/reports/status_timeline_report_controller.rb

Overview

Opportunity status-timeline report: counts of opportunities that entered
each pipeline status, bucketed over a date range.

Instance Method Summary collapse

Instance Method Details

#indexvoid

This method returns an undefined value.

Renders the status timeline as HTML, or as raw JSON for a given range
when a start_time/end_time window is supplied.



10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/crm/reports/status_timeline_report_controller.rb', line 10

def index
  respond_to do |format|
    format.html do
      render locals: {
        status_timeline_data: ::Report::StatusTimelineReport.get_statuses_from_range
      }
    end
    format.json do
      render json: ::Report::StatusTimelineReport.get_statuses_from_range(params[:start_time], params[:end_time])
    end
  end
end