Show missing speakers in reports

This commit is contained in:
Nishanth Vijayan 2016-09-26 17:01:39 +05:30
parent fabe29d2ed
commit d954059947
2 changed files with 35 additions and 0 deletions

View file

@ -144,6 +144,10 @@ module Admin
@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])
attended_registrants_ids = @conference.registrations.where(attended: true).pluck(:user_id)
@missing_event_speakers = EventUser.joins(:event).where('event_role = ? and program_id = ?', 'submitter', @program.id).
where.not(user_id: attended_registrants_ids).includes(:user, :event)
end
private