Class: Crm::Reports::ActivityPerformanceController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Reports::ActivityPerformanceController
- Includes:
- Controllers::ReportCommandFlashable
- Defined in:
- app/controllers/crm/reports/activity_performance_controller.rb
Overview
Controller: activity performance.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/crm/reports/activity_performance_controller.rb', line 8 def show @report_command = ::Report::ActivityPerformance::Command.new(activity_performance_command_params) @results = @report_command.execute @chart_data = build_chart_data if @results.present? return render partial: 'mini_view', layout: false if request.headers['Turbo-Frame'].present? flash_report_command_errors flash.now[:warning] = @report_command.warnings.join('.') if @report_command.warnings.any? respond_to do |format| format.html do render partial: 'mini_view', layout: false if request.xhr? end format.turbo_stream end end |