hackathon_manager 0.13.5 → 0.13.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +57 -47
- data/app/controllers/manage/checkins_controller.rb +23 -0
- data/app/controllers/manage/questionnaires_controller.rb +6 -3
- data/app/controllers/manage/trackable_tags_controller.rb +1 -1
- data/app/datatables/checkin_datatable.rb +39 -0
- data/app/models/questionnaire.rb +3 -1
- data/app/models/trackable_event.rb +1 -0
- data/app/views/layouts/manage/application.html.haml +4 -0
- data/app/views/manage/checkins/index.html.haml +12 -0
- data/app/views/manage/checkins/show.html.haml +59 -0
- data/app/views/manage/questionnaires/_checkin_card.html.haml +24 -0
- data/app/views/manage/questionnaires/_checkin_compliance_card.html.haml +44 -0
- data/app/views/manage/questionnaires/_overview.html.haml +2 -50
- data/app/views/manage/questionnaires/_top_alerts.html.haml +10 -0
- data/app/views/manage/questionnaires/show.html.haml +16 -1
- data/app/views/manage/trackable_tags/_form.html.haml +1 -0
- data/app/views/manage/trackable_tags/index.html.haml +6 -0
- data/app/views/manage/trackable_tags/show.html.haml +7 -0
- data/app/views/rsvps/show.html.haml +1 -1
- data/config/routes.rb +3 -0
- data/db/migrate/20190213233902_add_prevent_duplicate_band_events_to_trackable_tags.rb +5 -0
- data/lib/hackathon_manager/version.rb +1 -1
- data/test/factories/trackable_tag.rb +1 -0
- metadata +10 -3
- data/app/views/manage/questionnaires/_checkin.html.haml +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50c74dea6f853d5ea2620cc7210cc46a3b28fb805fd8dfabe3803be0a0f6e1e
|
4
|
+
data.tar.gz: 9d682aa4ac8e3ee8c9505614e7299844860b1af9ed7354cdd7d4367ffb6a7b95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1def16072afb2f8839f36cec90c0cc1a4a29d15dbb7ba790d6937d019ea25b32d6a739d3c9ad47435df177289ad51af9ebc529048b73098db20be8ff7728601
|
7
|
+
data.tar.gz: b66ee556952f3e49ce9b0475d531b651b47490c0e1cdb4a6cb1ec123b97ca1f99396dc61787415e0d761c2f90dd553b3a8e149c3c3b8164db64ccfc2a486a9fc
|
@@ -1,63 +1,73 @@
|
|
1
1
|
var setupDataTables = function() {
|
2
|
+
window.questionnairesDataTable = $(".datatable.questionnaires").DataTable({
|
3
|
+
order: [3, "desc"],
|
4
|
+
columns: [
|
5
|
+
{ orderable: false, data: "bulk" },
|
6
|
+
{ orderable: false, data: "link" },
|
7
|
+
{ orderable: false, data: "note" },
|
8
|
+
{ orderable: true, data: "id", visible: false },
|
9
|
+
{ orderable: true, data: "first_name" },
|
10
|
+
{ orderable: true, data: "last_name" },
|
11
|
+
{ orderable: true, data: "email", visible: false },
|
12
|
+
{ orderable: true, data: "phone", visible: false },
|
13
|
+
{ orderable: true, data: "gender", visible: false },
|
14
|
+
{ orderable: true, data: "date_of_birth", visible: false },
|
15
|
+
{ orderable: true, data: "acc_status" },
|
16
|
+
{ orderable: true, data: "checked_in" },
|
17
|
+
{ orderable: true, data: "school" },
|
18
|
+
{ orderable: true, data: "created_at" },
|
19
|
+
{ orderable: true, data: "dietary_restrictions", visible: false },
|
20
|
+
{ orderable: true, data: "special_needs", visible: false }
|
21
|
+
]
|
22
|
+
});
|
2
23
|
|
3
|
-
|
4
|
-
order
|
5
|
-
columns
|
6
|
-
{ orderable:
|
7
|
-
{ orderable:
|
8
|
-
{ orderable: false, data:
|
9
|
-
{ orderable: true, data:
|
10
|
-
{ orderable:
|
11
|
-
{ orderable: true, data: 'last_name' },
|
12
|
-
{ orderable: true, data: 'email', visible: false },
|
13
|
-
{ orderable: true, data: 'phone', visible: false },
|
14
|
-
{ orderable: true, data: 'gender', visible: false },
|
15
|
-
{ orderable: true, data: 'date_of_birth', visible: false },
|
16
|
-
{ orderable: true, data: 'acc_status' },
|
17
|
-
{ orderable: true, data: 'checked_in' },
|
18
|
-
{ orderable: true, data: 'school' },
|
19
|
-
{ orderable: true, data: 'created_at' },
|
20
|
-
{ orderable: true, data: 'dietary_restrictions', visible: false },
|
21
|
-
{ orderable: true, data: 'special_needs', visible: false },
|
24
|
+
$(".datatable.checkins").DataTable({
|
25
|
+
order: [1, "asc"],
|
26
|
+
columns: [
|
27
|
+
{ orderable: true, data: "first_name", visible: false },
|
28
|
+
{ orderable: true, data: "last_name", visible: false },
|
29
|
+
{ orderable: false, data: "about" },
|
30
|
+
{ orderable: true, data: "checked_in" },
|
31
|
+
{ orderable: false, data: "actions" }
|
22
32
|
]
|
23
33
|
});
|
24
34
|
|
25
|
-
$(
|
26
|
-
order
|
27
|
-
columns
|
28
|
-
{ orderable: true, data:
|
29
|
-
{ orderable: true, data:
|
30
|
-
{ orderable: true, data:
|
31
|
-
{ orderable: true, data:
|
35
|
+
$(".datatable.users").DataTable({
|
36
|
+
order: [1, "asc"],
|
37
|
+
columns: [
|
38
|
+
{ orderable: true, data: "id", visible: false },
|
39
|
+
{ orderable: true, data: "email" },
|
40
|
+
{ orderable: true, data: "role" },
|
41
|
+
{ orderable: true, data: "created_at" }
|
32
42
|
]
|
33
43
|
});
|
34
44
|
|
35
|
-
$(
|
36
|
-
order
|
37
|
-
columns
|
38
|
-
{ orderable: true, data:
|
39
|
-
{ orderable: true, data:
|
40
|
-
{ orderable: true, data:
|
41
|
-
{ orderable: false, data:
|
42
|
-
{ orderable: true, data:
|
43
|
-
{ orderable: true, data:
|
44
|
-
{ orderable: true, data:
|
45
|
+
$(".datatable.bulk-messages").DataTable({
|
46
|
+
order: [4, "desc"],
|
47
|
+
columns: [
|
48
|
+
{ orderable: true, data: "id", visible: false },
|
49
|
+
{ orderable: true, data: "name" },
|
50
|
+
{ orderable: true, data: "subject" },
|
51
|
+
{ orderable: false, data: "status" },
|
52
|
+
{ orderable: true, data: "created_at" },
|
53
|
+
{ orderable: true, data: "updated_at", visible: false },
|
54
|
+
{ orderable: true, data: "delivered_at" }
|
45
55
|
]
|
46
56
|
});
|
47
57
|
|
48
|
-
$(
|
49
|
-
order
|
50
|
-
columns
|
51
|
-
{ orderable: true, data:
|
52
|
-
{ orderable: true, data:
|
53
|
-
{ orderable: true, data:
|
54
|
-
{ orderable: true, data:
|
55
|
-
{ orderable: true, data:
|
58
|
+
$(".datatable.schools").DataTable({
|
59
|
+
order: [4, "desc"],
|
60
|
+
columns: [
|
61
|
+
{ orderable: true, data: "id", visible: false },
|
62
|
+
{ orderable: true, data: "name" },
|
63
|
+
{ orderable: true, data: "city" },
|
64
|
+
{ orderable: true, data: "state" },
|
65
|
+
{ orderable: true, data: "questionnaire_count" }
|
56
66
|
]
|
57
67
|
});
|
58
68
|
|
59
|
-
$(
|
60
|
-
processing
|
61
|
-
serverSide
|
69
|
+
$(".datatable.stats").DataTable({
|
70
|
+
processing: false,
|
71
|
+
serverSide: false
|
62
72
|
});
|
63
73
|
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Manage::CheckinsController < Manage::ApplicationController
|
2
|
+
before_action :set_questionnaire, only: [:show]
|
3
|
+
|
4
|
+
respond_to :html, :json
|
5
|
+
|
6
|
+
def index
|
7
|
+
respond_with(:manage, Questionnaire.all)
|
8
|
+
end
|
9
|
+
|
10
|
+
def datatable
|
11
|
+
render json: CheckinDatatable.new(view_context)
|
12
|
+
end
|
13
|
+
|
14
|
+
def show
|
15
|
+
respond_with(:manage, @questionnaire)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def set_questionnaire
|
21
|
+
@questionnaire = ::Questionnaire.find(params[:id])
|
22
|
+
end
|
23
|
+
end
|
@@ -57,6 +57,9 @@ class Manage::QuestionnairesController < Manage::ApplicationController
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def check_in
|
60
|
+
redirect_to_checkins = params[:redirect_to_checkins] || false
|
61
|
+
show_redirect_path = redirect_to_checkins ? manage_checkin_path(@questionnaire) : manage_questionnaire_path(@questionnaire)
|
62
|
+
index_redirect_path = redirect_to_checkins ? manage_checkins_path : manage_questionnaires_path
|
60
63
|
if params[:check_in] == "true"
|
61
64
|
if params[:questionnaire]
|
62
65
|
q_params = params.require(:questionnaire).permit(:agreement_accepted, :phone, :can_share_info, :email)
|
@@ -66,7 +69,7 @@ class Manage::QuestionnairesController < Manage::ApplicationController
|
|
66
69
|
end
|
67
70
|
unless @questionnaire.valid?
|
68
71
|
flash[:notice] = @questionnaire.errors.full_messages.join(", ")
|
69
|
-
redirect_to
|
72
|
+
redirect_to show_redirect_path
|
70
73
|
return
|
71
74
|
end
|
72
75
|
@questionnaire.update_attribute(:checked_in_at, Time.now)
|
@@ -78,10 +81,10 @@ class Manage::QuestionnairesController < Manage::ApplicationController
|
|
78
81
|
flash[:notice] = "#{@questionnaire.full_name} no longer checked in."
|
79
82
|
else
|
80
83
|
flash[:notice] = "No check-in action provided!"
|
81
|
-
redirect_to
|
84
|
+
redirect_to show_redirect_path
|
82
85
|
return
|
83
86
|
end
|
84
|
-
redirect_to
|
87
|
+
redirect_to index_redirect_path
|
85
88
|
end
|
86
89
|
|
87
90
|
def convert_to_admin
|
@@ -65,6 +65,6 @@ class Manage::TrackableTagsController < Manage::ApplicationController
|
|
65
65
|
|
66
66
|
# Only allow a trusted parameter "white list" through.
|
67
67
|
def trackable_tag_params
|
68
|
-
params.require(:trackable_tag).permit(:name)
|
68
|
+
params.require(:trackable_tag).permit(:name, :allow_duplicate_band_events)
|
69
69
|
end
|
70
70
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class CheckinDatatable < AjaxDatatablesRails::Base
|
2
|
+
def_delegators :@view, :link_to, :manage_checkin_path, :display_datetime, :bold
|
3
|
+
|
4
|
+
def view_columns
|
5
|
+
@view_columns ||= {
|
6
|
+
first_name: { source: 'Questionnaire.first_name' },
|
7
|
+
last_name: { source: 'Questionnaire.last_name' },
|
8
|
+
checked_in: { source: 'Questionnaire.checked_in_at', searchable: false },
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def about(record)
|
15
|
+
output = ''
|
16
|
+
output += [record.first_name, record.last_name].join(' ') + ' '
|
17
|
+
output += '<span class="badge badge-warning"><i class="fa fa-exclamation-triangle icon-space-r"></i>Minor</span>' if record.minor?
|
18
|
+
output += '<br /><small>' + record.school.name + '</small>'
|
19
|
+
output.html_safe
|
20
|
+
end
|
21
|
+
|
22
|
+
def data
|
23
|
+
records.map do |record|
|
24
|
+
{
|
25
|
+
first_name: record.first_name,
|
26
|
+
last_name: record.last_name,
|
27
|
+
about: about(record),
|
28
|
+
checked_in: record.checked_in? ? "<span class=\"text-success\">Yes</span>".html_safe : 'No',
|
29
|
+
actions: "<a class=\"btn btn-primary btn-sm\" href=\"#{manage_checkin_path(record)}\">View</a>".html_safe
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# rubocop:disable Naming/AccessorMethodName
|
35
|
+
def get_raw_records
|
36
|
+
Questionnaire.includes(:user, :school).references(:user, :school)
|
37
|
+
end
|
38
|
+
# rubocop:enable Naming/AccessorMethodName
|
39
|
+
end
|
data/app/models/questionnaire.rb
CHANGED
@@ -204,8 +204,10 @@ class Questionnaire < ApplicationRecord
|
|
204
204
|
"Accepted & Attending"
|
205
205
|
elsif acc_status == "accepted"
|
206
206
|
"Accepted, Awaiting RSVP"
|
207
|
-
elsif
|
207
|
+
elsif acc_status == "pending"
|
208
208
|
"Pending Review"
|
209
|
+
elsif ["waitlist", "late_waitlist"].include? acc_status
|
210
|
+
"Waitlisted"
|
209
211
|
elsif acc_status == "denied"
|
210
212
|
"Denied"
|
211
213
|
end
|
@@ -35,6 +35,10 @@
|
|
35
35
|
= active_link_to manage_questionnaires_path, class: "nav-link" do
|
36
36
|
.fa.fa-inbox.fa-fw.icon-space-r-half
|
37
37
|
Questionnaires
|
38
|
+
%li.nav-item
|
39
|
+
= active_link_to manage_checkins_path, class: "nav-link" do
|
40
|
+
.fa.fa-drivers-license-o.fa-fw.icon-space-r-half
|
41
|
+
Check-in
|
38
42
|
%li.nav-item
|
39
43
|
= active_link_to manage_admins_path, class: "nav-link" do
|
40
44
|
.fa.fa-users.fa-fw.icon-space-r-half
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= render "layouts/manage/page_title", title: "Check-in"
|
2
|
+
|
3
|
+
%div
|
4
|
+
%table.checkins.datatable.table.table-striped.table-hover{ "data-source" => datatable_manage_checkins_path(format: :json) }
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
%th First name
|
8
|
+
%th Last name
|
9
|
+
%th About
|
10
|
+
%th In?
|
11
|
+
%th Actions
|
12
|
+
%tbody
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
|
2
|
+
.d-flex.align-items-center.flex-wrap
|
3
|
+
%h1.h2.mr-3
|
4
|
+
= title @questionnaire.full_name
|
5
|
+
%div
|
6
|
+
%span.mr-1
|
7
|
+
= render 'manage/questionnaires/acc_status_badge'
|
8
|
+
%span
|
9
|
+
= render 'manage/questionnaires/check_in_badge'
|
10
|
+
|
11
|
+
.btn-group{role: "group"}
|
12
|
+
= link_to 'View Full', manage_questionnaire_path(@questionnaire), class: 'btn btn-sm btn-outline-secondary'
|
13
|
+
|
14
|
+
.row
|
15
|
+
.col-md-6
|
16
|
+
= render 'manage/questionnaires/top_alerts'
|
17
|
+
.card.mb-3
|
18
|
+
.card-header Summary
|
19
|
+
.card-body
|
20
|
+
.row
|
21
|
+
%dt.col-md-4 Name
|
22
|
+
%dd.col-md-8= @questionnaire.full_name
|
23
|
+
%dt.col-md-4 School
|
24
|
+
%dd.col-md-8
|
25
|
+
- school = @questionnaire.school
|
26
|
+
= link_to school.name, manage_school_path(school)
|
27
|
+
%dt.col-md-4 Email
|
28
|
+
%dd.col-md-8= @questionnaire.email
|
29
|
+
%dt.col-md-4 Phone
|
30
|
+
%dd.col-md-8= @questionnaire.phone
|
31
|
+
%dt.col-md-4 Date of birth
|
32
|
+
%dd.col-md-8
|
33
|
+
= @questionnaire.date_of_birth_formatted
|
34
|
+
%span.badge.badge-pill.badge-dark{"data-container" => "body", "data-toggle" => "popover", "data-placement" => "right", "data-content" => "Age at time of event", "data-trigger" => "hover"}
|
35
|
+
= @questionnaire.age_at_time_of_event / 1.year
|
36
|
+
|
37
|
+
= render 'manage/questionnaires/checkin_compliance_card'
|
38
|
+
|
39
|
+
.card.mb-3
|
40
|
+
.card-header Special notices
|
41
|
+
.card-body
|
42
|
+
.row
|
43
|
+
%dt.col-md-4 Dietary restrictions
|
44
|
+
%dd.col-md-8
|
45
|
+
- if @questionnaire.dietary_restrictions.present?
|
46
|
+
%span.fa.fa-exclamation-triangle.text-warning.icon-space-r-half
|
47
|
+
= @questionnaire.dietary_restrictions
|
48
|
+
- else
|
49
|
+
%span.text-muted (none)
|
50
|
+
%dt.col-md-4 Special needs
|
51
|
+
%dd.col-md-8
|
52
|
+
- if @questionnaire.special_needs.present?
|
53
|
+
%span.fa.fa-exclamation-triangle.text-warning.icon-space-r-half
|
54
|
+
= @questionnaire.special_needs
|
55
|
+
- else
|
56
|
+
%span.text-muted (none)
|
57
|
+
|
58
|
+
.col-md-6
|
59
|
+
= render 'manage/questionnaires/checkin_card', redirect_to_checkins: true
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.card.mb-3
|
2
|
+
.card-body
|
3
|
+
%h5.card-title.mb-1 Check-in
|
4
|
+
%p.card-text
|
5
|
+
= render 'manage/questionnaires/check_in_badge'
|
6
|
+
- if @questionnaire.checked_in_at
|
7
|
+
%small
|
8
|
+
= @questionnaire.checked_in_by_id ? @questionnaire.checked_in_by.email : "(never checked in)"
|
9
|
+
= @questionnaire.checked_in_at ? display_datetime(@questionnaire.checked_in_at, in_sentence: true) : "(not checked in)"
|
10
|
+
- if !@questionnaire.checked_in_at
|
11
|
+
%p.card-text
|
12
|
+
Please confirm their phone number and email address before checking in.
|
13
|
+
- if !@questionnaire.can_rsvp?
|
14
|
+
%br
|
15
|
+
%span.text-danger
|
16
|
+
Note: This applicant has not been accepted.
|
17
|
+
= bs_horizontal_simple_form_for @questionnaire, url: url_for(action: "check_in", controller: "questionnaires", method: :put), html: { "data-validate" => "form" } do |f|
|
18
|
+
- if !@questionnaire.checked_in?
|
19
|
+
= f.input :phone, input_html: { "data-validate" => "presence" }
|
20
|
+
= f.input :email, input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
21
|
+
= hidden_field_tag("check_in", !@questionnaire.checked_in?)
|
22
|
+
- if defined?(redirect_to_checkins) && redirect_to_checkins
|
23
|
+
= hidden_field_tag("redirect_to_checkins", "1")
|
24
|
+
= f.button :submit, value: ( @questionnaire.checked_in? ? "Remove check-in" : "Check In" ), class: 'btn-primary'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
.card.mb-3
|
2
|
+
.card-header Check-in Compliance
|
3
|
+
.card-body.px-0.py-0
|
4
|
+
%ul.list-group.list-group-flush
|
5
|
+
- if ['rsvp_confirmed', 'accepted'].include?(@questionnaire.acc_status)
|
6
|
+
%li.list-group-item
|
7
|
+
.text-success
|
8
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
9
|
+
Has been accepted
|
10
|
+
- else
|
11
|
+
%li.list-group-item.list-group-item-danger
|
12
|
+
%span.fa.fa-exclamation-circle.fa-fw.icon-space-r
|
13
|
+
Has not been accepted.
|
14
|
+
Status:
|
15
|
+
%strong= @questionnaire.verbal_status
|
16
|
+
- if 'rsvp_confirmed' == @questionnaire.acc_status
|
17
|
+
%li.list-group-item
|
18
|
+
.text-success
|
19
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
20
|
+
RSVP'd as attending
|
21
|
+
- else
|
22
|
+
%li.list-group-item.list-group-item-warning
|
23
|
+
%span.fa.fa-exclamation-circle.fa-fw.icon-space-r
|
24
|
+
Did not RSVP as attending.
|
25
|
+
Status:
|
26
|
+
%strong= @questionnaire.verbal_status
|
27
|
+
- if !@questionnaire.minor?
|
28
|
+
%li.list-group-item
|
29
|
+
.text-success
|
30
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
31
|
+
18 years or older
|
32
|
+
- else
|
33
|
+
%li.list-group-item.list-group-item-warning
|
34
|
+
%span.fa.fa-exclamation-circle.fa-fw.icon-space-r
|
35
|
+
18 years or older
|
36
|
+
- if @questionnaire.agreement_accepted && @questionnaire.code_of_conduct_accepted && @questionnaire.data_sharing_accepted
|
37
|
+
%li.list-group-item
|
38
|
+
.text-success
|
39
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
40
|
+
Event agreement, MLH Code of Conduct, and MLH Data Sharing
|
41
|
+
- else
|
42
|
+
%li.list-group-item.list-group-item-danger
|
43
|
+
%span.fa.fa-close.fa-fw.icon-space-r
|
44
|
+
One or more of the following was not accepted: Event agreement, MLH Code of Conduct, and/or MLH Data Sharing
|
@@ -2,16 +2,7 @@
|
|
2
2
|
|
3
3
|
.row
|
4
4
|
.col-md-6
|
5
|
-
|
6
|
-
.alert.alert-warning
|
7
|
-
%p.mb-1
|
8
|
-
%strong
|
9
|
-
%span.fa.fa-exclamation-triangle.icon-space-r-half
|
10
|
-
Applicant is a minor
|
11
|
-
%p.mb-0
|
12
|
-
Will be
|
13
|
-
= format_age(@questionnaire.age_at_time_of_event)
|
14
|
-
old at the start of the event.
|
5
|
+
= render 'top_alerts'
|
15
6
|
|
16
7
|
.card.mb-3
|
17
8
|
.card-header Personal Information
|
@@ -35,46 +26,7 @@
|
|
35
26
|
%dt.col-md-4 Shirt size
|
36
27
|
%dd.col-md-8= @questionnaire.shirt_size
|
37
28
|
|
38
|
-
|
39
|
-
.card-header Compliance
|
40
|
-
.card-body.px-0.py-0
|
41
|
-
%ul.list-group.list-group-flush
|
42
|
-
- if !@questionnaire.minor?
|
43
|
-
%li.list-group-item
|
44
|
-
.text-success
|
45
|
-
%span.fa.fa-check.fa-fw.icon-space-r
|
46
|
-
18 years or older
|
47
|
-
- else
|
48
|
-
%li.list-group-item.list-group-item-warning
|
49
|
-
%span.fa.fa-exclamation-circle.fa-fw.icon-space-r
|
50
|
-
18 years or older
|
51
|
-
- if @questionnaire.agreement_accepted
|
52
|
-
%li.list-group-item
|
53
|
-
.text-success
|
54
|
-
%span.fa.fa-check.fa-fw.icon-space-r
|
55
|
-
Event Agreement
|
56
|
-
- else
|
57
|
-
%li.list-group-item.list-group-item-danger
|
58
|
-
%span.fa.fa-close.fa-fw.icon-space-r
|
59
|
-
Event Agreement
|
60
|
-
- if @questionnaire.code_of_conduct_accepted
|
61
|
-
%li.list-group-item
|
62
|
-
.text-success
|
63
|
-
%span.fa.fa-check.fa-fw.icon-space-r
|
64
|
-
MLH Code of Conduct
|
65
|
-
- else
|
66
|
-
%li.list-group-item.list-group-item-danger
|
67
|
-
%span.fa.fa-close.fa-fw.icon-space-r
|
68
|
-
MLH Code of Conduct
|
69
|
-
- if @questionnaire.data_sharing_accepted
|
70
|
-
%li.list-group-item
|
71
|
-
.text-success
|
72
|
-
%span.fa.fa-check.fa-fw.icon-space-r
|
73
|
-
MLH Data Sharing
|
74
|
-
- else
|
75
|
-
%li.list-group-item.list-group-item-danger
|
76
|
-
%span.fa.fa-close.fa-fw.icon-space-r
|
77
|
-
MLH Data Sharing
|
29
|
+
= render 'checkin_compliance_card'
|
78
30
|
|
79
31
|
.col-md-6
|
80
32
|
.card.mb-3
|
@@ -24,7 +24,22 @@
|
|
24
24
|
.col
|
25
25
|
%h3.mt-3.pb-2.border-bottom.mb-3 Admissions
|
26
26
|
|
27
|
-
|
27
|
+
.row
|
28
|
+
.col-md-6
|
29
|
+
.card.mb-3
|
30
|
+
.card-body
|
31
|
+
%h5.card-title.mb-1 Acceptance
|
32
|
+
%p.card-text
|
33
|
+
= render 'acc_status_badge'
|
34
|
+
%small
|
35
|
+
= @questionnaire.acc_status_author_id ? @questionnaire.acc_status_author.email : "(no author)"
|
36
|
+
= @questionnaire.acc_status_date ? display_datetime(@questionnaire.acc_status_date, in_sentence: true) : "(no date)"
|
37
|
+
- if current_user.admin?
|
38
|
+
= bs_vertical_simple_form @questionnaire, url: url_for(action: "update_acc_status", controller: "questionnaires") do |f|
|
39
|
+
= f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:", hint: "Updating this status may trigger an automatic email to the applicant - see #{link_to('messages', manage_messages_path(anchor: 'triggered-email-overview'))} for details.".html_safe
|
40
|
+
= f.button :submit, value: "Update Status", class: 'btn-primary'
|
41
|
+
.col-md-6
|
42
|
+
= render 'checkin_card'
|
28
43
|
|
29
44
|
.row
|
30
45
|
.col
|
@@ -5,6 +5,7 @@
|
|
5
5
|
%thead
|
6
6
|
%tr
|
7
7
|
%th Name
|
8
|
+
%th Allow duplicates
|
8
9
|
%th Events
|
9
10
|
%th Last event
|
10
11
|
%th Add event
|
@@ -13,6 +14,11 @@
|
|
13
14
|
- @trackable_tags.each do |trackable_tag|
|
14
15
|
%tr
|
15
16
|
%td= link_to trackable_tag.name, manage_trackable_tag_path(trackable_tag)
|
17
|
+
%td
|
18
|
+
- if trackable_tag.allow_duplicate_band_events
|
19
|
+
%span Allow
|
20
|
+
- else
|
21
|
+
%span.text-danger Block
|
16
22
|
%td= pluralize(trackable_tag.trackable_events.count, "event")
|
17
23
|
%td= trackable_tag.trackable_events.any? ? display_datetime(trackable_tag.sorted_events.first.created_at) : ''
|
18
24
|
%td= link_to 'Add event', new_manage_trackable_event_path(trackable_tag_id: trackable_tag.id)
|
@@ -7,6 +7,13 @@
|
|
7
7
|
%b Name:
|
8
8
|
= @trackable_tag.name
|
9
9
|
|
10
|
+
%p
|
11
|
+
%b Allow duplicate band IDs:
|
12
|
+
- if @trackable_tag.allow_duplicate_band_events
|
13
|
+
%span.text-success Allow duplicates
|
14
|
+
- else
|
15
|
+
%span.text-danger Block duplicates
|
16
|
+
|
10
17
|
%p
|
11
18
|
%b= link_to 'Add event', new_manage_trackable_event_path(trackable_tag_id: @trackable_tag.id)
|
12
19
|
|
@@ -55,7 +55,7 @@
|
|
55
55
|
- bus_list_options = ([OpenStruct.new({ name_maybe_full: 'Not riding a sponsored bus', id: '' })] + BusList.all.to_a)
|
56
56
|
= f.association :bus_list, as: :radio_buttons, collection: bus_list_options, label_method: :name_maybe_full, value_method: :id, label: false, wrapper_html: { class: 'radio_buttons_vertical' }
|
57
57
|
- if BusList.where(needs_bus_captain: true).any?
|
58
|
-
= f.input :bus_captain_interest, as: :radio_buttons, collection: { " Yes!" => true, " No thank you." => false }, label: "Would you be interested in being a bus captain?"
|
58
|
+
= f.input :bus_captain_interest, as: :radio_buttons, collection: { " Yes!" => true, " No, thank you." => false }, label: "Would you be interested in being a bus captain?"
|
59
59
|
%p
|
60
60
|
%small Busses will pick up the morning of, arriving in time for opening ceremony. They will depart shortly after closing ceremony, dropping off to the same pick-up locations.
|
61
61
|
%p
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackathon_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Olivera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -525,6 +525,7 @@ files:
|
|
525
525
|
- app/controllers/manage/admins_controller.rb
|
526
526
|
- app/controllers/manage/application_controller.rb
|
527
527
|
- app/controllers/manage/bus_lists_controller.rb
|
528
|
+
- app/controllers/manage/checkins_controller.rb
|
528
529
|
- app/controllers/manage/configs_controller.rb
|
529
530
|
- app/controllers/manage/dashboard_controller.rb
|
530
531
|
- app/controllers/manage/messages_controller.rb
|
@@ -539,6 +540,7 @@ files:
|
|
539
540
|
- app/controllers/users/registrations_controller.rb
|
540
541
|
- app/datatables/admin_datatable.rb
|
541
542
|
- app/datatables/bulk_message_datatable.rb
|
543
|
+
- app/datatables/checkin_datatable.rb
|
542
544
|
- app/datatables/questionnaire_datatable.rb
|
543
545
|
- app/datatables/school_datatable.rb
|
544
546
|
- app/helpers/hackathon_manager_helper.rb
|
@@ -600,6 +602,8 @@ files:
|
|
600
602
|
- app/views/manage/bus_lists/index.html.haml
|
601
603
|
- app/views/manage/bus_lists/new.html.haml
|
602
604
|
- app/views/manage/bus_lists/show.html.haml
|
605
|
+
- app/views/manage/checkins/index.html.haml
|
606
|
+
- app/views/manage/checkins/show.html.haml
|
603
607
|
- app/views/manage/configs/show.html.haml
|
604
608
|
- app/views/manage/dashboard/index.html.haml
|
605
609
|
- app/views/manage/dashboard/map_data.tsv.erb
|
@@ -610,10 +614,12 @@ files:
|
|
610
614
|
- app/views/manage/messages/show.html.haml
|
611
615
|
- app/views/manage/questionnaires/_acc_status_badge.html.haml
|
612
616
|
- app/views/manage/questionnaires/_check_in_badge.html.haml
|
613
|
-
- app/views/manage/questionnaires/
|
617
|
+
- app/views/manage/questionnaires/_checkin_card.html.haml
|
618
|
+
- app/views/manage/questionnaires/_checkin_compliance_card.html.haml
|
614
619
|
- app/views/manage/questionnaires/_form.html.haml
|
615
620
|
- app/views/manage/questionnaires/_history.html.haml
|
616
621
|
- app/views/manage/questionnaires/_overview.html.haml
|
622
|
+
- app/views/manage/questionnaires/_top_alerts.html.haml
|
617
623
|
- app/views/manage/questionnaires/edit.html.haml
|
618
624
|
- app/views/manage/questionnaires/index.html.haml
|
619
625
|
- app/views/manage/questionnaires/new.html.haml
|
@@ -709,6 +715,7 @@ files:
|
|
709
715
|
- db/migrate/20190113231044_refactor_bus_lists.rb
|
710
716
|
- db/migrate/20190118204143_add_role_to_users.rb
|
711
717
|
- db/migrate/20190125021648_change_questionnaire_dietary_special_needs_string_to_text.rb
|
718
|
+
- db/migrate/20190213233902_add_prevent_duplicate_band_events_to_trackable_tags.rb
|
712
719
|
- db/schools.csv
|
713
720
|
- db/seed_messages/questionnaire--accepted.md
|
714
721
|
- db/seed_messages/questionnaire--denied.md
|
@@ -1,36 +0,0 @@
|
|
1
|
-
.row
|
2
|
-
.col-md-6
|
3
|
-
.card.mb-3
|
4
|
-
.card-body
|
5
|
-
%h5.card-title.mb-1 Acceptance
|
6
|
-
%p.card-text
|
7
|
-
= render 'acc_status_badge'
|
8
|
-
%small
|
9
|
-
= @questionnaire.acc_status_author_id ? @questionnaire.acc_status_author.email : "(no author)"
|
10
|
-
= @questionnaire.acc_status_date ? display_datetime(@questionnaire.acc_status_date, in_sentence: true) : "(no date)"
|
11
|
-
- if current_user.admin?
|
12
|
-
= bs_vertical_simple_form @questionnaire, url: url_for(action: "update_acc_status", controller: "questionnaires") do |f|
|
13
|
-
= f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:", hint: "Updating this status may trigger an automatic email to the applicant - see #{link_to('messages', manage_messages_path(anchor: 'triggered-email-overview'))} for details.".html_safe
|
14
|
-
= f.button :submit, value: "Update Status", class: 'btn-primary'
|
15
|
-
.col-md-6
|
16
|
-
.card.mb-3
|
17
|
-
.card-body
|
18
|
-
%h5.card-title.mb-1 Check-in
|
19
|
-
%p.card-text
|
20
|
-
= render 'check_in_badge'
|
21
|
-
- if @questionnaire.checked_in_at
|
22
|
-
%small
|
23
|
-
= @questionnaire.checked_in_by_id ? @questionnaire.checked_in_by.email : "(never checked in)"
|
24
|
-
= @questionnaire.checked_in_at ? display_datetime(@questionnaire.checked_in_at, in_sentence: true) : "(not checked in)"
|
25
|
-
%p
|
26
|
-
Please confirm their phone number and email address before checking in.
|
27
|
-
- if !@questionnaire.can_rsvp?
|
28
|
-
%br
|
29
|
-
%span.text-danger
|
30
|
-
Note: This applicant has not been accepted.
|
31
|
-
= bs_horizontal_simple_form_for @questionnaire, url: url_for(action: "check_in", controller: "questionnaires", method: :put), html: { "data-validate" => "form" } do |f|
|
32
|
-
- if !@questionnaire.checked_in?
|
33
|
-
= f.input :phone, input_html: { "data-validate" => "presence" }
|
34
|
-
= f.input :email, input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
35
|
-
= hidden_field_tag("check_in", !@questionnaire.checked_in?)
|
36
|
-
= f.button :submit, value: ( @questionnaire.checked_in? ? "Remove check-in" : "Check In" ), class: 'btn-primary'
|