Class: Crm::Reports::CustomerPerformanceController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Reports::CustomerPerformanceController
- Includes:
- Controllers::ReportCommandFlashable
- Defined in:
- app/controllers/crm/reports/customer_performance_controller.rb
Instance Method Summary collapse
-
#pin_customers ⇒ Object
Tag customer and send to advanced search.
- #show ⇒ Object
Instance Method Details
#pin_customers ⇒ Object
Tag customer and send to advanced search
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/crm/reports/customer_performance_controller.rb', line 19 def pin_customers se = CustomerSearch.new(query_params: { id_in: params[:customer_ids] }, employee_id: current_user.id) if se.save se.record_list('*') redirect_to search_path(se) else redirect_to :show, notice: "Could not create search, errors reported: #{se.errors_to_s}" end end |
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/crm/reports/customer_performance_controller.rb', line 6 def show :read, Invoice @report_command = ::Report::CustomerPerformanceCommand.new(customer_performance_command_params) @results = @report_command.execute flash_report_command_errors respond_to do |format| format.html format.turbo_stream end end |