Philipp Schrader | 6b2e950 | 2022-03-15 23:42:56 -0700 | [diff] [blame] | 1 | <div class="header" #header> |
Philipp Schrader | 2b33427 | 2023-04-11 21:27:36 -0700 | [diff] [blame] | 2 | <h2> |
| 3 | <span *ngIf="section != 'Team Selection'">{{teamNumber}}</span> |
| 4 | {{section}} |
| 5 | </h2> |
Philipp Schrader | 8058743 | 2022-03-05 15:41:22 -0800 | [diff] [blame] | 6 | </div> |
Philipp Schrader | 8058743 | 2022-03-05 15:41:22 -0800 | [diff] [blame] | 7 | <ng-container [ngSwitch]="section"> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 8 | <div |
| 9 | *ngSwitchCase="'Team Selection'" |
| 10 | id="team_selection" |
| 11 | class="container-fluid" |
| 12 | > |
| 13 | <div class="row"> |
| 14 | <label for="match_number">Match Number</label> |
| 15 | <input |
| 16 | [(ngModel)]="matchNumber" |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 17 | (ngModelChange)="updateTeamSelectionValidity()" |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 18 | type="number" |
| 19 | id="match_number" |
| 20 | min="1" |
| 21 | max="999" |
| 22 | /> |
| 23 | </div> |
| 24 | <div class="row"> |
| 25 | <label for="team_number">Team Number</label> |
| 26 | <input |
| 27 | [(ngModel)]="teamNumber" |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 28 | (ngModelChange)="updateTeamSelectionValidity()" |
Emily Markova | e68b763 | 2023-12-30 14:17:55 -0800 | [diff] [blame^] | 29 | type="text" |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 30 | id="team_number" |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 31 | /> |
| 32 | </div> |
Philipp Schrader | 8aeb14f | 2022-04-08 21:23:18 -0700 | [diff] [blame] | 33 | <div class="row"> |
Philipp Schrader | 30b4a68 | 2022-04-16 14:36:17 -0700 | [diff] [blame] | 34 | <label for="set_number">Set Number</label> |
| 35 | <input |
| 36 | [(ngModel)]="setNumber" |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 37 | (ngModelChange)="updateTeamSelectionValidity()" |
Philipp Schrader | 30b4a68 | 2022-04-16 14:36:17 -0700 | [diff] [blame] | 38 | type="number" |
| 39 | id="set_number" |
| 40 | min="1" |
| 41 | max="10" |
| 42 | /> |
Philipp Schrader | 8aeb14f | 2022-04-08 21:23:18 -0700 | [diff] [blame] | 43 | </div> |
| 44 | <div class="row"> |
Philipp Schrader | 30b4a68 | 2022-04-16 14:36:17 -0700 | [diff] [blame] | 45 | <label for="comp_level">Comp Level</label> |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 46 | <select |
| 47 | [(ngModel)]="compLevel" |
| 48 | (ngModelChange)="updateTeamSelectionValidity()" |
| 49 | type="number" |
| 50 | id="comp_level" |
| 51 | > |
Philipp Schrader | 8aeb14f | 2022-04-08 21:23:18 -0700 | [diff] [blame] | 52 | <option *ngFor="let level of COMP_LEVELS" [ngValue]="level"> |
| 53 | {{COMP_LEVEL_LABELS[level]}} |
| 54 | </option> |
| 55 | </select> |
| 56 | </div> |
Philipp Schrader | e149885 | 2023-04-15 18:06:45 -0700 | [diff] [blame] | 57 | <div class="row"> |
| 58 | <label> |
| 59 | <input |
| 60 | id="pre_scouting" |
| 61 | type="checkbox" |
| 62 | [(ngModel)]="preScouting" |
| 63 | (ngModelChange)="updateTeamSelectionValidity()" |
| 64 | /> |
| 65 | Pre-scouting |
| 66 | </label> |
| 67 | </div> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 68 | <div class="buttons"> |
| 69 | <!-- hack to right align the next button --> |
| 70 | <div></div> |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 71 | <button |
| 72 | class="btn btn-primary" |
| 73 | (click)="changeSectionTo('Init');" |
| 74 | [disabled]="!teamSelectionIsValid" |
| 75 | > |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 76 | Next |
| 77 | </button> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 78 | </div> |
| 79 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 80 | <div *ngSwitchCase="'Init'" id="init" class="container-fluid"> |
| 81 | <h2>Select Starting Position</h2> |
Filip Kujawa | 1d9add9 | 2023-03-03 13:14:40 -0800 | [diff] [blame] | 82 | <img |
| 83 | id="field_starting_positions_image" |
| 84 | src="/sha256/b71def525fb78486617a8b350c0ba6907e8ea25f78d4084a932cba8ae922528c/pictures/field/field.jpg" |
| 85 | alt="Starting Positions Image" |
| 86 | class="img-fluid" |
| 87 | /> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 88 | <div *ngFor="let i of [1, 2, 3, 4]"> |
| 89 | <label> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 90 | <input |
| 91 | type="radio" |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 92 | name="radio-group" |
| 93 | [value]="i" |
| 94 | (change)="selectedValue = $event.target.value" |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 95 | /> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 96 | {{ i }} |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 97 | </label> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 98 | </div> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 99 | <div class="buttons"> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 100 | <!-- Creates a responsive stack of full-width, "block buttons". --> |
Filip Kujawa | 36f5608 | 2023-03-03 10:58:53 -0800 | [diff] [blame] | 101 | <div class="d-grid gap-5"> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 102 | <button |
| 103 | class="btn btn-primary" |
| 104 | [disabled]="!selectedValue" |
| 105 | (click)="changeSectionTo('Pickup'); addAction({type: 'startMatchAction', position: selectedValue});" |
| 106 | > |
| 107 | Start Match |
| 108 | </button> |
| 109 | </div> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 110 | </div> |
| 111 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 112 | <div *ngSwitchCase="'Pickup'" id="PickUp" class="container-fluid"> |
Filip Kujawa | 493b59f | 2023-03-11 17:58:59 -0800 | [diff] [blame] | 113 | <h6 class="text-muted"> |
| 114 | Last Action: {{actionList[actionList.length - 1].type}} |
| 115 | </h6> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 116 | <!-- |
Filip Kujawa | aa7d11f | 2023-04-13 09:12:32 -0700 | [diff] [blame] | 117 | Decrease distance between buttons during auto to make space for auto balancing |
| 118 | selection and keep all buttons visible without scrolling on most devices. |
| 119 | --> |
| 120 | <div |
| 121 | [ngClass]="{'d-grid': true, 'gap-3': autoPhase === true, 'gap-5': autoPhase === false}" |
| 122 | > |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 123 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 124 | <button |
| 125 | class="btn btn-danger" |
| 126 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});" |
| 127 | > |
| 128 | DEAD |
| 129 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 130 | <button |
| 131 | class="btn btn-warning" |
| 132 | (click)="changeSectionTo('Place'); addAction({type: 'pickupObjectAction', objectType: ObjectType.kCone});" |
| 133 | > |
| 134 | CONE |
| 135 | </button> |
| 136 | <button |
| 137 | class="btn btn-primary" |
| 138 | (click)="changeSectionTo('Place'); addAction({type: 'pickupObjectAction', objectType: ObjectType.kCube});" |
| 139 | > |
| 140 | CUBE |
| 141 | </button> |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 142 | <button |
Filip Kujawa | b73e94c | 2023-04-19 09:33:14 -0700 | [diff] [blame] | 143 | *ngIf="autoPhase && !mobilityCompleted" |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 144 | class="btn btn-light" |
| 145 | (click)="addAction({type: 'mobilityAction', mobility: true});" |
| 146 | > |
| 147 | Mobility |
| 148 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 149 | <!-- 'Balancing' during auto. --> |
| 150 | <div *ngIf="autoPhase" class="d-grid gap-2"> |
| 151 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 152 | <input |
| 153 | #docked |
| 154 | type="radio" |
| 155 | id="option1" |
| 156 | name="docked_engaged" |
| 157 | value="docked" |
| 158 | /> |
Philipp Schrader | 87fe98a | 2023-04-15 17:26:34 -0700 | [diff] [blame] | 159 | Docked (on the charging station) |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 160 | </label> |
| 161 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 162 | <input |
| 163 | #engaged |
| 164 | type="radio" |
| 165 | id="option2" |
| 166 | name="docked_engaged" |
| 167 | value="dockedengaged" |
| 168 | /> |
| 169 | Docked & Engaged (level & station lights on) |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 170 | </label> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 171 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 172 | <input |
| 173 | #attempted |
| 174 | type="radio" |
| 175 | id="option3" |
| 176 | name="docked_engaged" |
| 177 | value="failed" |
| 178 | /> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 179 | Attempted to dock and engage but failed |
| 180 | </label> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 181 | <button |
| 182 | class="btn btn-dark" |
| 183 | (click)="autoPhase = false; addAction({type: 'endAutoPhase'}); addAction({type: 'autoBalanceAction', docked: docked.checked, engaged: engaged.checked, balanceAttempt: attempted.checked});" |
| 184 | > |
| 185 | Start Teleop |
| 186 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 187 | </div> |
| 188 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 189 | *ngIf="!autoPhase" |
| 190 | class="btn btn-info" |
| 191 | (click)="changeSectionTo('Endgame')" |
| 192 | > |
| 193 | Endgame |
| 194 | </button> |
| 195 | </div> |
| 196 | </div> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 197 | <div *ngSwitchCase="'Place'" id="Place" class="container-fluid"> |
Filip Kujawa | 493b59f | 2023-03-11 17:58:59 -0800 | [diff] [blame] | 198 | <h6 class="text-muted"> |
| 199 | Last Action: {{actionList[actionList.length - 1].type}} |
| 200 | </h6> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 201 | <!-- |
Filip Kujawa | aa7d11f | 2023-04-13 09:12:32 -0700 | [diff] [blame] | 202 | Decrease distance between buttons during auto to make space for auto balancing |
| 203 | selection and keep all buttons visible without scrolling on most devices. |
| 204 | --> |
| 205 | <div |
| 206 | [ngClass]="{'d-grid': true, 'gap-3': autoPhase === true, 'gap-5': autoPhase === false}" |
| 207 | > |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 208 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 209 | <button |
| 210 | class="btn btn-danger" |
| 211 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});" |
| 212 | > |
| 213 | DEAD |
| 214 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 215 | <button |
| 216 | class="btn btn-success" |
| 217 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeObjectAction', scoreLevel: ScoreLevel.kHigh});" |
| 218 | > |
| 219 | HIGH |
| 220 | </button> |
| 221 | <button |
| 222 | class="btn btn-warning" |
| 223 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeObjectAction', scoreLevel: ScoreLevel.kMiddle});" |
| 224 | > |
| 225 | MID |
| 226 | </button> |
| 227 | <button |
| 228 | class="btn btn-danger" |
| 229 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeObjectAction', scoreLevel: ScoreLevel.kLow});" |
| 230 | > |
| 231 | LOW |
| 232 | </button> |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 233 | <button |
Filip Kujawa | b73e94c | 2023-04-19 09:33:14 -0700 | [diff] [blame] | 234 | *ngIf="autoPhase && !mobilityCompleted" |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 235 | class="btn btn-light" |
| 236 | (click)="addAction({type: 'mobilityAction', mobility: true});" |
| 237 | > |
| 238 | Mobility |
| 239 | </button> |
Filip Kujawa | 7a045e7 | 2023-04-13 08:41:09 -0700 | [diff] [blame] | 240 | <!-- Impossible to place supercharged pieces in auto. --> |
| 241 | <div *ngIf="autoPhase == false" class="d-grid gap-2"> |
| 242 | <button |
| 243 | class="btn btn-dark" |
| 244 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeObjectAction', scoreLevel: ScoreLevel.kSupercharged});" |
| 245 | > |
| 246 | SUPERCHARGED |
| 247 | </button> |
| 248 | </div> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 249 | <!-- 'Balancing' during auto. --> |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 250 | <div *ngIf="autoPhase" class="d-grid gap-1"> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 251 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 252 | <input |
| 253 | #docked |
| 254 | type="radio" |
| 255 | id="option1" |
| 256 | name="docked_engaged" |
| 257 | value="docked" |
| 258 | /> |
Philipp Schrader | 87fe98a | 2023-04-15 17:26:34 -0700 | [diff] [blame] | 259 | Docked (on the charging station) |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 260 | </label> |
| 261 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 262 | <input |
| 263 | #engaged |
| 264 | type="radio" |
| 265 | id="option2" |
| 266 | name="docked_engaged" |
| 267 | value="dockedengaged" |
| 268 | /> |
| 269 | Docked & Engaged (level & station lights on) |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 270 | </label> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 271 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 272 | <input |
| 273 | #attempted |
| 274 | type="radio" |
| 275 | id="option3" |
| 276 | name="docked_engaged" |
| 277 | value="failed" |
| 278 | /> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 279 | Attempted to dock and engage but failed |
| 280 | </label> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 281 | <button |
| 282 | class="btn btn-dark" |
| 283 | (click)="autoPhase = false; addAction({type: 'endAutoPhase'}); addAction({type: 'autoBalanceAction', docked: docked.checked, engaged: engaged.checked, balanceAttempt: attempted.checked});" |
| 284 | > |
| 285 | Start Teleop |
| 286 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 287 | </div> |
| 288 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 289 | *ngIf="!autoPhase" |
| 290 | class="btn btn-info" |
| 291 | (click)="changeSectionTo('Endgame')" |
| 292 | > |
| 293 | Endgame |
| 294 | </button> |
| 295 | </div> |
| 296 | </div> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 297 | <div *ngSwitchCase="'Endgame'" id="Endgame" class="container-fluid"> |
Filip Kujawa | 493b59f | 2023-03-11 17:58:59 -0800 | [diff] [blame] | 298 | <h6 class="text-muted"> |
| 299 | Last Action: {{actionList[actionList.length - 1].type}} |
| 300 | </h6> |
Filip Kujawa | 36f5608 | 2023-03-03 10:58:53 -0800 | [diff] [blame] | 301 | <div class="d-grid gap-5"> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 302 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 303 | <button |
| 304 | class="btn btn-danger" |
| 305 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotOn: false});" |
| 306 | > |
| 307 | DEAD |
| 308 | </button> |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 309 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 310 | <input |
| 311 | #docked |
| 312 | type="radio" |
| 313 | id="option1" |
| 314 | name="docked_engaged" |
| 315 | value="docked" |
| 316 | /> |
Philipp Schrader | 87fe98a | 2023-04-15 17:26:34 -0700 | [diff] [blame] | 317 | Docked (on the charging station) |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 318 | </label> |
| 319 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 320 | <input |
| 321 | #engaged |
| 322 | type="radio" |
| 323 | id="option2" |
| 324 | name="docked_engaged" |
| 325 | value="dockedengaged" |
| 326 | /> |
| 327 | Docked & Engaged (level & station lights on) |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 328 | </label> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 329 | <label> |
Evelyn Yang | 6cc153d | 2023-05-24 19:35:16 -0700 | [diff] [blame] | 330 | <input |
| 331 | #attempted |
| 332 | type="radio" |
| 333 | id="option3" |
| 334 | name="docked_engaged" |
| 335 | value="failed" |
| 336 | /> |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 337 | Attempted to dock and engage but failed |
| 338 | </label> |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 339 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 340 | *ngIf="!autoPhase" |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 341 | class="btn btn-info" |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 342 | (click)="changeSectionTo('Review and Submit'); addAction({type: 'endMatchAction', docked: docked.checked, engaged: engaged.checked, balanceAttempt: attempted.checked});" |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 343 | > |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 344 | End Match |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 345 | </button> |
| 346 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 347 | </div> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 348 | <div *ngSwitchCase="'Dead'" id="Dead" class="container-fluid"> |
| 349 | <h2>Robot is dead</h2> |
| 350 | <div class="d-grid gap-2"> |
| 351 | <button |
| 352 | class="btn btn-success" |
| 353 | (click)="changeSectionTo('Pickup'); addAction({type: 'robotDeathAction', robotOn: true}); " |
| 354 | > |
| 355 | Revive |
| 356 | </button> |
Filip Kujawa | 32d13b6 | 2023-03-11 17:41:53 -0800 | [diff] [blame] | 357 | <button |
| 358 | class="btn btn-info" |
Philipp Schrader | 8686bbb | 2023-03-22 20:15:21 -0700 | [diff] [blame] | 359 | (click)="changeSectionTo('Review and Submit'); addAction({type: 'endMatchAction', docked: docked.checked, engaged: engaged.checked});" |
Filip Kujawa | 32d13b6 | 2023-03-11 17:41:53 -0800 | [diff] [blame] | 360 | > |
| 361 | End Match |
| 362 | </button> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 363 | </div> |
| 364 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 365 | <div *ngSwitchCase="'Review and Submit'" id="Review" class="container-fluid"> |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 366 | <div class="row"> |
| 367 | <ul id="review_data"> |
| 368 | <li |
| 369 | *ngFor="let action of actionList" |
| 370 | [ngValue]="action" |
| 371 | style="display: flex" |
| 372 | > |
| 373 | <div [ngSwitch]="action.type" style="padding: 0px"> |
| 374 | <span *ngSwitchCase="'startMatchAction'"> |
| 375 | Started match at position {{action.position}} |
| 376 | </span> |
| 377 | <span *ngSwitchCase="'pickupObjectAction'"> |
| 378 | Picked up {{stringifyObjectType(action.objectType)}} |
| 379 | </span> |
| 380 | <span *ngSwitchCase="'placeObjectAction'"> |
| 381 | Placed at {{stringifyScoreLevel(action.scoreLevel)}} |
| 382 | </span> |
| 383 | <span *ngSwitchCase="'autoBalanceAction'"> |
| 384 | Docked: {{action.docked}}, engaged: {{action.engaged}}, attempted |
| 385 | to balance and engage: {{action.balanceAttempt}} |
| 386 | </span> |
| 387 | <span *ngSwitchCase="'endAutoPhase'">Ended auto phase</span> |
| 388 | <span *ngSwitchCase="'endMatchAction'"> |
| 389 | Ended Match; docked: {{action.docked}}, engaged: |
| 390 | {{action.engaged}}, attempted to dock and engage: |
| 391 | {{action.balanceAttempt}} |
| 392 | </span> |
| 393 | <span *ngSwitchCase="'robotDeathAction'"> |
| 394 | Robot on: {{action.robotOn}} |
| 395 | </span> |
| 396 | <span *ngSwitchCase="'mobilityAction'"> |
| 397 | Mobility: {{action.mobility}} |
| 398 | </span> |
| 399 | <span *ngSwitchDefault>{{action.type}}</span> |
| 400 | </div> |
| 401 | </li> |
| 402 | </ul> |
| 403 | </div> |
Filip Kujawa | 36f5608 | 2023-03-03 10:58:53 -0800 | [diff] [blame] | 404 | <div class="d-grid gap-5"> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 405 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
Filip Kujawa | 32d13b6 | 2023-03-11 17:41:53 -0800 | [diff] [blame] | 406 | <button class="btn btn-warning" (click)="submitActions();">Submit</button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 407 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 408 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 409 | <div *ngSwitchCase="'Success'" id="Success" class="container-fluid"> |
| 410 | <h2>Successfully submitted data.</h2> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 411 | </div> |
Philipp Schrader | 8686bbb | 2023-03-22 20:15:21 -0700 | [diff] [blame] | 412 | |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 413 | <span class="progress_message" role="alert">{{ progressMessage }}</span> |
Philipp Schrader | 8686bbb | 2023-03-22 20:15:21 -0700 | [diff] [blame] | 414 | <span class="error_message" role="alert">{{ errorMessage }}</span> |
Philipp Schrader | 8058743 | 2022-03-05 15:41:22 -0800 | [diff] [blame] | 415 | </ng-container> |