Class: Crm::Reports::SalesRepRankingController

Inherits:
CrmController
  • Object
show all
Includes:
Controllers::ReportCommandFlashable
Defined in:
app/controllers/crm/reports/sales_rep_ranking_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/crm/reports/sales_rep_ranking_controller.rb', line 6

def show
  @report_command = ::Report::SalesRepRanking::SalesRepRankingCommand.new(sales_rep_ranking_command_params)
  @result = @report_command.execute

  return render partial: 'mini_view', layout: false if request.headers['Turbo-Frame'].present?

  flash_report_command_errors
  respond_to do |format|
    format.html do
      render partial: 'mini_view', layout: false if request.xhr?
    end
    format.turbo_stream
  end
end