Add a Match/Team Selection screen to the scouting web page
Now we can start working on actually submitting scouting data.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ie26a80d0db317625590efc10cb67c4b176bdc124
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index a1cffc3..0e7223b 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
-type Section = 'Auto'|'TeleOp'|'Climb'|'Defense'|'Review and Submit'|'Home'
+type Section = 'Team Selection'|'Auto'|'TeleOp'|'Climb'|'Defense'|'Review and Submit'|'Home'
type Level = 'Low'|'Medium'|'High'|'Transversal'
@Component({
@@ -9,7 +9,9 @@
styleUrls: ['./entry.component.css']
})
export class EntryComponent {
- section: Section = 'Auto'; //placeholder
+ section: Section = 'Team Selection';
+ matchNumber: number = 1
+ teamNumber: number = 1
autoUpperShotsMade: number = 0;
autoLowerShotsMade: number = 0;
autoShotsMissed: number = 0;
@@ -59,7 +61,9 @@
}
nextSection() {
- if (this.section === 'Auto') {
+ if (this.section === 'Team Selection') {
+ this.section = 'Auto';
+ } else if (this.section === 'Auto') {
this.section = 'TeleOp';
} else if (this.section === 'TeleOp') {
this.section = 'Climb';
@@ -73,7 +77,9 @@
}
prevSection() {
- if (this.section === 'TeleOp') {
+ if (this.section === 'Auto') {
+ this.section = 'Team Selection';
+ } else if (this.section === 'TeleOp') {
this.section = 'Auto';
} else if (this.section === 'Climb') {
this.section = 'TeleOp';