|
|
@@ -1,27 +1,30 @@
|
|
|
-<h1 mat-dialog-title>Choose a Track</h1>
|
|
|
-<div mat-dialog-content>
|
|
|
- <form class="vertical-form" (ngSubmit)="search($event)">
|
|
|
- <mat-form-field appearance="fill">
|
|
|
- <mat-label>Filter text</mat-label>
|
|
|
- <input matInput name="nameFilter" [(ngModel)]="nameFilter">
|
|
|
- </mat-form-field>
|
|
|
+<form class="vertical-form" (ngSubmit)="search($event)">
|
|
|
+ <span class="p-input-icon-left">
|
|
|
+ <i class="pi pi-search"></i>
|
|
|
+ <input type="text" pInputText name="nameFilter" [(ngModel)]="nameFilter" placeholder="Filter text">
|
|
|
+ </span>
|
|
|
|
|
|
- <div class="button-group">
|
|
|
- <button type="submit" mat-raised-button color="accent">Search</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
+ <div class="button-group">
|
|
|
+ <button type="submit" pButton>Search</button>
|
|
|
+ </div>
|
|
|
+</form>
|
|
|
|
|
|
- <mat-list role="list">
|
|
|
- <mat-list-item role="listitem" *ngFor="let track of tracks | async">
|
|
|
- <div matListItemTitle>{{ track.displayName }}</div>
|
|
|
- <div matListItemLine>{{ track.distance }}</div>
|
|
|
- <div matListItemMeta><button type="button" mat-button (click)="onPick(track)">Pick</button></div>
|
|
|
- </mat-list-item>
|
|
|
- </mat-list>
|
|
|
+<p-table [value]="(tracks | async) ?? []" selectionMode="single" (onRowSelect)="onPick($event)" dataKey="trackId">
|
|
|
+ <ng-template pTemplate="header">
|
|
|
+ <tr>
|
|
|
+ <th>Name</th>
|
|
|
+ <th>Distance</th>
|
|
|
+ </tr>
|
|
|
+ </ng-template>
|
|
|
+ <ng-template pTemplate="body" let-track>
|
|
|
+ <tr [pSelectableRow]="track">
|
|
|
+ <td>{{ track.displayName }}</td>
|
|
|
+ <td>{{ track.distance }}</td>
|
|
|
+ </tr>
|
|
|
+ </ng-template>
|
|
|
+</p-table>
|
|
|
|
|
|
- <button mat-raised-button color="accent" [disabled]="!hasMore" (click)="loadMore()">More</button>
|
|
|
-</div>
|
|
|
-<div mat-dialog-actions>
|
|
|
- <button mat-button (click)="onCancelClick()">Cancel</button>
|
|
|
- <button mat-button (click)="onPick(null)">None</button>
|
|
|
+<div class="button-group">
|
|
|
+ <button type="button" pInputText [disabled]="!hasMore" (click)="loadMore()">More</button>
|
|
|
+ <button type="button" pInputText (click)="clear()">None</button>
|
|
|
</div>
|