Scouting: Add spotlight to entry
Signed-off-by: Emily Markova <emily.markova@gmail.com>
Change-Id: I4ed7673423b1a49c349feae009eee0b1d47b0382
diff --git a/scouting/www/entry/entry.component.css b/scouting/www/entry/entry.component.css
index 246887c..9c50ee0 100644
--- a/scouting/www/entry/entry.component.css
+++ b/scouting/www/entry/entry.component.css
@@ -18,3 +18,7 @@
input label {
padding: 0px;
}
+
+#EndGame > div > label {
+ padding: 0;
+}
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index b3e1e92..122c415 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -86,6 +86,7 @@
type: 'endMatchAction';
stageType: StageType;
trapNote: boolean;
+ spotlight: boolean;
timestamp?: number;
}
| {
@@ -112,6 +113,7 @@
readonly COMP_LEVELS = COMP_LEVELS;
readonly COMP_LEVEL_LABELS = COMP_LEVEL_LABELS;
readonly ScoreType = ScoreType;
+ readonly StageType = StageType;
section: Section = 'Team Selection';
@Input() matchNumber: number = 1;
@@ -374,7 +376,8 @@
const endMatchActionOffset = EndMatchAction.createEndMatchAction(
builder,
action.stageType,
- action.trapNote
+ action.trapNote,
+ action.spotlight
);
actionOffset = Action.createAction(
builder,
diff --git a/scouting/www/entry/entry.ng.html b/scouting/www/entry/entry.ng.html
index 9490237..ea44ad3 100644
--- a/scouting/www/entry/entry.ng.html
+++ b/scouting/www/entry/entry.ng.html
@@ -294,7 +294,7 @@
<h6 class="text-muted">
Last Action: {{actionList[actionList.length - 1].type}}
</h6>
- <div class="d-grid gap-4">
+ <div class="d-grid gap-2">
<button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button>
<button
class="btn btn-danger"
@@ -302,7 +302,7 @@
>
DEAD
</button>
- <label style="padding: 0">
+ <label>
<input
#park
type="radio"
@@ -312,7 +312,7 @@
/>
Park
</label>
- <label style="padding: 0">
+ <label>
<input
#onStage
type="radio"
@@ -322,7 +322,7 @@
/>
On Stage
</label>
- <label style="padding: 0">
+ <label>
<input
#harmony
type="radio"
@@ -332,7 +332,7 @@
/>
Harmony
</label>
- <label style="padding: 0">
+ <label>
<input
#trapNote
type="checkbox"
@@ -342,6 +342,16 @@
/>
Trap Note
</label>
+ <label>
+ <input
+ #spotlight
+ type="checkbox"
+ id="spotlight"
+ name="spotlight"
+ value="spotlight"
+ />
+ Spotlight
+ </label>
<div style="display: flex">
<h5>Penalties :</h5>
<button
@@ -363,7 +373,7 @@
<button
*ngIf="!autoPhase"
class="btn btn-info"
- (click)="changeSectionTo('Review and Submit'); addPenalties(); addAction({type: 'endMatchAction', park: park.checked, onStage: onStage.checked, harmony: harmony.checked, trapNote: trapNote.checked});"
+ (click)="changeSectionTo('Review and Submit'); addPenalties(); addAction({type: 'endMatchAction', stageType: (park.checked ? StageType.kPARK : onStage.checked ? StageType.kON_STAGE : harmony.checked ? StageType.kHARMONY : StageType.kMISSING), trapNote: trapNote.checked, spotlight: spotlight.checked});"
>
End Match
</button>
@@ -398,8 +408,10 @@
</span>
<span *ngSwitchCase="'endAutoPhase'">Ended auto phase</span>
<span *ngSwitchCase="'endMatchAction'">
- Ended Match; park: {{action.park}}, onStage: {{action.onStage}},
- harmony: {{action.harmony}}, trapNote: {{action.trapNote}}
+ Ended Match; stageType: {{(action.stageType === 0 ? "kON_STAGE" :
+ action.stageType === 1 ? "kPARK" : action.stageType === 2 ?
+ "kHARMONY" : "kMISSING")}}, trapNote: {{action.trapNote}},
+ spotlight: {{action.spotlight}}
</span>
<span *ngSwitchCase="'robotDeathAction'">
Robot on: {{action.robotOn}}