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="#" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 27 | (click)="switchDataSource('Stats2024')" |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 28 | id="stats_source_dropdown" |
| 29 | > |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 30 | Stats2024 |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 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> |
Emily Markova | cf893f4 | 2024-03-13 19:03:10 -0700 | [diff] [blame] | 74 | <th scope="col">Notes</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 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> |
Emily Markova | cf893f4 | 2024-03-13 19:03:10 -0700 | [diff] [blame] | 82 | <th scope="row">{{note.matchNumber()}}</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 83 | <td>{{note.notes()}}</td> |
| 84 | <td>{{parseKeywords(note)}}</td> |
| 85 | <!-- Delete Icon. --> |
| 86 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 87 | <button class="btn btn-danger" (click)="deleteNoteData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 88 | <i class="bi bi-trash"></i> |
| 89 | </button> |
| 90 | </td> |
| 91 | </tr> |
| 92 | </tbody> |
| 93 | </table> |
| 94 | </div> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 95 | <!-- Stats2024 Data Display. --> |
| 96 | <div *ngSwitchCase="'Stats2024'"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 97 | <table class="table"> |
| 98 | <thead> |
| 99 | <tr> |
| 100 | <th scope="col" class="d-flex flex-row"> |
| 101 | <div class="align-self-center">Match</div> |
| 102 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 103 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 104 | </div> |
| 105 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 106 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 107 | </div> |
| 108 | </th> |
| 109 | <th scope="col">Team</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 110 | <th scope="col">Comp Level</th> |
Filip Kujawa | ce7d282 | 2023-09-23 23:26:17 -0700 | [diff] [blame] | 111 | <th scope="col">Scout</th> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 112 | <th scope="col"></th> |
| 113 | </tr> |
| 114 | </thead> |
| 115 | <tbody> |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 116 | <tr *ngFor="let stat2024 of statList; index as i;"> |
| 117 | <th scope="row">{{stat2024.matchNumber()}}</th> |
| 118 | <td>{{stat2024.teamNumber()}}</td> |
| 119 | <td>{{COMP_LEVEL_LABELS[stat2024.compLevel()]}}</td> |
| 120 | <td>{{stat2024.collectedBy()}}</td> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 121 | <!-- Delete Icon. --> |
| 122 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 123 | <button |
| 124 | class="btn btn-danger" |
| 125 | id="delete_button_{{i}}" |
Emily Markova | dcadcb6 | 2024-02-03 13:07:17 -0800 | [diff] [blame] | 126 | (click)="delete2024DataScouting(stat2024.compLevel(), stat2024.matchNumber(), stat2024.setNumber(), stat2024.teamNumber())" |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 127 | > |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 128 | <i class="bi bi-trash"></i> |
| 129 | </button> |
| 130 | </td> |
| 131 | </tr> |
| 132 | </tbody> |
| 133 | </table> |
| 134 | </div> |
Emily Markova | 8e39f45 | 2023-12-23 12:17:30 -0800 | [diff] [blame] | 135 | <!-- Pit Images Data Display. --> |
| 136 | <div *ngSwitchCase="'PitImages'"> |
| 137 | <table class="table collapse-border"> |
| 138 | <thead> |
| 139 | <tr> |
| 140 | <th scope="col" class="d-flex flex-row"> |
| 141 | <div class="align-self-center">Team</div> |
| 142 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 143 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 144 | </div> |
| 145 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 146 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 147 | </div> |
| 148 | </th> |
| 149 | <th scope="col" style="max-width: 200px; max-height: 200px"> |
| 150 | Image(s) |
| 151 | </th> |
| 152 | </tr> |
| 153 | </thead> |
| 154 | <tbody> |
| 155 | <tr *ngFor="let pitImageArr of pitImageList"> |
| 156 | <th scope="row" class="align-text"> |
| 157 | {{pitImageArr[0].teamNumber()}} |
| 158 | </th> |
| 159 | <td style="display: flex"> |
| 160 | <div *ngFor="let pitImage of pitImageArr" class="align-images"> |
| 161 | <img |
| 162 | src="/sha256/{{ pitImage.checkSum() }}/{{ pitImage.imagePath() }}" |
| 163 | style="max-width: 50px; max-height: 50px; padding: 0; margin: 0" |
| 164 | /> |
| 165 | </div> |
| 166 | </td> |
| 167 | </tr> |
| 168 | </tbody> |
| 169 | </table> |
| 170 | </div> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 171 | <!-- Driver Ranking Data Display. --> |
| 172 | <div *ngSwitchCase="'DriverRanking'"> |
| 173 | <table class="table"> |
| 174 | <thead> |
| 175 | <tr> |
| 176 | <th scope="col" class="d-flex flex-row"> |
| 177 | <div class="align-self-center">Match</div> |
| 178 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 179 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 180 | </div> |
| 181 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 182 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 183 | </div> |
| 184 | </th> |
| 185 | <th scope="col">Rank1</th> |
| 186 | <th scope="col">Rank2</th> |
| 187 | <th scope="col">Rank3</th> |
| 188 | <th scope="col"></th> |
| 189 | </tr> |
| 190 | </thead> |
| 191 | <tbody> |
| 192 | <tr *ngFor="let ranking of driverRankingList; index as i;"> |
| 193 | <th scope="row">{{ranking.matchNumber()}}</th> |
| 194 | <td>{{ranking.rank1()}}</td> |
| 195 | <td>{{ranking.rank2()}}</td> |
| 196 | <td>{{ranking.rank3()}}</td> |
| 197 | <!-- Delete Icon. --> |
| 198 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame] | 199 | <button class="btn btn-danger" (click)="deleteDriverRankingData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 200 | <i class="bi bi-trash"></i> |
| 201 | </button> |
| 202 | </td> |
| 203 | </tr> |
| 204 | </tbody> |
| 205 | </table> |
| 206 | </div> |
| 207 | </ng-container> |