Class: Tasks::CollectionObjects::SummaryController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/collection_objects/summary_controller.rb

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

GET



5
6
7
# File 'app/controllers/tasks/collection_objects/summary_controller.rb', line 5

def index
  set_queries
end

#reportObject



9
10
11
12
# File 'app/controllers/tasks/collection_objects/summary_controller.rb', line 9

def report
  set_queries
  @target = params[:target]
end

#set_queriesObject (private)



16
17
18
19
20
21
22
# File 'app/controllers/tasks/collection_objects/summary_controller.rb', line 16

def set_queries
  @collection_objects_query = ::Queries::CollectionObject::Filter.new(params.merge(project_id: sessions_current_project_id))
  @collection_objects = @collection_objects_query.all
  @loans = ::Queries::Loan::Filter.new(collection_object_query: @collection_objects_query.params).all
  @images = ::Queries::Image::Filter.new(collection_object_query: @collection_objects_query.params).all
  @collecting_events = ::Queries::CollectingEvent::Filter.new(collection_object_query: @collection_objects_query.params).all
end