Scouting: Add No Show for Data Entry
Signed-off-by: Emily Markova <emily.markova@gmail.com>
Change-Id: Ic0e5b2cebd1d326c376bb140a90fdfa5d1f950de
diff --git a/scouting/www/entry/BUILD b/scouting/www/entry/BUILD
index 24da904..85af3ca 100644
--- a/scouting/www/entry/BUILD
+++ b/scouting/www/entry/BUILD
@@ -24,6 +24,7 @@
# nice not to have a duplicate list here when they're already known in
# the .fbs file.
"ACTIONS": [
+ "NoShowAction",
"EndMatchAction",
"MobilityAction",
"PenaltyAction",
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 98c9311..ca5d0b8 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -13,6 +13,8 @@
import {
StartMatchAction,
StartMatchActionT,
+ NoShowActionT,
+ NoShowAction,
ScoreType,
StageType,
Submit2024Actions,
@@ -95,6 +97,7 @@
readonly StageType = StageType;
readonly ActionT = ActionT;
readonly ActionType = ActionType;
+ readonly NoShowActionT = NoShowActionT;
readonly StartMatchActionT = StartMatchActionT;
readonly MobilityActionT = MobilityActionT;
readonly PickupNoteActionT = PickupNoteActionT;
@@ -259,6 +262,10 @@
case ActionType.EndAutoPhaseAction:
this.autoPhase = true;
this.section = 'Pickup';
+ case ActionType.NoShowAction:
+ this.autoPhase = true;
+ this.section = 'Init';
+ break;
case ActionType.PickupNoteAction:
this.section = 'Pickup';
break;
diff --git a/scouting/www/entry/entry.ng.html b/scouting/www/entry/entry.ng.html
index 3a672e1..1b3a966 100644
--- a/scouting/www/entry/entry.ng.html
+++ b/scouting/www/entry/entry.ng.html
@@ -115,6 +115,12 @@
<!-- Creates a responsive stack of full-width, "block buttons". -->
<div class="d-grid gap-5">
<button
+ class="btn btn-warning"
+ (click)="changeSectionTo('Review and Submit'); actionHelper.addNoShowAction({});"
+ >
+ No Show
+ </button>
+ <button
class="btn btn-primary"
[disabled]="!selectedValue"
(click)="changeSectionTo('Pickup'); actionHelper.addStartMatchAction({position: selectedValue});"
@@ -476,6 +482,7 @@
Mobility: {{(action.actionTaken | cast:
MobilityActionT).mobility}}
</span>
+ <span *ngSwitchCase="ActionType.NoShowAction">NoShow: true</span>
<span *ngSwitchDefault>{{action.actionTakenType}}</span>
<span *ngSwitchCase="ActionType.PenaltyAction">
Penalties: {{(action.actionTaken | cast: