Class: Crm::Reports::PhoneQueueReportController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Reports::PhoneQueueReportController
- Includes:
- Controllers::ReportCommandFlashable
- Defined in:
- app/controllers/crm/reports/phone_queue_report_controller.rb
Overview
Controller: phone queue report.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/crm/reports/phone_queue_report_controller.rb', line 6 def show :read, CallLog cmd_params = phone_queue_report_command_params @report_command = ::Report::PhoneQueueReportCommand.new(cmd_params) @results = @report_command.execute(cmd_params) @groupby = cmd_params[:grouping] || Array(@report_command.grouping).first flash_report_command_errors respond_to do |format| format.html format.turbo_stream format.csv { send_data @report_command.to_csv(cmd_params), filename: "phone-queue-report-#{Date.current}.csv" } end end |