hackathon_manager 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +90 -0
- data/Rakefile +36 -0
- data/app/assets/config/hackathon_manager_manifest.js +0 -0
- data/app/assets/javascripts/hackathon_manager/application.js +16 -0
- data/app/assets/javascripts/hackathon_manager/jquery.transit.min.js +1 -0
- data/app/assets/javascripts/hackathon_manager/main.js +237 -0
- data/app/assets/javascripts/hackathon_manager/manage/application.js +20 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/emailEvents.js +25 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.bulkRowSelect.js +13 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.bulkRowedit.js +42 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.chartkickAutoReload.js +8 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +98 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupHighcharts.js +34 -0
- data/app/assets/javascripts/hackathon_manager/manage/map.js +58 -0
- data/app/assets/javascripts/hackathon_manager/registrations.js +26 -0
- data/app/assets/javascripts/hackathon_manager/us.json +1 -0
- data/app/assets/javascripts/hackathon_manager/vendor/buttons.html5.min.js +22 -0
- data/app/assets/javascripts/hackathon_manager/vendor/d3.v3.min.js +5 -0
- data/app/assets/javascripts/hackathon_manager/vendor/dataTables.buttons.min.js +35 -0
- data/app/assets/javascripts/hackathon_manager/vendor/jquery.dataTables.min.js +164 -0
- data/app/assets/javascripts/hackathon_manager/vendor/pdfmake.min.js +22 -0
- data/app/assets/javascripts/hackathon_manager/vendor/queue.v1.min.js +1 -0
- data/app/assets/javascripts/hackathon_manager/vendor/topojson.v1.min.js +1 -0
- data/app/assets/javascripts/hackathon_manager/vendor/vfs_fonts.js +1 -0
- data/app/assets/stylesheets/hackathon_manager/core.sass +20 -0
- data/app/assets/stylesheets/hackathon_manager/datatables/buttons.dataTables.min.css +1 -0
- data/app/assets/stylesheets/hackathon_manager/datatables/jquery.dataTables.min.css +1 -0
- data/app/assets/stylesheets/hackathon_manager/forms/_confirmation.sass +21 -0
- data/app/assets/stylesheets/hackathon_manager/forms/_forms.sass +243 -0
- data/app/assets/stylesheets/hackathon_manager/general/_base.sass +105 -0
- data/app/assets/stylesheets/hackathon_manager/general/_button.sass +49 -0
- data/app/assets/stylesheets/hackathon_manager/general/_footer.sass +21 -0
- data/app/assets/stylesheets/hackathon_manager/general/_main.sass +4 -0
- data/app/assets/stylesheets/hackathon_manager/general/_media-queries.sass +52 -0
- data/app/assets/stylesheets/hackathon_manager/general/_mixins.sass +58 -0
- data/app/assets/stylesheets/hackathon_manager/general/_mlh.sass +13 -0
- data/app/assets/stylesheets/hackathon_manager/general/_sidebar.sass +70 -0
- data/app/assets/stylesheets/hackathon_manager/general/_status-colors.sass +14 -0
- data/app/assets/stylesheets/hackathon_manager/general/_table.sass +26 -0
- data/app/assets/stylesheets/hackathon_manager/mailer.sass +108 -0
- data/app/assets/stylesheets/hackathon_manager/manage.sass +119 -0
- data/app/assets/stylesheets/hackathon_manager/scaffolds.scss +50 -0
- data/app/assets/stylesheets/variables.sass +41 -0
- data/app/controllers/bus_lists_controller.rb +37 -0
- data/app/controllers/concerns/questionnaires_controllable.rb +15 -0
- data/app/controllers/manage/admins_controller.rb +55 -0
- data/app/controllers/manage/application_controller.rb +13 -0
- data/app/controllers/manage/bus_lists_controller.rb +71 -0
- data/app/controllers/manage/dashboard_controller.rb +112 -0
- data/app/controllers/manage/messages_controller.rb +88 -0
- data/app/controllers/manage/questionnaires_controller.rb +172 -0
- data/app/controllers/manage/schools_controller.rb +87 -0
- data/app/controllers/manage/stats_controller.rb +77 -0
- data/app/controllers/questionnaires_controller.rb +145 -0
- data/app/controllers/rsvps_controller.rb +97 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +18 -0
- data/app/controllers/users/registrations_controller.rb +63 -0
- data/app/datatables/admin_datatable.rb +29 -0
- data/app/datatables/message_datatable.rb +30 -0
- data/app/datatables/questionnaire_datatable.rb +39 -0
- data/app/datatables/school_datatable.rb +34 -0
- data/app/helpers/hackathon_manager_helper.rb +36 -0
- data/app/helpers/manage/dashboard_helper.rb +9 -0
- data/app/inputs/deletable_attachment_input.rb +11 -0
- data/app/inputs/formatted_boolean_input.rb +26 -0
- data/app/inputs/school_selection_input.rb +9 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/mail_preview.rb +42 -0
- data/app/mailers/mailer.rb +84 -0
- data/app/models/bus_list.rb +24 -0
- data/app/models/deletable_attachment.rb +17 -0
- data/app/models/fips.rb +3 -0
- data/app/models/message.rb +76 -0
- data/app/models/questionnaire.rb +166 -0
- data/app/models/schedule.rb +53 -0
- data/app/models/school.rb +31 -0
- data/app/models/school_name_duplicate.rb +7 -0
- data/app/models/user.rb +52 -0
- data/app/views/application/_bus_list_info.html.haml +20 -0
- data/app/views/application/_bus_list_stats.html.haml +9 -0
- data/app/views/application/_questionnaire_summary.html.haml +54 -0
- data/app/views/bus_lists/show.html.haml +45 -0
- data/app/views/devise/passwords/_form.html.haml +9 -0
- data/app/views/devise/passwords/edit.html.haml +14 -0
- data/app/views/devise/passwords/new.html.haml +5 -0
- data/app/views/devise/registrations/_form.html.haml +8 -0
- data/app/views/devise/registrations/edit.html.haml +20 -0
- data/app/views/devise/registrations/new.html.haml +18 -0
- data/app/views/devise/sessions/_form.html.haml +8 -0
- data/app/views/devise/sessions/new.html.haml +9 -0
- data/app/views/layouts/_shared_footer.html.haml +1 -0
- data/app/views/layouts/_sidebar.html.haml +22 -0
- data/app/views/layouts/blank.html.haml +12 -0
- data/app/views/layouts/dayof.html.haml +12 -0
- data/app/views/layouts/hackathon_manager.html.haml +12 -0
- data/app/views/layouts/mailer.html.erb +51 -0
- data/app/views/layouts/manage/application.html.haml +26 -0
- data/app/views/mailer/_getting_there.html.erb +14 -0
- data/app/views/mailer/_questions.html.erb +2 -0
- data/app/views/mailer/accepted_email.html.erb +13 -0
- data/app/views/mailer/application_confirmation_email.html.erb +13 -0
- data/app/views/mailer/bulk_message_email.html.erb +1 -0
- data/app/views/mailer/bulk_templates/_default.html.erb +1 -0
- data/app/views/mailer/bus_captain_confirmation_email.html.erb +12 -0
- data/app/views/mailer/bus_list_update_email.html.erb +7 -0
- data/app/views/mailer/denied_email.html.erb +5 -0
- data/app/views/mailer/incomplete_reminder_email.html.erb +6 -0
- data/app/views/mailer/rsvp_confirmation_email.html.erb +8 -0
- data/app/views/mailer/slack_invite_email.html.erb +10 -0
- data/app/views/manage/admins/_form.html.haml +18 -0
- data/app/views/manage/admins/edit.html.haml +12 -0
- data/app/views/manage/admins/index.html.haml +15 -0
- data/app/views/manage/admins/new.html.haml +8 -0
- data/app/views/manage/admins/show.html.haml +17 -0
- data/app/views/manage/bus_lists/_form.html.haml +14 -0
- data/app/views/manage/bus_lists/edit.html.haml +8 -0
- data/app/views/manage/bus_lists/index.html.haml +26 -0
- data/app/views/manage/bus_lists/new.html.haml +6 -0
- data/app/views/manage/bus_lists/show.html.haml +92 -0
- data/app/views/manage/dashboard/index.html.haml +64 -0
- data/app/views/manage/dashboard/map_data.tsv.erb +48 -0
- data/app/views/manage/messages/_form.html.haml +15 -0
- data/app/views/manage/messages/edit.html.haml +10 -0
- data/app/views/manage/messages/index.html.haml +17 -0
- data/app/views/manage/messages/new.html.haml +8 -0
- data/app/views/manage/messages/show.html.haml +50 -0
- data/app/views/manage/questionnaires/_form.html.haml +54 -0
- data/app/views/manage/questionnaires/edit.html.haml +12 -0
- data/app/views/manage/questionnaires/index.html.haml +36 -0
- data/app/views/manage/questionnaires/new.html.haml +8 -0
- data/app/views/manage/questionnaires/show.html.haml +63 -0
- data/app/views/manage/schools/_form.html.haml +16 -0
- data/app/views/manage/schools/edit.html.haml +12 -0
- data/app/views/manage/schools/index.html.haml +18 -0
- data/app/views/manage/schools/merge.html.haml +35 -0
- data/app/views/manage/schools/new.html.haml +8 -0
- data/app/views/manage/schools/show.html.haml +52 -0
- data/app/views/manage/stats/index.html.haml +55 -0
- data/app/views/questionnaires/_form.html.haml +70 -0
- data/app/views/questionnaires/edit.html.haml +10 -0
- data/app/views/questionnaires/new.html.haml +7 -0
- data/app/views/questionnaires/show.html.haml +30 -0
- data/app/views/rsvps/show.html.haml +61 -0
- data/app/workers/bulk_message_worker.rb +86 -0
- data/app/workers/slack_invite_worker.rb +49 -0
- data/config/blazer.yml +56 -0
- data/config/initializers/ajax_datatables_rails.rb +7 -0
- data/config/initializers/chartkick.rb +4 -0
- data/config/initializers/devise.rb +265 -0
- data/config/initializers/hackathon.rb +9 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/new_framework_defaults.rb +20 -0
- data/config/initializers/sidekiq.rb +11 -0
- data/config/initializers/simple_form.rb +164 -0
- data/config/initializers/static_data.rb +7 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/routes.rb +74 -0
- data/db/migrate/20141011210642_create_participants.rb +18 -0
- data/db/migrate/20141029055313_create_schools.rb +12 -0
- data/db/migrate/20150104071608_add_shirt_and_dietary_medical_to_participants.rb +6 -0
- data/db/migrate/20150104190233_add_attachment_resume_to_participants.rb +13 -0
- data/db/migrate/20150110020958_add_international_to_participants.rb +5 -0
- data/db/migrate/20150110215933_change_participants_to_registration.rb +5 -0
- data/db/migrate/20150110222214_create_users.rb +5 -0
- data/db/migrate/20150110222455_add_portfolio_and_vcs_urls_to_registrations.rb +6 -0
- data/db/migrate/20150110222655_add_devise_to_users.rb +48 -0
- data/db/migrate/20150111000224_change_resgistrations_to_questionnaire.rb +5 -0
- data/db/migrate/20150111012709_add_questionnaire_ref_to_users.rb +8 -0
- data/db/migrate/20150113205638_add_amin_to_users.rb +5 -0
- data/db/migrate/20150113233730_add_questionnaire_count_to_schools.rb +12 -0
- data/db/migrate/20150125213100_set_default_admin_value.rb +17 -0
- data/db/migrate/20150216232155_add_agreement_accepted_to_questionnaires.rb +5 -0
- data/db/migrate/20150218051450_add_admin_read_only_to_users.rb +5 -0
- data/db/migrate/20150221165513_create_messages.rb +15 -0
- data/db/migrate/20150225235817_add_status_to_user.rb +7 -0
- data/db/migrate/20150302011457_create_fips.rb +11 -0
- data/db/migrate/20150326031423_add_template_to_message.rb +5 -0
- data/db/migrate/20150410175056_create_bus_lists.rb +12 -0
- data/db/migrate/20150411161432_add_capacity_notes_captain_to_bus_lists.rb +8 -0
- data/db/migrate/20150415165844_add_is_bus_captain_to_questionnaire.rb +5 -0
- data/db/migrate/20150415181114_add_check_in_data_to_questionnaire.rb +8 -0
- data/db/migrate/20151224015223_change_read_only_user_to_limited.rb +5 -0
- data/db/migrate/20160110012217_add_code_of_conduct_accepted_to_questionnaire.rb +5 -0
- data/db/migrate/20160110222639_add_omniauth_to_users.rb +8 -0
- data/db/migrate/20160111020817_update_questionnaire_for_my_mlh.rb +14 -0
- data/db/migrate/20160112222137_add_option_for_alt_travel_to_questionnaire.rb +6 -0
- data/db/migrate/20160208061253_rename_can_share_resume_to_info.rb +5 -0
- data/db/migrate/20161020032736_remove_resume_from_questionnaires.rb +14 -0
- data/db/migrate/20161024145452_add_data_sharing_to_questionnaire.rb +5 -0
- data/db/migrate/20161206073921_rename_graduation_to_level_of_study.rb +6 -0
- data/db/migrate/20161206084722_add_reminder_sent_at_to_users.rb +5 -0
- data/db/migrate/20161208055809_add_attachment_resume_to_questionnaires.rb +11 -0
- data/db/migrate/20161212030010_add_interest_to_questionnaire.rb +5 -0
- data/db/migrate/20170107210122_create_school_name_duplicates.rb +10 -0
- data/db/migrate/20170128063020_install_blazer.rb +45 -0
- data/db/schools.csv +1 -0
- data/db/seeds.rb +17 -0
- data/lib/hackathon_manager/engine.rb +35 -0
- data/lib/hackathon_manager/version.rb +3 -0
- data/lib/hackathon_manager.rb +5 -0
- data/lib/tasks/coverage.rake +14 -0
- data/lib/tasks/hackathon_manager_tasks.rake +4 -0
- metadata +667 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
%div{class:'form-container'}
|
2
|
+
= simple_form_for @questionnaire, url: url_for(action: @questionnaire.new_record? ? "create" : "update", controller: "questionnaires"), html: { "data-validate" => "form" } do |f|
|
3
|
+
|
4
|
+
- if f.error_notification.present?
|
5
|
+
= f.error_notification
|
6
|
+
|
7
|
+
- if flash[:notice]
|
8
|
+
#disclaimer
|
9
|
+
%p= flash[:notice]
|
10
|
+
|
11
|
+
.form-inputs
|
12
|
+
%fieldset
|
13
|
+
%legend Provided by My MLH
|
14
|
+
= f.input :first_name, placeholder: "Joe", input_html: { "data-validate" => "presence" }, label: "First Name", autofocus: true
|
15
|
+
= f.input :last_name, placeholder: "Smith", input_html: { "data-validate" => "presence" }, label: "Last Name"
|
16
|
+
= f.input :email, placeholder: "joe@example.com", input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
17
|
+
= f.input :phone, placeholder: "(123) 456-7890", input_html: { "data-validate" => "presence" }
|
18
|
+
= f.input :date_of_birth, start_year: Date.today.year - 18, end_year: Date.today.year - 90, order: [:month, :day, :year], input_html: { "data-validate" => "presence" }
|
19
|
+
|
20
|
+
= f.input :school_id, as: :school_selection, placeholder: "My University", input_html: { "data-validate" => "presence" }
|
21
|
+
= f.input :level_of_study, placeholder: "University (Undergraduate)", input_html: { "data-validate" => "presence" }
|
22
|
+
= f.input :major, placeholder: "Major", input_html: { "data-validate" => "presence" }
|
23
|
+
= f.input :shirt_size, as: :select, collection: Questionnaire::POSSIBLE_SHIRT_SIZES, include_blank: "(select one...)", input_html: { "data-validate" => "presence" }
|
24
|
+
= f.input :gender, placeholder: "Female, Male, Non-Binary, Prefer not to say, other", input_html: { "data-validate" => "presence" }
|
25
|
+
= f.input :dietary_restrictions, placeholder: "Allergies, medical assistance, etc. (optional)", label: "Health Restrictions"
|
26
|
+
= f.input :special_needs, placeholder: "Any special needs or requests (optional)", label: "Special needs"
|
27
|
+
|
28
|
+
.form-inputs
|
29
|
+
= f.input :experience, as: :select, collection: Questionnaire::POSSIBLE_EXPERIENCES.invert, include_blank: "(select one...)", label: "Experience", input_html: { "data-validate" => "presence" }
|
30
|
+
= f.input :interest, as: :select, collection: Questionnaire::POSSIBLE_INTERESTS.invert, include_blank: "(select one...)", label: "Interest", input_html: { "data-validate" => "presence" }
|
31
|
+
|
32
|
+
= f.input :resume, as: :deletable_attachment, hint: "Must be < 2MB", input_html: { "data-validate" => "file-max-size file-content-type", "data-validate-file-max-size" => "2097152", "data-validate-file-content-type" => "application/pdf" }, label: "Resume (PDF)"
|
33
|
+
|
34
|
+
= f.input :portfolio_url, label: "Portfolio Link", placeholder:"http://mywebsite.com"
|
35
|
+
= f.input :vcs_url, label: "GitHub/BitBucket", placeholder:"https://github.com/coderit"
|
36
|
+
|
37
|
+
- travel_state = !@questionnaire.new_record? && @questionnaire.travel_not_from_school
|
38
|
+
= f.input :travel_not_from_school, as: :formatted_boolean, label: "I will not be traveling from my school"
|
39
|
+
= f.input :travel_location, input_html: { "data-validate" => "presence", disabled: !travel_state }, wrapper_html: { style: travel_state ? "" : "display: none" }, label: "Travel Location"
|
40
|
+
|
41
|
+
= f.input :can_share_info, as: :formatted_boolean, label: "Share resume with employers?"
|
42
|
+
|
43
|
+
= f.input :riding_bus, as: :formatted_boolean, label: "Riding Bus", disabled: !@questionnaire.eligible_for_a_bus?
|
44
|
+
= f.input :is_bus_captain, as: :formatted_boolean, label: "Is Bus Captain", disabled: !@questionnaire.eligible_for_a_bus?
|
45
|
+
- if !@questionnaire.eligible_for_a_bus?
|
46
|
+
%p (school not eligible for bus)
|
47
|
+
|
48
|
+
%p
|
49
|
+
Please read the
|
50
|
+
%a{href:"/assets/BrickHack_ReleaseAgreement.pdf", target:"_blank"} BrickHack Agreement
|
51
|
+
= f.input :agreement_accepted, as: :formatted_boolean, label: "I accept the BrickHack Agreement", input_html: { "data-validate" => "presence" }
|
52
|
+
|
53
|
+
%div{class:'center'}
|
54
|
+
= f.button :submit, value: ( @questionnaire.new_record? ? 'Create' : 'Save' )
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Editing Questionnaire"
|
3
|
+
|
4
|
+
= render 'form'
|
5
|
+
|
6
|
+
.form-container
|
7
|
+
.center
|
8
|
+
= link_to 'Back', manage_questionnaires_path
|
9
|
+
\|
|
10
|
+
= link_to 'Delete', manage_questionnaire_path(@questionnaire), method: :delete, data: { confirm: "Are you sure? The questionnaire and account for \"#{@questionnaire.full_name}\" will be permanently erased. This action is irreversible." }
|
11
|
+
\|
|
12
|
+
= link_to 'Show', manage_questionnaire_path(@questionnaire)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Listing Questionnaires"
|
3
|
+
|
4
|
+
- if ENV['INVITE_TO_SLACK_WHEN_ACCEPTED']
|
5
|
+
%p
|
6
|
+
%small
|
7
|
+
%span.fa.fa-warning.icon-space-r
|
8
|
+
Slack invites will be sent upon acceptance.
|
9
|
+
|
10
|
+
- if flash[:notice]
|
11
|
+
#disclaimer= flash[:notice]
|
12
|
+
|
13
|
+
%table.questionnaires.datatable.row-border.stripe.hover.order-column{ "data-source" => datatable_manage_questionnaires_path(format: :json) }
|
14
|
+
%thead
|
15
|
+
%tr
|
16
|
+
%th
|
17
|
+
- unless current_user.admin_limited_access?
|
18
|
+
%input{ type: "checkbox", name: "select_allc", value: "1", data: { bulk_row_select: "" } }
|
19
|
+
%th
|
20
|
+
%th ID
|
21
|
+
%th First name
|
22
|
+
%th Last name
|
23
|
+
%th Email
|
24
|
+
%th Status
|
25
|
+
%th Checked In
|
26
|
+
%th School
|
27
|
+
%tbody
|
28
|
+
|
29
|
+
- unless current_user.admin_limited_access?
|
30
|
+
%br
|
31
|
+
= btn_link_to 'New Questionnaire', new_manage_questionnaire_path
|
32
|
+
|
33
|
+
%h4 Bulk Action:
|
34
|
+
= simple_form_for Questionnaire.new, url: bulk_apply_manage_questionnaires_path, html: { data: { bulk_row_edit: true } } do |f|
|
35
|
+
= f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:", input_html: { data: { bulk_row_edit: true } }
|
36
|
+
= f.button :submit, value: "Update Status", data: { bulk_row_edit: true }
|
@@ -0,0 +1,63 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
- if notice
|
3
|
+
#disclaimer= notice
|
4
|
+
|
5
|
+
.container.container-half
|
6
|
+
= render partial: 'questionnaire_summary'
|
7
|
+
|
8
|
+
%p
|
9
|
+
%b Accepted Agreement:
|
10
|
+
= @questionnaire.agreement_accepted ? "Yes" : "<span style='color: red'><strong>NO</strong></span>".html_safe
|
11
|
+
|
12
|
+
.container.container-half
|
13
|
+
- unless current_user.admin_limited_access
|
14
|
+
= link_to 'Edit', edit_manage_questionnaire_path(@questionnaire)
|
15
|
+
\|
|
16
|
+
= link_to 'Convert to Admin', convert_to_admin_manage_questionnaire_path(@questionnaire), method: :patch, data: { confirm: "Are you sure? The questionnaire for \"#{@questionnaire.full_name}\" will be permanently erased. This action is irreversible." }
|
17
|
+
\|
|
18
|
+
= link_to 'Invite to Slack', invite_to_slack_manage_questionnaire_path(@questionnaire), method: :patch
|
19
|
+
\|
|
20
|
+
= link_to 'Back', manage_questionnaires_path
|
21
|
+
%hr
|
22
|
+
|
23
|
+
%p
|
24
|
+
%b Acceptance Status:
|
25
|
+
%span{class: "acc-status-#{@questionnaire.acc_status}"}
|
26
|
+
= Questionnaire::POSSIBLE_ACC_STATUS[@questionnaire.acc_status]
|
27
|
+
%p
|
28
|
+
%b Last Updated By:
|
29
|
+
= @questionnaire.acc_status_author_id ? @questionnaire.acc_status_author.email : "(no author)"
|
30
|
+
%p
|
31
|
+
%b Changed On:
|
32
|
+
= @questionnaire.acc_status_date ? @questionnaire.acc_status_date : "(no date)"
|
33
|
+
%p
|
34
|
+
%b Checked In At:
|
35
|
+
= @questionnaire.checked_in_at ? @questionnaire.checked_in_at : "(not checked in)"
|
36
|
+
%p
|
37
|
+
%b Check-in Updated By:
|
38
|
+
= @questionnaire.checked_in_by_id ? @questionnaire.checked_in_by.email : "(never checked in)"
|
39
|
+
|
40
|
+
%hr
|
41
|
+
= simple_form_for @questionnaire, url: url_for(action: "check_in", controller: "questionnaires", method: :put), html: { "data-validate" => "form" } do |f|
|
42
|
+
- if !@questionnaire.checked_in?
|
43
|
+
= f.input :agreement_accepted, as: :formatted_boolean, input_html: { "data-validate" => "presence" }
|
44
|
+
= f.input :can_share_info, as: :formatted_boolean
|
45
|
+
= f.input :phone, input_html: { "data-validate" => "presence" }
|
46
|
+
= f.input :email, placeholder: "joe@example.com", input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
47
|
+
= hidden_field_tag("check_in", !@questionnaire.checked_in?)
|
48
|
+
= f.button :submit, value: ( @questionnaire.checked_in? ? "Remove check-in" : "Check In" )
|
49
|
+
- if !@questionnaire.checked_in?
|
50
|
+
%p
|
51
|
+
%small
|
52
|
+
%i An invite to Slack will be sent upon check-in, if they haven't gotten one already.
|
53
|
+
|
54
|
+
- unless current_user.admin_limited_access?
|
55
|
+
%hr
|
56
|
+
= simple_form_for @questionnaire, url: url_for(action: "update_acc_status", controller: "questionnaires") do |f|
|
57
|
+
= f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:"
|
58
|
+
= f.button :submit, value: "Update Status"
|
59
|
+
|
60
|
+
%hr
|
61
|
+
%h4 Recent Email Events (past 10 days)
|
62
|
+
.email-events{ data: { url: message_events_manage_questionnaire_path(@questionnaire) } }
|
63
|
+
%em Email events not available at this time.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%div{class:'form-container'}
|
2
|
+
= simple_form_for @school, url: url_for(action: @school.new_record? ? "create" : "update", controller: "schools"), html: { "data-validate" => "form" } do |f|
|
3
|
+
|
4
|
+
- if f.error_notification.present?
|
5
|
+
#disclaimer
|
6
|
+
= f.error_notification
|
7
|
+
|
8
|
+
.form-inputs
|
9
|
+
= f.input :name
|
10
|
+
= f.input :address
|
11
|
+
= f.input :city
|
12
|
+
= f.input :state
|
13
|
+
= f.association :bus_list, include_blank: "(none)"
|
14
|
+
|
15
|
+
%div{class:'center'}
|
16
|
+
= f.button :submit, value: ( @school.new_record? ? 'Create' : 'Save' )
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Editing School"
|
3
|
+
|
4
|
+
= render 'form'
|
5
|
+
|
6
|
+
.form-container
|
7
|
+
.center
|
8
|
+
= link_to 'Back', manage_schools_path
|
9
|
+
\|
|
10
|
+
= link_to 'Delete', manage_school_path(@school), method: :delete, data: { confirm: 'Are you sure? This action is irreversible.' }
|
11
|
+
\|
|
12
|
+
= link_to 'Show', manage_school_path(@school)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Listing Schools"
|
3
|
+
|
4
|
+
%table.schools.datatable.row-border.stripe.hover.order-column{ "data-source" => datatable_manage_schools_path(format: :json) }
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
%th
|
8
|
+
%th ID
|
9
|
+
%th Name
|
10
|
+
%th City
|
11
|
+
%th State
|
12
|
+
%th Count
|
13
|
+
%th Bus List
|
14
|
+
%tbody
|
15
|
+
|
16
|
+
- unless current_user.admin_limited_access
|
17
|
+
%br
|
18
|
+
= btn_link_to 'New School', new_manage_school_path
|
@@ -0,0 +1,35 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Merge School"
|
3
|
+
|
4
|
+
.form-container
|
5
|
+
= simple_form_for @school, url: url_for(action: "perform_merge", controller: "schools"), html: { "data-validate" => "form" } do |f|
|
6
|
+
|
7
|
+
%p#disclaimer
|
8
|
+
%strong WARNING! This is an irreversible action!
|
9
|
+
|
10
|
+
- if f.error_notification.present?
|
11
|
+
#disclaimer
|
12
|
+
= f.error_notification
|
13
|
+
- if flash[:notice]
|
14
|
+
#disclaimer
|
15
|
+
= flash[:notice]
|
16
|
+
|
17
|
+
%p
|
18
|
+
You are going to merge
|
19
|
+
%strong= @school.full_name
|
20
|
+
into:
|
21
|
+
|
22
|
+
.form-inputs
|
23
|
+
= f.input :id, as: :school_selection, placeholder: "My University", input_html: { "data-validate" => "presence" }, label: "Merge Into:", value: ''
|
24
|
+
|
25
|
+
%p
|
26
|
+
This will rename all future applications with the
|
27
|
+
%strong= @school.full_name
|
28
|
+
school name to this new school.
|
29
|
+
|
30
|
+
%div{class:'center'}
|
31
|
+
= f.button :submit, value: 'Merge'
|
32
|
+
|
33
|
+
.form-container
|
34
|
+
.center
|
35
|
+
= link_to 'Back', manage_school_path(@school)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
%section.section{ style: "padding-left: 20px; padding-right: 20px" }
|
2
|
+
%h1.section-title= title "School"
|
3
|
+
%p#notice= notice
|
4
|
+
|
5
|
+
%p
|
6
|
+
%b Name:
|
7
|
+
= @school.name
|
8
|
+
%p
|
9
|
+
%b Address:
|
10
|
+
= @school.address || "(not provided)"
|
11
|
+
%p
|
12
|
+
%b City:
|
13
|
+
= @school.city || "(not provided)"
|
14
|
+
%p
|
15
|
+
%b State:
|
16
|
+
= @school.state || "(not provided)"
|
17
|
+
%p
|
18
|
+
%b Bus List:
|
19
|
+
= @school.bus_list ? link_to(@school.bus_list.name, manage_bus_list_path(@school.bus_list)) : '(not assigned)'
|
20
|
+
|
21
|
+
%hr
|
22
|
+
|
23
|
+
- unless current_user.admin_limited_access
|
24
|
+
= link_to 'Edit', edit_manage_school_path(@school)
|
25
|
+
\|
|
26
|
+
- unless current_user.admin_limited_access
|
27
|
+
= link_to 'Merge', merge_manage_school_path(@school)
|
28
|
+
\|
|
29
|
+
= link_to 'Back', manage_schools_path
|
30
|
+
|
31
|
+
%hr
|
32
|
+
|
33
|
+
%p
|
34
|
+
%strong Questionnaires:
|
35
|
+
%table.table
|
36
|
+
%thead
|
37
|
+
%tr
|
38
|
+
%th
|
39
|
+
%th First Name
|
40
|
+
%th Last Name
|
41
|
+
%th Email
|
42
|
+
%th Status
|
43
|
+
%th Checked In?
|
44
|
+
%tbody
|
45
|
+
- @school.questionnaires.order(:acc_status).each do |q|
|
46
|
+
%tr
|
47
|
+
%td= link_to '<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(q)
|
48
|
+
%td= q.first_name
|
49
|
+
%td= q.last_name
|
50
|
+
%td= q.email
|
51
|
+
%td= "<span class=\"acc-status-#{q.acc_status}\">#{Questionnaire::POSSIBLE_ACC_STATUS[q.acc_status]}</span>".html_safe
|
52
|
+
%td= q.checked_in? ? "Yes" : "No"
|
@@ -0,0 +1,55 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
%h1.section-title= title "Statistics & Info"
|
3
|
+
|
4
|
+
- if flash[:notice]
|
5
|
+
#disclaimer= flash[:notice]
|
6
|
+
|
7
|
+
.container.container-full
|
8
|
+
%h4.dashboard-container-title Dietary Restrictions & Special Needs
|
9
|
+
%table.stats.datatable.row-border.stripe.hover.order-column{ "data-source" => dietary_special_needs_manage_stats_path(format: :json) }
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th First name
|
13
|
+
%th Last name
|
14
|
+
%th Email
|
15
|
+
%th Phone
|
16
|
+
%th Checked In
|
17
|
+
%th Dietary Restrictions
|
18
|
+
%th Special Needs
|
19
|
+
%tbody
|
20
|
+
|
21
|
+
.container.container-full
|
22
|
+
%h4.dashboard-container-title Attendees Not Traveling From Their School
|
23
|
+
%table.stats.datatable.row-border.stripe.hover.order-column{ "data-source" => alt_travel_manage_stats_path(format: :json) }
|
24
|
+
%thead
|
25
|
+
%tr
|
26
|
+
%th Link
|
27
|
+
%th First name
|
28
|
+
%th Last name
|
29
|
+
%th Email
|
30
|
+
%th Traveling From
|
31
|
+
%th Acc Status
|
32
|
+
%tbody
|
33
|
+
|
34
|
+
.container.container-full
|
35
|
+
%h4.dashboard-container-title Attendee Info for Sponsors
|
36
|
+
%table.stats.datatable.row-border.stripe.hover.order-column{ "data-source" => sponsor_info_manage_stats_path(format: :json) }
|
37
|
+
%thead
|
38
|
+
%tr
|
39
|
+
%th First name
|
40
|
+
%th Last name
|
41
|
+
%th Email
|
42
|
+
%th Open Source Link
|
43
|
+
%th Portfolio Link
|
44
|
+
%tbody
|
45
|
+
|
46
|
+
.container.container-full
|
47
|
+
%h4.dashboard-container-title MLH Info
|
48
|
+
%table.stats.datatable.row-border.stripe.hover.order-column{ "data-source" => mlh_info_manage_stats_path(format: :json) }
|
49
|
+
%thead
|
50
|
+
%tr
|
51
|
+
%th First name
|
52
|
+
%th Last name
|
53
|
+
%th Email
|
54
|
+
%th Phone Number
|
55
|
+
%tbody
|
@@ -0,0 +1,70 @@
|
|
1
|
+
%div{class:"form-container wizard#{action_name == "new" ? " wizard-skip-valid" : ""}"}
|
2
|
+
= simple_form_for @questionnaire, url: url_for(controller: "questionnaires", action: "update"), html: { "data-validate" => "form" } do |f|
|
3
|
+
|
4
|
+
- if f.error_notification.present?
|
5
|
+
= f.error_notification
|
6
|
+
|
7
|
+
- if flash[:notice]
|
8
|
+
#disclaimer
|
9
|
+
%p= flash[:notice]
|
10
|
+
|
11
|
+
.wizard-stage.wizard-current
|
12
|
+
#disclaimer
|
13
|
+
%ul
|
14
|
+
%li Applicants must be 18 years of age by February 11th
|
15
|
+
%li RIT students must still apply
|
16
|
+
%li International applicants are welcome
|
17
|
+
|
18
|
+
.form-inputs
|
19
|
+
= f.input :first_name, placeholder: "Joe", input_html: { "data-validate" => "presence" }, autofocus: true
|
20
|
+
= f.input :last_name, placeholder: "Smith", input_html: { "data-validate" => "presence" }
|
21
|
+
= f.input :phone, placeholder: "(123) 456-7890", input_html: { "data-validate" => "presence" }
|
22
|
+
= f.input :date_of_birth, start_year: Date.today.year - 18, end_year: Date.today.year - 90, order: [:month, :day, :year], input_html: { "data-validate" => "presence" }
|
23
|
+
|
24
|
+
= f.input :school_id, as: :school_selection, placeholder: "My University", input_html: { "data-validate" => "presence" }
|
25
|
+
= f.input :level_of_study, placeholder: "University (Undergraduate)", input_html: { "data-validate" => "presence" }
|
26
|
+
= f.input :major, placeholder: "Major", input_html: { "data-validate" => "presence" }
|
27
|
+
= f.input :shirt_size, as: :select, collection: Questionnaire::POSSIBLE_SHIRT_SIZES, include_blank: "(select one...)", input_html: { "data-validate" => "presence" }
|
28
|
+
= f.input :gender, placeholder: "Female, Male, Non-Binary, Prefer not to say, other", input_html: { "data-validate" => "presence" }
|
29
|
+
= f.input :dietary_restrictions, placeholder: "Allergies, medical assistance, etc. (optional)", label: "Health restrictions"
|
30
|
+
= f.input :special_needs, placeholder: "Any special needs or requests (optional)", label: "Special needs"
|
31
|
+
|
32
|
+
.center
|
33
|
+
%button.button{ type: "button", "data-wizard" => "next" } Next
|
34
|
+
|
35
|
+
.wizard-stage
|
36
|
+
.form-inputs
|
37
|
+
= f.input :experience, as: :select, collection: Questionnaire::POSSIBLE_EXPERIENCES.invert, include_blank: "(select one...)", label: "Experience", input_html: { "data-validate" => "presence" }
|
38
|
+
= f.input :interest, as: :select, collection: Questionnaire::POSSIBLE_INTERESTS.invert, include_blank: "(select one...)", label: "Interest", input_html: { "data-validate" => "presence" }
|
39
|
+
|
40
|
+
= f.input :portfolio_url, label: "Portfolio link", placeholder:"http://mywebsite.com"
|
41
|
+
= f.input :vcs_url, label: "GitHub/Bitbucket", placeholder:"https://github.com/coderit"
|
42
|
+
= f.input :resume, as: :deletable_attachment, hint: "Must be < 2MB", input_html: { "data-validate" => "file-max-size file-content-type", "data-validate-file-max-size" => "2097152", "data-validate-file-content-type" => "application/pdf" }, label: "Resume (PDF)"
|
43
|
+
= f.input :can_share_info, as: :radio_buttons, collection: { " Yes!" => true, " No thank you" => false }, label: "Share info with sponsors?"
|
44
|
+
%p{ style: "margin-top: -10px" }
|
45
|
+
%i
|
46
|
+
%small Our sponsors would receive info such as your name, email, resume, GitHub link, etc
|
47
|
+
|
48
|
+
%hr
|
49
|
+
|
50
|
+
- travel_state = !@questionnaire.new_record? && @questionnaire.travel_not_from_school
|
51
|
+
= f.input :travel_not_from_school, as: :radio_buttons, collection: { " My School" => false, " Somewhere else" => true }, label: "I am traveling from..."
|
52
|
+
= f.input :travel_location, input_html: { "data-validate" => "presence", disabled: !travel_state }, wrapper_html: { style: travel_state ? "" : "display: none" }, label: "Where are you traveling from?", placeholder: "New York City"
|
53
|
+
%hr
|
54
|
+
%div
|
55
|
+
= f.input :agreement_accepted, as: :formatted_boolean, label: "I accept the BrickHack Agreement", input_html: { "data-validate" => "presence" }
|
56
|
+
%p
|
57
|
+
%small
|
58
|
+
Please read the
|
59
|
+
%a{ href:"http://static.mlh.io/docs/mlh-code-of-conduct.pdf", target: "_blank" }
|
60
|
+
MLH Code of Conduct
|
61
|
+
%span.fa.fa-external-link.icon-space-l-half
|
62
|
+
= f.input :code_of_conduct_accepted, as: :formatted_boolean, label: "I accept the MLH Code of Conduct", input_html: { "data-validate" => "presence" }
|
63
|
+
%p
|
64
|
+
%small
|
65
|
+
I agree to the terms of both the MLH Contest Terms and Conditions and the MLH Privacy Policy. Please note that you may receive pre and post-event informational e-mails and occasional messages about hackathons from MLH as per the MLH Privacy Policy.
|
66
|
+
= f.input :data_sharing_accepted, as: :formatted_boolean, label: "I accept the MLH data sharing notice", input_html: { "data-validate" => "presence" }
|
67
|
+
|
68
|
+
%div{class:'center'}
|
69
|
+
%button.button{ type: "button", "data-wizard" => "previous" } Previous
|
70
|
+
= f.button :submit, value: ( @questionnaire.new_record? ? 'Apply' : 'Save' )
|
@@ -0,0 +1,30 @@
|
|
1
|
+
- title "Application"
|
2
|
+
%div{class:'form-success'}
|
3
|
+
%div{class:'success_message'}
|
4
|
+
%p#notice= notice
|
5
|
+
- if @questionnaire.can_rsvp?
|
6
|
+
- if @questionnaire.did_rsvp?
|
7
|
+
%p
|
8
|
+
Below is a copy of your information for BrickHack.
|
9
|
+
= link_to "Back to RSVP page »".html_safe, rsvp_path
|
10
|
+
- else
|
11
|
+
%p
|
12
|
+
You have not RSVP'd yet!
|
13
|
+
%br
|
14
|
+
%br
|
15
|
+
= link_to "RSVP NOW »".html_safe, rsvp_path
|
16
|
+
- else
|
17
|
+
- if Rails.configuration.hackathon['registration_is_open']
|
18
|
+
%p Thanks for applying! You will be notified of your acceptance via email.
|
19
|
+
- else
|
20
|
+
%p Thanks for applying!
|
21
|
+
|
22
|
+
%div{class:'participant_info'}
|
23
|
+
%p Below is a copy of your application.
|
24
|
+
|
25
|
+
= render partial: 'questionnaire_summary'
|
26
|
+
|
27
|
+
%p
|
28
|
+
= btn_link_to '<span class="fa fa-pencil icon-space-r"></span> Edit Application'.html_safe, edit_questionnaires_path
|
29
|
+
%p
|
30
|
+
Unhappy? #{link_to "Revoke my application", user_registration_path, data: { confirm: "Are you sure? Your account and application will be permanently erased." }, method: :delete}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
%section.section.manage
|
2
|
+
- title "RSVP"
|
3
|
+
%h1.section-title RSVP for BrickHack
|
4
|
+
.form-container
|
5
|
+
#disclaimer
|
6
|
+
- if flash[:notice]
|
7
|
+
= flash[:notice]
|
8
|
+
%br
|
9
|
+
%br
|
10
|
+
- if @questionnaire.acc_status == "rsvp_confirmed" || @questionnaire.checked_in?
|
11
|
+
.fa.fa-check
|
12
|
+
Congratulations! You're all set to attend BrickHack!
|
13
|
+
%br
|
14
|
+
%br
|
15
|
+
Expect an email closer to February 11th with additional logistics & travel info.
|
16
|
+
- elsif @questionnaire.acc_status == "rsvp_denied"
|
17
|
+
Sorry to hear you won't be with us this year.
|
18
|
+
- else
|
19
|
+
You've been accepted to BrickHack! Will you be attending?
|
20
|
+
= simple_form_for @questionnaire, url: url_for(controller: "rsvps", action: "update"), html: { "data-validate" => "form" } do |f|
|
21
|
+
.form-inputs
|
22
|
+
= f.input :acc_status, as: :radio_buttons, collection: { " Attending" => "rsvp_confirmed", " Not Attending" => "rsvp_denied" }, label: "RSVP Status:"
|
23
|
+
|
24
|
+
.hide-if-not-attending{ style: @questionnaire.acc_status == "rsvp_denied" ? "display: none;" : "" }
|
25
|
+
= f.input :phone, input_html: { "data-validate" => "presence" }, label: "Verify Phone #:"
|
26
|
+
|
27
|
+
.hide-if-not-attending{ style: @questionnaire.acc_status == "rsvp_denied" ? "display: none;" : "" }
|
28
|
+
- if @questionnaire.eligible_for_a_bus?
|
29
|
+
- if !@questionnaire.riding_bus && @questionnaire.bus_list.full?
|
30
|
+
#disclaimer
|
31
|
+
Aw, shucks. Your school is eligible for a bus to BrickHack, but all the seats are currently taken.
|
32
|
+
- else
|
33
|
+
#disclaimer
|
34
|
+
- if @questionnaire.riding_bus && @questionnaire.acc_status != "rsvp_denied"
|
35
|
+
.fa.fa-check
|
36
|
+
You're all set to ride the bus.
|
37
|
+
- if @questionnaire.bus_list.full?
|
38
|
+
%br
|
39
|
+
%br
|
40
|
+
.fa.fa-warning
|
41
|
+
Your bus is currently full. If you are no longer riding, please update your status so someone else may use it.
|
42
|
+
- else
|
43
|
+
Good news! Your school is eligible for a bus to BrickHack! Will you be riding on the bus?
|
44
|
+
|
45
|
+
= f.input :riding_bus, as: :radio_buttons, collection: { " Yes!" => true, " No thank you" => false }, label: "Riding the bus:"
|
46
|
+
%p You MUST sign up here if you wish to ride the bus! IDs will be checked at boarding.
|
47
|
+
- if @questionnaire.bus_list.needs_bus_captain
|
48
|
+
%p We're also looking for bus captains from your school. Are you interested?
|
49
|
+
= f.input :bus_captain_interest, as: :radio_buttons, collection: { " Yes!" => true, " No thank you" => false }, label: "Bus capain interest:"
|
50
|
+
|
51
|
+
= render partial: 'bus_list_info', locals: { bus_list: @questionnaire.bus_list }
|
52
|
+
|
53
|
+
- else
|
54
|
+
= f.input :riding_bus, as: :hidden, value: false
|
55
|
+
|
56
|
+
.center
|
57
|
+
= btn_link_to "Edit Application", edit_questionnaires_path
|
58
|
+
= f.button :submit, value: "Update"
|
59
|
+
%br
|
60
|
+
- if @questionnaire.eligible_for_a_bus? && @questionnaire.is_bus_captain?
|
61
|
+
%p= link_to "Manage Bus List »".html_safe, bus_list_path
|
@@ -0,0 +1,86 @@
|
|
1
|
+
class BulkMessageWorker
|
2
|
+
include Sidekiq::Worker
|
3
|
+
|
4
|
+
def perform(message_id)
|
5
|
+
message = Message.find(message_id)
|
6
|
+
return unless message.present? && message.status == "queued"
|
7
|
+
message.update_attribute(:started_at, Time.now)
|
8
|
+
|
9
|
+
recipients = build_recipients(message.recipients)
|
10
|
+
|
11
|
+
recipients.each do |recipient|
|
12
|
+
Mailer.delay.bulk_message_email(message.id, recipient)
|
13
|
+
end
|
14
|
+
|
15
|
+
message.update_attribute(:delivered_at, Time.now)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def build_recipients(recipient_types)
|
21
|
+
recipients = Set.new
|
22
|
+
recipient_types.each do |type|
|
23
|
+
recipients += recipients_query(type)
|
24
|
+
end
|
25
|
+
recipients
|
26
|
+
end
|
27
|
+
|
28
|
+
def recipients_query(type)
|
29
|
+
case type
|
30
|
+
when "all"
|
31
|
+
User.where(admin: false).pluck(:id)
|
32
|
+
when "incomplete"
|
33
|
+
User.where(admin: false).pluck(:id) - Questionnaire.pluck(:user_id)
|
34
|
+
when "complete"
|
35
|
+
Questionnaire.pluck(:user_id)
|
36
|
+
when "accepted"
|
37
|
+
Questionnaire.where(acc_status: "accepted").pluck(:user_id)
|
38
|
+
when "denied"
|
39
|
+
Questionnaire.where(acc_status: "denied").pluck(:user_id)
|
40
|
+
when "waitlisted"
|
41
|
+
Questionnaire.where(acc_status: "waitlist").pluck(:user_id)
|
42
|
+
when "late-waitlisted"
|
43
|
+
Questionnaire.where(acc_status: "late_waitlist").pluck(:user_id)
|
44
|
+
when "rsvp-confirmed"
|
45
|
+
Questionnaire.where(acc_status: "rsvp_confirmed").pluck(:user_id)
|
46
|
+
when "rsvp-denied"
|
47
|
+
Questionnaire.where(acc_status: "rsvp_denied").pluck(:user_id)
|
48
|
+
when "checked-in"
|
49
|
+
Questionnaire.where("checked_in_at IS NOT NULL").pluck(:user_id)
|
50
|
+
when "non-checked-in"
|
51
|
+
Questionnaire.where("(acc_status = 'accepted' OR acc_status = 'accepted' OR acc_status = 'rsvp_denied') AND checked_in_at IS NULL").pluck(:user_id)
|
52
|
+
when "bus-list-cornell-bing"
|
53
|
+
BusList.find(1).passengers.pluck(:user_id)
|
54
|
+
when "bus-list-buffalo"
|
55
|
+
BusList.find(2).passengers.pluck(:user_id)
|
56
|
+
when "bus-list-albany"
|
57
|
+
BusList.find(3).passengers.pluck(:user_id)
|
58
|
+
when "bus-list-cornell-bing-eligible"
|
59
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 1 AND riding_bus != 1) AND (acc_status = 'accepted' OR acc_status = 'rsvp_confirmed')").pluck(:user_id)
|
60
|
+
when "bus-list-buffalo-eligible"
|
61
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 2 AND riding_bus != 1) AND (acc_status = 'accepted' OR acc_status = 'rsvp_confirmed')").pluck(:user_id)
|
62
|
+
when "bus-list-albany-eligible"
|
63
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 3 AND riding_bus != 1) AND (acc_status = 'accepted' OR acc_status = 'rsvp_confirmed')").pluck(:user_id)
|
64
|
+
when "bus-list-cornell-bing-applied"
|
65
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 1) AND (acc_status != 'accepted' AND acc_status != 'rsvp_confirmed' AND acc_status != 'rsvp_denied')").pluck(:user_id)
|
66
|
+
when "bus-list-buffalo-applied"
|
67
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 2) AND (acc_status != 'accepted' AND acc_status != 'rsvp_confirmed' AND acc_status != 'rsvp_denied')").pluck(:user_id)
|
68
|
+
when "bus-list-albany-applied"
|
69
|
+
Questionnaire.joins(:school).where("(schools.bus_list_id = 3) AND (acc_status != 'accepted' AND acc_status != 'rsvp_confirmed' AND acc_status != 'rsvp_denied')").pluck(:user_id)
|
70
|
+
when "school-rit"
|
71
|
+
Questionnaire.where("school_id = 2304 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
72
|
+
when "school-cornell"
|
73
|
+
Questionnaire.where("school_id = 2164 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
74
|
+
when "school-binghamton"
|
75
|
+
Questionnaire.where("school_id = 5526 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
76
|
+
when "school-buffalo"
|
77
|
+
Questionnaire.where("school_id = 2345 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
78
|
+
when "school-waterloo"
|
79
|
+
Questionnaire.where("school_id = 5580 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
80
|
+
when "school-toronto"
|
81
|
+
Questionnaire.where("school_id = 5539 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
82
|
+
when "school-umd-collegepark"
|
83
|
+
Questionnaire.where("school_id = 5543 AND (acc_status = \"rsvp_confirmed\" OR acc_status = \"accepted\")").pluck(:user_id)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|