From f3dc8730e497ff5df0da92a391c2d38503f4490b Mon Sep 17 00:00:00 2001 From: Patrick Fairbank Date: Sun, 8 Jun 2014 22:58:47 -0700 Subject: [PATCH] Capitalize match type in PDF report. --- reports.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reports.go b/reports.go index 072663b..af8f7ad 100644 --- a/reports.go +++ b/reports.go @@ -192,9 +192,17 @@ func SchedulePdfReportHandler(w http.ResponseWriter, r *http.Request) { surrogate = true } + // Capitalize match types. + matchType := match.Type + if matchType == "qualification" { + matchType = "Qualification" + } else if matchType == "practice" { + matchType = "Practice" + } + // Render match info row. pdf.CellFormat(colWidths["Time"], height, match.Time.Local().Format("Mon 1/02 03:04 PM"), borderStr, 0, alignStr, false, 0, "") - pdf.CellFormat(colWidths["Type"], height, match.Type, borderStr, 0, alignStr, false, 0, "") + pdf.CellFormat(colWidths["Type"], height, matchType, borderStr, 0, alignStr, false, 0, "") pdf.CellFormat(colWidths["Match"], height, match.DisplayName, borderStr, 0, alignStr, false, 0, "") pdf.CellFormat(colWidths["Team"], height, strconv.Itoa(match.Red1), borderStr, 0, alignStr, false, 0, "") pdf.CellFormat(colWidths["Team"], height, strconv.Itoa(match.Red2), borderStr, 0, alignStr, false, 0, "")