From 2495224ac9b670cc0e44c836d9ce5cf728292994 Mon Sep 17 00:00:00 2001 From: Patrick Fairbank Date: Mon, 13 May 2024 19:07:14 -0700 Subject: [PATCH] Update rankings PDF report for 2024. --- web/reports.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/reports.go b/web/reports.go index b0ec3597..69b1d07e 100644 --- a/web/reports.go +++ b/web/reports.go @@ -52,8 +52,8 @@ func (web *Web) rankingsPdfReportHandler(w http.ResponseWriter, r *http.Request) } // 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": 22, "RP": 23, "Match": 22, "Charge Stn.": 22, "Auto": 25, - "W-L-T": 23, "DQ": 23, "Played": 23} + colWidths := map[string]float64{"Rank": 13, "Team": 20, "RP": 20, "Coop": 20, "Match": 20, "Auto": 20, "Stage": 20, + "W-L-T": 22, "DQ": 20, "Played": 20} rowHeight := 6.5 pdf := gofpdf.New("P", "mm", "Letter", "font") @@ -66,9 +66,10 @@ func (web *Web) rankingsPdfReportHandler(w http.ResponseWriter, r *http.Request) pdf.CellFormat(colWidths["Rank"], rowHeight, "Rank", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["Team"], rowHeight, "Team", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["RP"], rowHeight, "RP", "1", 0, "C", true, 0, "") + pdf.CellFormat(colWidths["Coop"], rowHeight, "Coop", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["Match"], rowHeight, "Match", "1", 0, "C", true, 0, "") - pdf.CellFormat(colWidths["Charge Stn."], rowHeight, "Charge Stn.", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["Auto"], rowHeight, "Auto", "1", 0, "C", true, 0, "") + pdf.CellFormat(colWidths["Stage"], rowHeight, "Stage", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["W-L-T"], rowHeight, "W-L-T", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["DQ"], rowHeight, "DQ", "1", 0, "C", true, 0, "") pdf.CellFormat(colWidths["Played"], rowHeight, "Played", "1", 1, "C", true, 0, "") @@ -79,11 +80,10 @@ func (web *Web) rankingsPdfReportHandler(w http.ResponseWriter, r *http.Request) pdf.SetFont("Arial", "", 10) pdf.CellFormat(colWidths["Team"], rowHeight, strconv.Itoa(ranking.TeamId), "1", 0, "C", false, 0, "") pdf.CellFormat(colWidths["RP"], rowHeight, strconv.Itoa(ranking.RankingPoints), "1", 0, "C", false, 0, "") + pdf.CellFormat(colWidths["Coop"], rowHeight, strconv.Itoa(ranking.CoopertitionPoints), "1", 0, "C", false, 0, "") pdf.CellFormat(colWidths["Match"], rowHeight, strconv.Itoa(ranking.MatchPoints), "1", 0, "C", false, 0, "") - pdf.CellFormat( - colWidths["Charge Stn."], rowHeight, strconv.Itoa(ranking.StagePoints), "1", 0, "C", false, 0, "", - ) pdf.CellFormat(colWidths["Auto"], rowHeight, strconv.Itoa(ranking.AutoPoints), "1", 0, "C", false, 0, "") + pdf.CellFormat(colWidths["Stage"], rowHeight, strconv.Itoa(ranking.StagePoints), "1", 0, "C", false, 0, "") record := fmt.Sprintf("%d-%d-%d", ranking.Wins, ranking.Losses, ranking.Ties) pdf.CellFormat(colWidths["W-L-T"], rowHeight, record, "1", 0, "C", false, 0, "") pdf.CellFormat(colWidths["DQ"], rowHeight, strconv.Itoa(ranking.Disqualifications), "1", 0, "C", false, 0, "")