mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add new page with organizer reports
This commit is contained in:
parent
8335aa8b43
commit
fabe29d2ed
4 changed files with 108 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ module Admin
|
|||
load_and_authorize_resource :event, through: :program
|
||||
load_and_authorize_resource :events_registration, only: :toggle_attendance
|
||||
|
||||
before_action :get_event, except: [:index, :create]
|
||||
before_action :get_event, except: [:index, :create, :reports]
|
||||
|
||||
# FIXME: The timezome should only be applied on output, otherwise
|
||||
# you get lost in timezone conversions...
|
||||
|
|
@ -139,6 +139,13 @@ module Admin
|
|||
end
|
||||
end
|
||||
|
||||
def reports
|
||||
@events = @program.events
|
||||
@events_commercials = Commercial.where(commercialable_type: 'Event', commercialable_id: @events.pluck(:id))
|
||||
@events_missing_commercial = @events.where.not(id: @events_commercials.pluck(:commercialable_id))
|
||||
@events_with_requirements = @events.where.not(description: ['', nil])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def event_params
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue