[Scouting App] Note scout multiple robots and add keywords
Note scouts often scout multiple robots so the scouting app should support it and
checkboxes were added to select keywords/tags. These tags will likely have to be modified
according to 2023's game.
Mobile UI Preview: https://ibb.co/QdFxwGj
Change-Id: If4fcb3ee97da5f52e428cb0a4b0a8401b4700a02
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
diff --git a/scouting/webserver/requests/requests.go b/scouting/webserver/requests/requests.go
index 0ffeaee..e33e82d 100644
--- a/scouting/webserver/requests/requests.go
+++ b/scouting/webserver/requests/requests.go
@@ -67,7 +67,7 @@
QueryAllShifts(int) ([]db.Shift, error)
QueryStats(int) ([]db.Stats, error)
QueryNotes(int32) ([]string, error)
- AddNotes(int, string) error
+ AddNotes(db.NotesData) error
}
type ScrapeMatchList func(int32, string) ([]scraping.Match, error)
@@ -470,7 +470,16 @@
return
}
- err = handler.db.AddNotes(int(request.Team()), string(request.Notes()))
+ err = handler.db.AddNotes(db.NotesData{
+ TeamNumber: request.Team(),
+ Notes: string(request.Notes()),
+ GoodDriving: bool(request.GoodDriving()),
+ BadDriving: bool(request.BadDriving()),
+ SketchyClimb: bool(request.SketchyClimb()),
+ SolidClimb: bool(request.SolidClimb()),
+ GoodDefense: bool(request.GoodDefense()),
+ BadDefense: bool(request.BadDefense()),
+ })
if err != nil {
respondWithError(w, http.StatusInternalServerError, fmt.Sprintf("Failed to insert notes: %v", err))
return