Class: Crm::Reports::CallStatisticsController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Reports::CallStatisticsController
- Includes:
- Controllers::ReportCommandFlashable
- Defined in:
- app/controllers/crm/reports/call_statistics_controller.rb
Overview
Controller: call statistics.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/crm/reports/call_statistics_controller.rb', line 6 def show :read, CallLog @report_command = ::Report::CallStatistics::Command.new(call_statistics_command_params) @result = @report_command.execute return render partial: 'minimal_results', layout: false if request.headers['Turbo-Frame'].present? flash_report_command_errors respond_to do |format| format.html format.turbo_stream format.csv { send_data @report_command.to_csv, filename: "call-statistics-#{Date.current}.csv" } end end |