Ishan Katpally | dad5f1a | 2022-03-23 21:06:36 -0700 | [diff] [blame] | 1 | <h2>View Data</h2> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 2 | <!-- Drop down to select data type. --> |
| 3 | <div class="dropdown"> |
| 4 | <button |
| 5 | class="btn btn-secondary dropdown-toggle" |
| 6 | type="button" |
| 7 | data-bs-toggle="dropdown" |
| 8 | aria-expanded="false" |
| 9 | > |
| 10 | {{currentSource}} |
| 11 | </button> |
| 12 | <ul class="dropdown-menu"> |
| 13 | <li> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 14 | <a |
| 15 | class="dropdown-item" |
| 16 | href="#" |
| 17 | (click)="switchDataSource('Notes')" |
| 18 | id="notes_source_dropdown" |
| 19 | > |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 20 | Notes |
| 21 | </a> |
| 22 | </li> |
| 23 | <li> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 24 | <a |
| 25 | class="dropdown-item" |
| 26 | href="#" |
| 27 | (click)="switchDataSource('Stats2023')" |
| 28 | id="stats_source_dropdown" |
| 29 | > |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 30 | Stats |
| 31 | </a> |
| 32 | </li> |
| 33 | <li> |
| 34 | <a |
| 35 | class="dropdown-item" |
| 36 | href="#" |
Emily Markova | 8e39f45 | 2023-12-23 12:17:30 -0800 | [diff] [blame] | 37 | (click)="switchDataSource('PitImages')" |
| 38 | id="pit_images_source_dropdown" |
| 39 | > |
| 40 | PitImages |
| 41 | </a> |
| 42 | </li> |
| 43 | <li> |
| 44 | <a |
| 45 | class="dropdown-item" |
| 46 | href="#" |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 47 | (click)="switchDataSource('DriverRanking')" |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 48 | id="driver_ranking_source_dropdown" |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 49 | > |
| 50 | Driver Ranking |
| 51 | </a> |
| 52 | </li> |
| 53 | </ul> |
| 54 | </div> |
| 55 | <h4>{{errorMessage}}</h4> |
| 56 | <h4>{{progressMessage}}</h4> |
| 57 | |
| 58 | <ng-container [ngSwitch]="currentSource"> |
| 59 | <!-- Notes Data Display. --> |
| 60 | <div *ngSwitchCase="'Notes'"> |
| 61 | <table class="table"> |
| 62 | <thead> |
| 63 | <tr> |
| 64 | <th scope="col" class="d-flex flex-row"> |
| 65 | <div class="align-self-center">Team</div> |
| 66 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 67 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 68 | </div> |
| 69 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 70 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 71 | </div> |
| 72 | </th> |
| 73 | <th scope="col">Match</th> |
| 74 | <th scope="col">Note</th> |
| 75 | <th scope="col">Keywords</th> |
| 76 | <th scope="col"></th> |
| 77 | </tr> |
| 78 | </thead> |
| 79 | <tbody> |
| 80 | <tr *ngFor="let note of noteList; index as i;"> |
| 81 | <th scope="row">{{note.team()}}</th> |
| 82 | <!-- Placeholder for match number. --> |
| 83 | <td>0</td> |
| 84 | <td>{{note.notes()}}</td> |
| 85 | <td>{{parseKeywords(note)}}</td> |
| 86 | <!-- Delete Icon. --> |
| 87 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 88 | <button class="btn btn-danger" (click)="deleteNoteData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 89 | <i class="bi bi-trash"></i> |
| 90 | </button> |
| 91 | </td> |
| 92 | </tr> |
| 93 | </tbody> |
| 94 | </table> |
| 95 | </div> |
| 96 | <!-- Stats Data Display. --> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 97 | <div *ngSwitchCase="'Stats2023'"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 98 | <table class="table"> |
| 99 | <thead> |
| 100 | <tr> |
| 101 | <th scope="col" class="d-flex flex-row"> |
| 102 | <div class="align-self-center">Match</div> |
| 103 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 104 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 105 | </div> |
| 106 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 107 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 108 | </div> |
| 109 | </th> |
| 110 | <th scope="col">Team</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 111 | <th scope="col">Comp Level</th> |
Filip Kujawa | ce7d282 | 2023-09-23 23:26:17 -0700 | [diff] [blame] | 112 | <th scope="col">Scout</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 113 | <th scope="col"></th> |
| 114 | </tr> |
| 115 | </thead> |
| 116 | <tbody> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 117 | <tr *ngFor="let stat2023 of statList; index as i;"> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 118 | <th scope="row">{{stat2023.matchNumber()}}</th> |
| 119 | <td>{{stat2023.teamNumber()}}</td> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 120 | <td>{{COMP_LEVEL_LABELS[stat2023.compLevel()]}}</td> |
Filip Kujawa | ce7d282 | 2023-09-23 23:26:17 -0700 | [diff] [blame] | 121 | <td>{{stat2023.collectedBy()}}</td> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 122 | <!-- Delete Icon. --> |
| 123 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 124 | <button |
| 125 | class="btn btn-danger" |
| 126 | id="delete_button_{{i}}" |
| 127 | (click)="deleteDataScouting(stat2023.compLevel(), stat2023.matchNumber(), stat2023.setNumber(), stat2023.teamNumber())" |
| 128 | > |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 129 | <i class="bi bi-trash"></i> |
| 130 | </button> |
| 131 | </td> |
| 132 | </tr> |
| 133 | </tbody> |
| 134 | </table> |
| 135 | </div> |
Emily Markova | 8e39f45 | 2023-12-23 12:17:30 -0800 | [diff] [blame] | 136 | <!-- Pit Images Data Display. --> |
| 137 | <div *ngSwitchCase="'PitImages'"> |
| 138 | <table class="table collapse-border"> |
| 139 | <thead> |
| 140 | <tr> |
| 141 | <th scope="col" class="d-flex flex-row"> |
| 142 | <div class="align-self-center">Team</div> |
| 143 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 144 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 145 | </div> |
| 146 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 147 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 148 | </div> |
| 149 | </th> |
| 150 | <th scope="col" style="max-width: 200px; max-height: 200px"> |
| 151 | Image(s) |
| 152 | </th> |
| 153 | </tr> |
| 154 | </thead> |
| 155 | <tbody> |
| 156 | <tr *ngFor="let pitImageArr of pitImageList"> |
| 157 | <th scope="row" class="align-text"> |
| 158 | {{pitImageArr[0].teamNumber()}} |
| 159 | </th> |
| 160 | <td style="display: flex"> |
| 161 | <div *ngFor="let pitImage of pitImageArr" class="align-images"> |
| 162 | <img |
| 163 | src="/sha256/{{ pitImage.checkSum() }}/{{ pitImage.imagePath() }}" |
| 164 | style="max-width: 50px; max-height: 50px; padding: 0; margin: 0" |
| 165 | /> |
| 166 | </div> |
| 167 | </td> |
| 168 | </tr> |
| 169 | </tbody> |
| 170 | </table> |
| 171 | </div> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 172 | <!-- Driver Ranking Data Display. --> |
| 173 | <div *ngSwitchCase="'DriverRanking'"> |
| 174 | <table class="table"> |
| 175 | <thead> |
| 176 | <tr> |
| 177 | <th scope="col" class="d-flex flex-row"> |
| 178 | <div class="align-self-center">Match</div> |
| 179 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 180 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 181 | </div> |
| 182 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 183 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 184 | </div> |
| 185 | </th> |
| 186 | <th scope="col">Rank1</th> |
| 187 | <th scope="col">Rank2</th> |
| 188 | <th scope="col">Rank3</th> |
| 189 | <th scope="col"></th> |
| 190 | </tr> |
| 191 | </thead> |
| 192 | <tbody> |
| 193 | <tr *ngFor="let ranking of driverRankingList; index as i;"> |
| 194 | <th scope="row">{{ranking.matchNumber()}}</th> |
| 195 | <td>{{ranking.rank1()}}</td> |
| 196 | <td>{{ranking.rank2()}}</td> |
| 197 | <td>{{ranking.rank3()}}</td> |
| 198 | <!-- Delete Icon. --> |
| 199 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 200 | <button class="btn btn-danger" (click)="deleteDriverRankingData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 201 | <i class="bi bi-trash"></i> |
| 202 | </button> |
| 203 | </td> |
| 204 | </tr> |
| 205 | </tbody> |
| 206 | </table> |
| 207 | </div> |
| 208 | </ng-container> |