Add filters by priority + highlighting

This commit is contained in:
Jakob Fahr
2020-06-22 11:21:25 +02:00
parent 03e8c96a1e
commit a81a26d989
7 changed files with 110 additions and 87 deletions

View File

@@ -9,6 +9,9 @@
</a>
Tasks
</h3>
<div *ngIf="filterUserstoryId">
<a [routerLink]="'/tasks'">Alle Tasks anzeigen</a>
</div>
<button class="btn btn-secondary my-3" (click)="openTaskForm()">Neuer Task</button>
@@ -16,37 +19,43 @@
<thead>
<tr>
<th (click)="sortById()">
<th (click)="sortById()" class="sortable">
<span>ID</span>
<span *ngIf="sortBy === 'id'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
</th>
<th (click)="sortByTitle()">
<th (click)="sortByTitle()" class="sortable">
<span>Titel</span>
<span *ngIf="sortBy === 'title'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
</th>
<th (click)="sortByContent()">
<th (click)="sortByContent()" class="sortable">
<span>Inhalt</span>
<span *ngIf="sortBy === 'content'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
</th>
<th (click)="sortByTasks()">
<span>Tasks</span>
<span *ngIf="sortBy === 'tasks'" class="pl-3">
<th (click)="sortByTasks()" class="sortable">
<span>Userstory</span>
<span *ngIf="sortBy === 'userstory'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
</th>
<th (click)="sortByPrio()">
<th (click)="sortByPrio()" class="sortable">
<span>Priorität</span>
<span *ngIf="sortBy === 'priority'" class="pl-3">
<label class="pl-3" (click)="$event.stopPropagation()">
<select [(ngModel)]="filterPriority">
<option [ngValue]="null" selected></option>
<option *ngFor="let p of getAllPriorities()" [ngValue]="p">{{p}}</option>
</select>
</label>
<span *ngIf="sortBy === 'priority'" (click)="sortByPrio()" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
@@ -56,7 +65,7 @@
</thead>
<tbody>
<tr *ngFor="let task of filteredItems">
<tr *ngFor="let task of filteredItems" [class.table-info]="task.id === highlightId">
<td>{{task.id}}</td>
<td>{{task.title}}</td>
<td>{{task.content}}</td>