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="#" |
| 37 | (click)="switchDataSource('DriverRanking')" |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame^] | 38 | id="driver_ranking_source_dropdown" |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 39 | > |
| 40 | Driver Ranking |
| 41 | </a> |
| 42 | </li> |
| 43 | </ul> |
| 44 | </div> |
| 45 | <h4>{{errorMessage}}</h4> |
| 46 | <h4>{{progressMessage}}</h4> |
| 47 | |
| 48 | <ng-container [ngSwitch]="currentSource"> |
| 49 | <!-- Notes Data Display. --> |
| 50 | <div *ngSwitchCase="'Notes'"> |
| 51 | <table class="table"> |
| 52 | <thead> |
| 53 | <tr> |
| 54 | <th scope="col" class="d-flex flex-row"> |
| 55 | <div class="align-self-center">Team</div> |
| 56 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 57 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 58 | </div> |
| 59 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 60 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 61 | </div> |
| 62 | </th> |
| 63 | <th scope="col">Match</th> |
| 64 | <th scope="col">Note</th> |
| 65 | <th scope="col">Keywords</th> |
| 66 | <th scope="col"></th> |
| 67 | </tr> |
| 68 | </thead> |
| 69 | <tbody> |
| 70 | <tr *ngFor="let note of noteList; index as i;"> |
| 71 | <th scope="row">{{note.team()}}</th> |
| 72 | <!-- Placeholder for match number. --> |
| 73 | <td>0</td> |
| 74 | <td>{{note.notes()}}</td> |
| 75 | <td>{{parseKeywords(note)}}</td> |
| 76 | <!-- Delete Icon. --> |
| 77 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame^] | 78 | <button class="btn btn-danger" (click)="deleteNoteData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 79 | <i class="bi bi-trash"></i> |
| 80 | </button> |
| 81 | </td> |
| 82 | </tr> |
| 83 | </tbody> |
| 84 | </table> |
| 85 | </div> |
| 86 | <!-- Stats Data Display. --> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 87 | <div *ngSwitchCase="'Stats2023'"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 88 | <table class="table"> |
| 89 | <thead> |
| 90 | <tr> |
| 91 | <th scope="col" class="d-flex flex-row"> |
| 92 | <div class="align-self-center">Match</div> |
| 93 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 94 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 95 | </div> |
| 96 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 97 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 98 | </div> |
| 99 | </th> |
| 100 | <th scope="col">Team</th> |
| 101 | <th scope="col">Set</th> |
| 102 | <th scope="col">Comp Level</th> |
| 103 | <th scope="col"></th> |
| 104 | </tr> |
| 105 | </thead> |
| 106 | <tbody> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 107 | <tr *ngFor="let stat2023 of statList; index as i;"> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame^] | 108 | <th scope="row">{{stat2023.matchNumber()}}</th> |
| 109 | <td>{{stat2023.teamNumber()}}</td> |
Emily Markova | 132e5be | 2023-03-25 13:43:05 -0700 | [diff] [blame] | 110 | <td>{{stat2023.setNumber()}}</td> |
| 111 | <td>{{COMP_LEVEL_LABELS[stat2023.compLevel()]}}</td> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 112 | <!-- Delete Icon. --> |
| 113 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame^] | 114 | <button |
| 115 | class="btn btn-danger" |
| 116 | id="delete_button_{{i}}" |
| 117 | (click)="deleteDataScouting(stat2023.compLevel(), stat2023.matchNumber(), stat2023.setNumber(), stat2023.teamNumber())" |
| 118 | > |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 119 | <i class="bi bi-trash"></i> |
| 120 | </button> |
| 121 | </td> |
| 122 | </tr> |
| 123 | </tbody> |
| 124 | </table> |
| 125 | </div> |
| 126 | <!-- Driver Ranking Data Display. --> |
| 127 | <div *ngSwitchCase="'DriverRanking'"> |
| 128 | <table class="table"> |
| 129 | <thead> |
| 130 | <tr> |
| 131 | <th scope="col" class="d-flex flex-row"> |
| 132 | <div class="align-self-center">Match</div> |
| 133 | <div class="align-self-center" *ngIf="ascendingSort"> |
| 134 | <i (click)="sortData()" class="bi bi-caret-up"></i> |
| 135 | </div> |
| 136 | <div class="align-self-center" *ngIf="!ascendingSort"> |
| 137 | <i (click)="sortData()" class="bi bi-caret-down"></i> |
| 138 | </div> |
| 139 | </th> |
| 140 | <th scope="col">Rank1</th> |
| 141 | <th scope="col">Rank2</th> |
| 142 | <th scope="col">Rank3</th> |
| 143 | <th scope="col"></th> |
| 144 | </tr> |
| 145 | </thead> |
| 146 | <tbody> |
| 147 | <tr *ngFor="let ranking of driverRankingList; index as i;"> |
| 148 | <th scope="row">{{ranking.matchNumber()}}</th> |
| 149 | <td>{{ranking.rank1()}}</td> |
| 150 | <td>{{ranking.rank2()}}</td> |
| 151 | <td>{{ranking.rank3()}}</td> |
| 152 | <!-- Delete Icon. --> |
| 153 | <td> |
Filip Kujawa | c1ded37 | 2023-05-27 14:33:43 -0700 | [diff] [blame^] | 154 | <button class="btn btn-danger" (click)="deleteDriverRankingData()"> |
Filip Kujawa | b5a16e3 | 2022-12-14 13:21:56 -0800 | [diff] [blame] | 155 | <i class="bi bi-trash"></i> |
| 156 | </button> |
| 157 | </td> |
| 158 | </tr> |
| 159 | </tbody> |
| 160 | </table> |
| 161 | </div> |
| 162 | </ng-container> |