Add email notifications for events registrations, add switch-checkboxes, create EventsRegistrations controller, separate page for events that require registration
This commit is contained in:
parent
139a8565e2
commit
77af75f319
38 changed files with 1313 additions and 403 deletions
7
app/jobs/deleted_event_registration_automatically_job.rb
Normal file
7
app/jobs/deleted_event_registration_automatically_job.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class DeletedEventRegistrationAutomaticallyJob < ActiveJob::Base
|
||||
queue_as :default
|
||||
|
||||
def perform(conference, user, event)
|
||||
Mailbot.deleted_event_registration_automatically(conference, user, event).deliver_now
|
||||
end
|
||||
end
|
||||
13
app/jobs/updated_max_attendees_automatically_job.rb
Normal file
13
app/jobs/updated_max_attendees_automatically_job.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class UpdatedMaxAttendeesAutomaticallyJob < ActiveJob::Base
|
||||
queue_as :default
|
||||
|
||||
def perform(event, users_emails=nil)
|
||||
if users_emails.present?
|
||||
event.program.conference.email_settings.updated_max_attendees_automatically_body << "\n\nThe following users have been unregistered from your event:\n #{users_emails}"
|
||||
end
|
||||
|
||||
event.users.uniq.each do |user|
|
||||
Mailbot.updated_max_attendees_automatically(event.program.conference, user, event).deliver_now
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue