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" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 84 | src="/sha256/bb83d2c976c1496bb470371821d1d1882d6baf31178009a6f6cba579880c6a03/pictures/field/2024_field.png" |
Filip Kujawa | 1d9add9 | 2023-03-03 13:14:40 -0800 | [diff] [blame] | 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" |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 126 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});" |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 127 | > |
| 128 | DEAD |
| 129 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 130 | <button |
| 131 | class="btn btn-warning" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 132 | (click)="changeSectionTo('Place'); addAction({type: 'pickupNoteAction'});" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 133 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 134 | NOTE |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 135 | </button> |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 136 | <button |
Filip Kujawa | b73e94c | 2023-04-19 09:33:14 -0700 | [diff] [blame] | 137 | *ngIf="autoPhase && !mobilityCompleted" |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 138 | class="btn btn-light" |
| 139 | (click)="addAction({type: 'mobilityAction', mobility: true});" |
| 140 | > |
| 141 | Mobility |
| 142 | </button> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 143 | <div style="display: flex"> |
| 144 | <h5>Penalties :</h5> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 145 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 146 | class="btn-light" |
| 147 | style="width: 40px; margin-right: 15px" |
| 148 | (click)="removePenalty()" |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 149 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 150 | - |
| 151 | </button> |
| 152 | <p>{{this.penalties}}</p> |
| 153 | <button |
| 154 | class="btn-light" |
| 155 | style="width: 40px; margin-left: 15px" |
| 156 | (click)="addPenalty()" |
| 157 | > |
| 158 | + |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 159 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 160 | </div> |
| 161 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 162 | *ngIf="autoPhase" |
| 163 | class="btn btn-dark" |
| 164 | (click)="autoPhase = false; addAction({type: 'endAutoPhase'});" |
| 165 | > |
| 166 | Start Teleop |
| 167 | </button> |
| 168 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 169 | *ngIf="!autoPhase" |
| 170 | class="btn btn-info" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 171 | (click)="changeSectionTo('Endgame'); addAction({type: 'endTeleopPhase'});" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 172 | > |
| 173 | Endgame |
| 174 | </button> |
| 175 | </div> |
| 176 | </div> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 177 | <div *ngSwitchCase="'Place'" id="Place" class="container-fluid"> |
Filip Kujawa | 493b59f | 2023-03-11 17:58:59 -0800 | [diff] [blame] | 178 | <h6 class="text-muted"> |
| 179 | Last Action: {{actionList[actionList.length - 1].type}} |
| 180 | </h6> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 181 | <!-- |
Filip Kujawa | aa7d11f | 2023-04-13 09:12:32 -0700 | [diff] [blame] | 182 | Decrease distance between buttons during auto to make space for auto balancing |
| 183 | selection and keep all buttons visible without scrolling on most devices. |
| 184 | --> |
| 185 | <div |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 186 | [ngClass]="{'d-grid': true, 'gap-4': autoPhase === true, 'gap-3': autoPhase === false}" |
Filip Kujawa | aa7d11f | 2023-04-13 09:12:32 -0700 | [diff] [blame] | 187 | > |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 188 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 189 | <button |
| 190 | class="btn btn-danger" |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 191 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});" |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 192 | > |
| 193 | DEAD |
| 194 | </button> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 195 | <button |
| 196 | class="btn btn-info" |
| 197 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kDROPPED});" |
| 198 | > |
| 199 | Dropped |
| 200 | </button> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 201 | <div *ngIf="!autoPhase" class="d-grid gap-1" style="padding: 0"> |
| 202 | <div |
| 203 | style=" |
| 204 | display: flex-wrap; |
| 205 | padding: 0; |
| 206 | justify-content: center; |
| 207 | text-align: center; |
| 208 | align-content: center; |
| 209 | margin: 0; |
| 210 | " |
| 211 | > |
| 212 | <button |
| 213 | class="btn btn-success" |
| 214 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kAMP});" |
| 215 | style="width: 48%; height: 12vh; margin: 0px 10px 10px 0px" |
| 216 | > |
| 217 | AMP |
| 218 | </button> |
| 219 | |
| 220 | <button |
| 221 | class="btn btn-warning" |
| 222 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kAMP_AMPLIFIED});" |
| 223 | style="width: 48%; height: 12vh; margin: 0px 0px 10px 0px" |
| 224 | > |
| 225 | AMP AMPLIFIED |
| 226 | </button> |
| 227 | <button |
| 228 | class="btn btn-success" |
| 229 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kSPEAKER});" |
| 230 | style="width: 48%; height: 12vh; margin: 0px 10px 0px 0px" |
| 231 | > |
| 232 | SPEAKER |
| 233 | </button> |
| 234 | <button |
| 235 | class="btn btn-warning" |
| 236 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kSPEAKER_AMPLIFIED});" |
| 237 | style="width: 48%; height: 12vh; margin: 0px 0px 0px 0px" |
| 238 | > |
| 239 | SPEAKER AMPLIFIED |
| 240 | </button> |
| 241 | </div> |
| 242 | </div> |
| 243 | |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 244 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 245 | *ngIf="autoPhase" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 246 | class="btn btn-success" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 247 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kAMP});" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 248 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 249 | AMP |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 250 | </button> |
| 251 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 252 | *ngIf="autoPhase" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 253 | class="btn btn-warning" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 254 | (click)="changeSectionTo('Pickup'); addAction({type: 'placeNoteAction', scoreType: ScoreType.kSPEAKER});" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 255 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 256 | SPEAKER |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 257 | </button> |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 258 | <button |
Filip Kujawa | b73e94c | 2023-04-19 09:33:14 -0700 | [diff] [blame] | 259 | *ngIf="autoPhase && !mobilityCompleted" |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 260 | class="btn btn-light" |
| 261 | (click)="addAction({type: 'mobilityAction', mobility: true});" |
| 262 | > |
| 263 | Mobility |
| 264 | </button> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 265 | <div style="display: flex"> |
| 266 | <h5>Penalties :</h5> |
Filip Kujawa | 7a045e7 | 2023-04-13 08:41:09 -0700 | [diff] [blame] | 267 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 268 | class="btn-light" |
| 269 | style="width: 40px; margin-right: 15px" |
| 270 | (click)="removePenalty()" |
Filip Kujawa | 7a045e7 | 2023-04-13 08:41:09 -0700 | [diff] [blame] | 271 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 272 | - |
Filip Kujawa | 7a045e7 | 2023-04-13 08:41:09 -0700 | [diff] [blame] | 273 | </button> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 274 | <p>{{this.penalties}}</p> |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 275 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 276 | class="btn-light" |
| 277 | style="width: 40px; margin-left: 15px" |
| 278 | (click)="addPenalty()" |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 279 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 280 | + |
Philipp Schrader | 9ade12c | 2023-04-20 13:03:33 -0700 | [diff] [blame] | 281 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 282 | </div> |
| 283 | <button |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 284 | class="btn btn-dark" |
| 285 | *ngIf="autoPhase" |
| 286 | (click)="autoPhase = false; addAction({type: 'endAutoPhase'});" |
| 287 | > |
| 288 | Start Teleop |
| 289 | </button> |
| 290 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 291 | *ngIf="!autoPhase" |
| 292 | class="btn btn-info" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 293 | (click)="changeSectionTo('Endgame'); addAction({type: 'endTeleopPhase'});" |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 294 | > |
| 295 | Endgame |
| 296 | </button> |
| 297 | </div> |
| 298 | </div> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 299 | <div *ngSwitchCase="'Endgame'" id="Endgame" class="container-fluid"> |
Filip Kujawa | 493b59f | 2023-03-11 17:58:59 -0800 | [diff] [blame] | 300 | <h6 class="text-muted"> |
| 301 | Last Action: {{actionList[actionList.length - 1].type}} |
| 302 | </h6> |
Emily Markova | 6079e2f | 2024-02-17 13:17:24 -0800 | [diff] [blame] | 303 | <div class="d-grid gap-2"> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 304 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 305 | <button |
| 306 | class="btn btn-danger" |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 307 | (click)="changeSectionTo('Dead'); addAction({type: 'robotDeathAction', robotDead: true});" |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 308 | > |
| 309 | DEAD |
| 310 | </button> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 311 | <div class="button_row"> |
| 312 | <label> |
| 313 | <input |
| 314 | #park |
| 315 | type="radio" |
| 316 | id="option1" |
| 317 | name="endgameaction" |
| 318 | value="park" |
| 319 | /> |
| 320 | Park |
| 321 | </label> |
| 322 | <label> |
| 323 | <input |
| 324 | #onStage |
| 325 | type="radio" |
| 326 | id="option2" |
| 327 | name="endgameaction" |
| 328 | value="onStage" |
| 329 | /> |
| 330 | On Stage |
| 331 | </label> |
| 332 | </div> |
| 333 | <div class="button_row"> |
| 334 | <label> |
| 335 | <input |
| 336 | #harmony |
| 337 | type="radio" |
| 338 | id="option3" |
| 339 | name="endgameaction" |
| 340 | value="harmony" |
| 341 | /> |
| 342 | Harmony |
| 343 | </label> |
| 344 | <label> |
| 345 | <input |
| 346 | #na |
| 347 | type="radio" |
| 348 | id="option2" |
| 349 | name="endgameaction" |
| 350 | value="na" |
| 351 | /> |
| 352 | N/A |
| 353 | </label> |
| 354 | </div> |
Emily Markova | 6079e2f | 2024-02-17 13:17:24 -0800 | [diff] [blame] | 355 | <label> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 356 | <input |
| 357 | #trapNote |
| 358 | type="checkbox" |
| 359 | id="trapnote" |
| 360 | name="trapnote" |
| 361 | value="trapNote" |
| 362 | /> |
| 363 | Trap Note |
| 364 | </label> |
Emily Markova | 6079e2f | 2024-02-17 13:17:24 -0800 | [diff] [blame] | 365 | <label> |
| 366 | <input |
| 367 | #spotlight |
| 368 | type="checkbox" |
| 369 | id="spotlight" |
| 370 | name="spotlight" |
| 371 | value="spotlight" |
| 372 | /> |
| 373 | Spotlight |
| 374 | </label> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 375 | |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 376 | <div style="display: flex"> |
| 377 | <h5>Penalties :</h5> |
| 378 | <button |
| 379 | class="btn-light" |
| 380 | style="width: 40px; margin-right: 15px" |
| 381 | (click)="removePenalty()" |
| 382 | > |
| 383 | - |
| 384 | </button> |
| 385 | <p>{{this.penalties}}</p> |
| 386 | <button |
| 387 | class="btn-light" |
| 388 | style="width: 40px; margin-left: 15px" |
| 389 | (click)="addPenalty()" |
| 390 | > |
| 391 | + |
| 392 | </button> |
| 393 | </div> |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 394 | <button |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 395 | *ngIf="!autoPhase" |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 396 | class="btn btn-info" |
Emily Markova | 6079e2f | 2024-02-17 13:17:24 -0800 | [diff] [blame] | 397 | (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});" |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 398 | > |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 399 | End Match |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 400 | </button> |
| 401 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 402 | </div> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 403 | <div *ngSwitchCase="'Dead'" id="Dead" class="container-fluid"> |
| 404 | <h2>Robot is dead</h2> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 405 | <div class="d-grid gap-3"> |
| 406 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
| 407 | <div style="display: flex"> |
| 408 | <h5>Penalties :</h5> |
| 409 | <button |
| 410 | class="btn-light" |
| 411 | style="width: 40px; margin-right: 15px" |
| 412 | (click)="removePenalty()" |
| 413 | > |
| 414 | - |
| 415 | </button> |
| 416 | <p>{{this.penalties}}</p> |
| 417 | <button |
| 418 | class="btn-light" |
| 419 | style="width: 40px; margin-left: 15px" |
| 420 | (click)="addPenalty()" |
| 421 | > |
| 422 | + |
| 423 | </button> |
| 424 | </div> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 425 | <button |
| 426 | class="btn btn-success" |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 427 | (click)="changeSectionTo('Pickup'); addAction({type: 'robotDeathAction', robotDead: false}); " |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 428 | > |
| 429 | Revive |
| 430 | </button> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 431 | <button |
| 432 | *ngIf="!autoPhase" |
| 433 | class="btn btn-info" |
| 434 | (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});" |
| 435 | > |
| 436 | End Match |
| 437 | </button> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 438 | </div> |
| 439 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 440 | <div *ngSwitchCase="'Review and Submit'" id="Review" class="container-fluid"> |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 441 | <div class="row"> |
| 442 | <ul id="review_data"> |
| 443 | <li |
| 444 | *ngFor="let action of actionList" |
| 445 | [ngValue]="action" |
| 446 | style="display: flex" |
| 447 | > |
| 448 | <div [ngSwitch]="action.type" style="padding: 0px"> |
| 449 | <span *ngSwitchCase="'startMatchAction'"> |
| 450 | Started match at position {{action.position}} |
| 451 | </span> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 452 | <span *ngSwitchCase="'pickupNoteAction'">Picked up Note</span> |
| 453 | <span *ngSwitchCase="'placeNoteAction'"> |
| 454 | Placed at {{stringifyScoreType(action.scoreType)}} |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 455 | </span> |
| 456 | <span *ngSwitchCase="'endAutoPhase'">Ended auto phase</span> |
| 457 | <span *ngSwitchCase="'endMatchAction'"> |
Emily Markova | 6079e2f | 2024-02-17 13:17:24 -0800 | [diff] [blame] | 458 | Ended Match; stageType: {{(action.stageType === 0 ? "kON_STAGE" : |
| 459 | action.stageType === 1 ? "kPARK" : action.stageType === 2 ? |
| 460 | "kHARMONY" : "kMISSING")}}, trapNote: {{action.trapNote}}, |
| 461 | spotlight: {{action.spotlight}} |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 462 | </span> |
| 463 | <span *ngSwitchCase="'robotDeathAction'"> |
Emily Markova | 040123c | 2024-02-27 09:48:37 -0800 | [diff] [blame^] | 464 | Robot dead: {{action.robotDead}} |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 465 | </span> |
| 466 | <span *ngSwitchCase="'mobilityAction'"> |
| 467 | Mobility: {{action.mobility}} |
| 468 | </span> |
| 469 | <span *ngSwitchDefault>{{action.type}}</span> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 470 | <span *ngSwitchCase="'penaltyAction'"> |
| 471 | Penalties: {{action.penalties}} |
| 472 | </span> |
Emily Markova | f4b06a2 | 2023-05-10 17:44:09 -0700 | [diff] [blame] | 473 | </div> |
| 474 | </li> |
| 475 | </ul> |
| 476 | </div> |
Filip Kujawa | 36f5608 | 2023-03-03 10:58:53 -0800 | [diff] [blame] | 477 | <div class="d-grid gap-5"> |
Filip Kujawa | 9f56d0e | 2023-03-03 19:44:43 -0800 | [diff] [blame] | 478 | <button class="btn btn-secondary" (click)="undoLastAction()">UNDO</button> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 479 | <button class="btn btn-warning" (click)="submit2024Actions();"> |
| 480 | Submit |
| 481 | </button> |
Filip Kujawa | 375aaac | 2023-02-28 21:43:47 -0800 | [diff] [blame] | 482 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 483 | </div> |
Filip Kujawa | 0ef334c | 2023-02-20 19:42:45 -0800 | [diff] [blame] | 484 | <div *ngSwitchCase="'Success'" id="Success" class="container-fluid"> |
| 485 | <h2>Successfully submitted data.</h2> |
Philipp Schrader | 817cce3 | 2022-03-26 15:00:00 -0700 | [diff] [blame] | 486 | </div> |
Philipp Schrader | 8686bbb | 2023-03-22 20:15:21 -0700 | [diff] [blame] | 487 | |
Philipp Schrader | 8702b78 | 2023-04-15 17:33:37 -0700 | [diff] [blame] | 488 | <span class="progress_message" role="alert">{{ progressMessage }}</span> |
Philipp Schrader | 8686bbb | 2023-03-22 20:15:21 -0700 | [diff] [blame] | 489 | <span class="error_message" role="alert">{{ errorMessage }}</span> |
Philipp Schrader | 8058743 | 2022-03-05 15:41:22 -0800 | [diff] [blame] | 490 | </ng-container> |