Skip to content

Commit

Permalink
Merge branch '2.0' into hm-242
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaudouinjr authored Sep 12, 2020
2 parents 2ab8865 + a767446 commit c3d44f0
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 29 deletions.
41 changes: 24 additions & 17 deletions app/controllers/rsvps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,8 @@ def update
return
end

@questionnaire.acc_status_date = Time.now if @questionnaire.acc_status != params[:questionnaire][:acc_status]
@questionnaire.acc_status = params[:questionnaire][:acc_status]
@questionnaire.acc_status_author_id = current_user.id

new_bus_list_id = params[:questionnaire][:bus_list_id].presence
new_bus_list = new_bus_list_id && BusList.find(new_bus_list_id)
is_joining_bus = new_bus_list.present? && @questionnaire.bus_list != new_bus_list
if is_joining_bus && new_bus_list.full?
if @questionnaire.bus_list_id?
flash[:alert] = "Sorry, that bus is full. You are still signed up for the '#{@questionnaire.bus_list.name}' bus."
else
flash[:alert] = "Sorry, that bus is full. You may need to arrange other plans for transportation."
end
else
@questionnaire.bus_list = new_bus_list
@questionnaire.bus_captain_interest = params[:questionnaire][:bus_captain_interest]
end
update_acc_status
update_bus_list

unless @questionnaire.save
flash[:alert] = @questionnaire.errors.full_message.join(", ")
Expand All @@ -91,6 +76,28 @@ def update

private

def update_acc_status
@questionnaire.acc_status_date = Time.now if @questionnaire.acc_status != params[:questionnaire][:acc_status]
@questionnaire.acc_status = params[:questionnaire][:acc_status]
@questionnaire.acc_status_author_id = current_user.id
end

def update_bus_list
new_bus_list_id = params[:questionnaire][:bus_list_id].presence
new_bus_list = new_bus_list_id && BusList.find(new_bus_list_id)
is_joining_bus = new_bus_list.present? && @questionnaire.bus_list != new_bus_list
if is_joining_bus && new_bus_list.full?
if @questionnaire.bus_list_id?
flash[:alert] = "Sorry, that bus is full. You are still signed up for the '#{@questionnaire.bus_list.name}' bus."
else
flash[:alert] = "Sorry, that bus is full. You may need to arrange other plans for transportation."
end
else
@questionnaire.bus_list = new_bus_list
@questionnaire.bus_captain_interest = params[:questionnaire][:bus_captain_interest]
end
end

def rsvp_error_notice
hackathon_name = HackathonConfig['name']
"There was an error submitting your response, please check over your application and try again. Did you accept the #{hackathon_name} Agreement?"
Expand Down
8 changes: 0 additions & 8 deletions db/seed_messages/questionnaire--denied.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!--
IMPLEMENT THIS!
You'll probably want something along the lines of:
### Dear {{first_name}},

It is with our sincerest regret to inform you that our admissions committee has chosen to not accept your application to {{hackathon_name}} at this time. We were overjoyed with the number of applicants we received, but unfortunately we can not accept everyone.
Expand All @@ -12,5 +6,3 @@ We invite you to apply again next year. There are plenty of other hackathons thi

Thank you for applying,<br>
- The {{hackathon_name}} Team
-->
8 changes: 5 additions & 3 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Be sure to review all of these before going live!

Various settings are available at http://your-site/manage/configs - be sure to review all of them!

## Emails
## Default Messages

Default automated emails are loaded into http://your-site/manage/messages.
Default automated Messages (or emails) are loaded into http://your-site/manage/messages. Please note some of the default Messages supplied are **awaiting content to be entered**. It is critical that all default Messages be reviewed to fit the needs of a particular hackathon.

The default email layout/template can also be customized if desired. Scroll to the bottom of http://your-site/manage/messages to customize.
The default Message layout/template can also be customized if desired. Scroll to the bottom of http://your-site/manage/messages to customize.

To learn more about Messages and its capabilities, review the [Messages Guide](messages).

## Styling

Expand Down
15 changes: 15 additions & 0 deletions docs/getting-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: resources
title: Resources
---

The HackathonManager community is here to help. While these docs are very much a work in progress, a lot of effort has gone into making HackathonManager as simple as possible to setup. If additional help is needed, resources can be found on this page. There is a large community of developers who want to see HackathonManager succeed so all questions are welcomed!

> See an area in the docs we can improve on? Click the `EDIT` button on any page and open a pull request with the changes! Feedback from the community on our docs is **greatly appreciated**.
## codeRIT Engineering
While outside development and collaboration on HackathonManager is much encouraged and appreciated, codeRIT oversees the development of the project.

[Email codeRIT](mailto:engineering@coderit.org) - Send the codeRIT Engineering team an email with any questions or issues!

> RIT organization using HackathonManager? We have a Slack for members of the RIT community! Ping codeRIT Engineering in #engineering at slack.coderit.org
3 changes: 2 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"updating-hm"
],
"Guides": ["running-a-hackathon", "questionnaires", "messages", "busses"],
"Development": ["api"]
"Development": ["api"],
"Getting Help": ["resources"]
}
}

0 comments on commit c3d44f0

Please sign in to comment.