diff --git a/js/components/LunchStats.js b/js/components/LunchStats.js
index ff920b4..b08a494 100644
--- a/js/components/LunchStats.js
+++ b/js/components/LunchStats.js
@@ -68,6 +68,7 @@ module.exports = React.createClass({
+
diff --git a/reports.go b/reports.go
index db6a019..2a41c52 100644
--- a/reports.go
+++ b/reports.go
@@ -135,6 +135,17 @@ func GetWinningSuggestors(groupid int64) (*[]*Attendee, error) {
return &suggestors, nil
}
+func GetVetoingSuggestors(groupid int64) (*[]*Attendee, error) {
+ var suggestors []*Attendee
+
+ _, err := DB.Select(&suggestors, "SELECT attendees.* FROM attendees INNER JOIN suggestions ON suggestions.AttendeeId==attendees.AttendeeId WHERE suggestions.VetoingId!=-1 AND suggestions.GroupId=?", groupid)
+ if err != nil {
+ return nil, err
+ }
+
+ return &suggestors, nil
+}
+
func ReportHandler(w http.ResponseWriter, r *http.Request) {
user, err := GetUserFromSession(r)
if err != nil {
@@ -203,6 +214,15 @@ func ReportHandler(w http.ResponseWriter, r *http.Request) {
return
}
report.FromSummedAttendeeList(attendees)
+ } else if reportid == "vetoing-suggestors" {
+ report.Title = "Vetoing Suggestors"
+ attendees, err := GetVetoingSuggestors(user.GroupId)
+ if err != nil {
+ WriteError(w, 999 /*Internal Error*/)
+ log.Print(err)
+ return
+ }
+ report.FromSummedAttendeeList(attendees)
} else if reportid == "suggestors" {
report.Title = "Suggestor Frequency"
attendees, err := GetAllSuggestors(user.GroupId)