hackathon_manager 0.13.10 → 0.13.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53405ab4318feef8a9761d61a8caab8a3b15ee84040b1065b62633432adca1e
|
4
|
+
data.tar.gz: 9a67eded41cd30dc3d428098207aed0273581ef223858090453ddfcb1a72065f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c161eee3d5f9d47e0d2f471e64ca9dd510ea1d37d2475e83cd5c8e418cda3b4bfde76162abbf195026bde120ab54b2d032427a59d3b77a710af34f33de11a1f1
|
7
|
+
data.tar.gz: 714a2191b9ccf482088f653b851c1605e80c4d9b7633ab638cd41186284ad2688ba76fe1b68d9b8f446c03a2a6f845535b7df2ad1f374ea1f1363930d00de350
|
@@ -30,6 +30,10 @@ class Manage::DashboardController < Manage::ApplicationController
|
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
33
|
+
def checkin_activity_data
|
34
|
+
render json: activity_chart_data(["Checked In", "Boarded Bus"], "hour", 3.days.ago..Time.zone.now)
|
35
|
+
end
|
36
|
+
|
33
37
|
def confirmation_activity_data
|
34
38
|
where_filter = nil
|
35
39
|
if params[:school_id]
|
@@ -122,6 +126,10 @@ class Manage::DashboardController < Manage::ApplicationController
|
|
122
126
|
data = Questionnaire.where(acc_status: "rsvp_denied").send("group_by_#{group_type}", :acc_status_date, range: range)
|
123
127
|
when "Non-Applied Users"
|
124
128
|
data = User.without_questionnaire.send("group_by_#{group_type}", "users.created_at", range: range)
|
129
|
+
when "Checked In"
|
130
|
+
data = Questionnaire.where("checked_in_at > 0").send("group_by_#{group_type}", :checked_in_at, range: range)
|
131
|
+
when "Boarded Bus"
|
132
|
+
data = Questionnaire.where("boarded_bus_at > 0").send("group_by_#{group_type}", :boarded_bus_at, range: range)
|
125
133
|
end
|
126
134
|
data = data.where(where_filter) if where_filter && type != "Non-Applied Users"
|
127
135
|
chart_data << { name: type, data: data.count }
|
@@ -6,7 +6,8 @@
|
|
6
6
|
%thead
|
7
7
|
%tr
|
8
8
|
%th Name
|
9
|
-
%th Capacity
|
9
|
+
%th Filled / Capacity
|
10
|
+
%th Boarded / Checked in
|
10
11
|
%th Needs bus captain?
|
11
12
|
%th Schools
|
12
13
|
|
@@ -16,5 +17,9 @@
|
|
16
17
|
%td
|
17
18
|
%strong= link_to(bus_list.name, manage_bus_list_path(bus_list))
|
18
19
|
%td #{bus_list.passengers.count} / #{bus_list.capacity}
|
19
|
-
%td
|
20
|
+
%td #{bus_list.boarded_passengers.count} / #{bus_list.checked_in_passengers.count}
|
21
|
+
%td
|
22
|
+
= pluralize bus_list.captains.count, "captain"
|
23
|
+
–
|
24
|
+
= bus_list.needs_bus_captain ? "<strong class=\"text-danger\">Needs bus captain</strong>".html_safe : "No"
|
20
25
|
%td= bus_list.schools.count
|
@@ -26,12 +26,21 @@
|
|
26
26
|
%h5.dashboard-container-title Today's Stats
|
27
27
|
= pie_chart todays_stats_data_manage_dashboard_index_path, colors: [blue, green, red, grey]
|
28
28
|
|
29
|
+
- if Questionnaire.where('checked_in_at > 0').any? || Questionnaire.where('boarded_bus_at > 0').any?
|
30
|
+
.row
|
31
|
+
.col
|
32
|
+
%h5.dashboard-container-title Check-in activity
|
33
|
+
.graph-overlay.double-metrics
|
34
|
+
%h3= Questionnaire.where('checked_in_at > 0').count
|
35
|
+
%p total checked in
|
36
|
+
%h3= Questionnaire.where('boarded_bus_at > 0').count
|
37
|
+
%p total boarded bus
|
38
|
+
= area_chart checkin_activity_data_manage_dashboard_index_path, colors: [orange, blue], library: { legend: { enabled: false } }
|
39
|
+
|
29
40
|
.row
|
30
41
|
.col
|
31
42
|
%h5.dashboard-container-title Confirmation Activity
|
32
|
-
.graph-overlay
|
33
|
-
%h3= Questionnaire.where("checked_in_at != 0").count
|
34
|
-
%p total checked in
|
43
|
+
.graph-overlay
|
35
44
|
%h3= Questionnaire.where(acc_status: "rsvp_confirmed").count
|
36
45
|
%p total confirmed
|
37
46
|
= area_chart confirmation_activity_data_manage_dashboard_index_path, colors: [green, red], library: { legend: { enabled: false } }
|
data/config/routes.rb
CHANGED
@@ -32,6 +32,7 @@ Rails.application.routes.draw do
|
|
32
32
|
get :map_data, on: :collection
|
33
33
|
get :todays_activity_data, on: :collection
|
34
34
|
get :todays_stats_data, on: :collection
|
35
|
+
get :checkin_activity_data, on: :collection
|
35
36
|
get :confirmation_activity_data, on: :collection
|
36
37
|
get :application_activity_data, on: :collection
|
37
38
|
get :schools_confirmed_data, on: :collection
|