Simplify climbing screen on the scouting app
This patch gets rid of the secondary screen that popped up when
selecting "Attempted to Climb". It was confusing a few people. Now all
options are on the very first screen. Also, I decided to get rid of
all the `set*()` functions. It was simpler to use a two-way connection
for the radio buttons. I also got rid of the "proper" concept. I'm
still not sure what that was all about.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Iaa9c2dda6bb5af2aa14dae50dbe20bcc96ef1bbe
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 3db5f72..d83f709 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -10,7 +10,7 @@
import ErrorResponse = error_response.scouting.webserver.requests.ErrorResponse;
type Section = 'Team Selection'|'Auto'|'TeleOp'|'Climb'|'Defense'|'Review and Submit'|'Home'
-type Level = 'Failed'|'Low'|'Medium'|'High'|'Transversal'
+type Level = 'NoAttempt'|'Failed'|'FailedWithPlentyOfTime'|'Low'|'Medium'|'High'|'Transversal'
@Component({
selector: 'app-entry',
@@ -29,35 +29,9 @@
teleShotsMissed: number = 0;
defensePlayedOnScore: number = 0;
defensePlayedScore: number = 0;
- level: Level;
- proper: boolean = false;
- climbed: boolean = false;
+ level: Level = 'NoAttempt';
errorMessage: string = '';
- toggleProper() {
- this.proper = !this.proper;
- }
-
- setFailed() {
- this.level = 'Failed';
- }
-
- setLow() {
- this.level = 'Low';
- }
-
- setMedium() {
- this.level = 'Medium';
- }
-
- setHigh() {
- this.level = 'High';
- }
-
- setTransversal() {
- this.level = 'Transversal';
- }
-
nextSection() {
if (this.section === 'Team Selection') {
this.section = 'Auto';