hackathon_manager 0.13.10 → 0.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aaa095607cc9ed17e594f173fcc0bd5ccc0826c3503d581b60a431b8e3816317
4
- data.tar.gz: 2b46252b061915d80c1095246a3e78932765568cb55333b2e0b5c89df54aca35
3
+ metadata.gz: f53405ab4318feef8a9761d61a8caab8a3b15ee84040b1065b62633432adca1e
4
+ data.tar.gz: 9a67eded41cd30dc3d428098207aed0273581ef223858090453ddfcb1a72065f
5
5
  SHA512:
6
- metadata.gz: 3f13ac65bb41516c115bd18d3de2925f66710500df32a559a9917211958f95b1ff7bad4fe4fc61cc4964124e6f02f4241e07780afc18c67a1de7d21f17d4ad19
7
- data.tar.gz: f181edfd9e49c12405ed5bfa7733fb3628eac56f83456fd4707c2802f3426d7779be087ccec6593b23ef95f35fe420d11e159d5d9f9bd2d2a019f39ed5901144
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= bus_list.needs_bus_captain ? "<strong class=\"text-danger\">Needs bus captain</strong>".html_safe : "No"
20
+ %td #{bus_list.boarded_passengers.count} / #{bus_list.checked_in_passengers.count}
21
+ %td
22
+ = pluralize bus_list.captains.count, "captain"
23
+ &ndash;
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.double-metrics
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 } }
@@ -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
@@ -1,3 +1,3 @@
1
1
  module HackathonManager
2
- VERSION = '0.13.10'.freeze
2
+ VERSION = '0.13.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackathon_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.10
4
+ version: 0.13.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Olivera