Added event settings setup page.

This commit is contained in:
Patrick Fairbank
2014-06-06 21:26:55 -07:00
parent 1718bdc367
commit f7c3a4f682
24 changed files with 369 additions and 59 deletions

View File

@@ -67,11 +67,6 @@ func RankingsPdfReportHandler(w http.ResponseWriter, r *http.Request) {
handleWebErr(w, err)
return
}
eventSettings, err := db.GetEventSettings()
if err != nil {
handleWebErr(w, err)
return
}
// The widths of the table columns in mm, stored here so that they can be referenced for each row.
colWidths := map[string]float64{"Rank": 13, "Team": 23, "QS": 20, "Assist": 20, "Auto": 20,
@@ -161,11 +156,6 @@ func SchedulePdfReportHandler(w http.ResponseWriter, r *http.Request) {
if len(teams) > 0 {
matchesPerTeam = len(matches) * teamsPerMatch / len(teams)
}
eventSettings, err := db.GetEventSettings()
if err != nil {
handleWebErr(w, err)
return
}
// The widths of the table columns in mm, stored here so that they can be referenced for each row.
colWidths := map[string]float64{"Time": 35, "Type": 25, "Match": 15, "Team": 20}
@@ -272,11 +262,6 @@ func TeamsPdfReportHandler(w http.ResponseWriter, r *http.Request) {
handleWebErr(w, err)
return
}
eventSettings, err := db.GetEventSettings()
if err != nil {
handleWebErr(w, err)
return
}
// The widths of the table columns in mm, stored here so that they can be referenced for each row.
colWidths := map[string]float64{"Id": 12, "Name": 80, "Location": 80, "RookieYear": 23}