scouting: Add more high-level fields to the scouting app
This patch adds the following fields that can be selected by scouts:
- No show
- Never moved
- Battery died
- Broke (mechanically)
- Lost coms
I haven't hooked them up to the database yet because I want
confirmation that this is what we want first. A future patch will hook
those to the database.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I878f821d01c3958ac38b73e341456adece994463
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index d83f709..e45b6aa 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
+import { FormsModule } from '@angular/forms';
import * as flatbuffer_builder from 'org_frc971/external/com_github_google_flatbuffers/ts/builder';
import {ByteBuffer} from 'org_frc971/external/com_github_google_flatbuffers/ts/byte-buffer';
@@ -9,7 +10,7 @@
import SubmitDataScoutingResponse = submit_data_scouting_response.scouting.webserver.requests.SubmitDataScoutingResponse;
import ErrorResponse = error_response.scouting.webserver.requests.ErrorResponse;
-type Section = 'Team Selection'|'Auto'|'TeleOp'|'Climb'|'Defense'|'Review and Submit'|'Home'
+type Section = 'Team Selection'|'Auto'|'TeleOp'|'Climb'|'Other'|'Review and Submit'|'Home'
type Level = 'NoAttempt'|'Failed'|'FailedWithPlentyOfTime'|'Low'|'Medium'|'High'|'Transversal'
@Component({
@@ -31,6 +32,11 @@
defensePlayedScore: number = 0;
level: Level = 'NoAttempt';
errorMessage: string = '';
+ noShow: boolean = false;
+ neverMoved: boolean = false;
+ batteryDied: boolean = false;
+ mechanicallyBroke: boolean = false;
+ lostComs: boolean = false;
nextSection() {
if (this.section === 'Team Selection') {
@@ -40,8 +46,8 @@
} else if (this.section === 'TeleOp') {
this.section = 'Climb';
} else if (this.section === 'Climb') {
- this.section = 'Defense';
- } else if (this.section === 'Defense') {
+ this.section = 'Other';
+ } else if (this.section === 'Other') {
this.section = 'Review and Submit';
} else if (this.section === 'Review and Submit') {
this.submitDataScouting();
@@ -55,10 +61,10 @@
this.section = 'Auto';
} else if (this.section === 'Climb') {
this.section = 'TeleOp';
- } else if (this.section === 'Defense') {
+ } else if (this.section === 'Other') {
this.section = 'Climb';
} else if (this.section === 'Review and Submit') {
- this.section = 'Defense';
+ this.section = 'Other';
}
}