Added Sorting to the new collumns

This commit is contained in:
Nicolai Ort 2020-06-29 17:21:07 +02:00
parent cf0e8ee2cd
commit e009ac1386
4 changed files with 14 additions and 14 deletions

View File

@ -42,7 +42,7 @@
</th>
<th (click)="sortByStatus()" class="sortable">
<span>Status</span>
<span *ngIf="sortBy === 'status'" class="pl-3">
<span *ngIf="sortBy === 'statusid'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
@ -62,14 +62,14 @@
</th>
<th (click)="sortByAssigned()" class="sortable">
<span>Assigned To</span>
<span *ngIf="sortBy === 'assignedto'" class="pl-3">
<span *ngIf="sortBy === 'assignedtoid'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
</th>
<th (click)="sortByCategory()" class="sortable">
<span>Category</span>
<span *ngIf="sortBy === 'category'" class="pl-3">
<span *ngIf="sortBy === 'categoryid'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
@ -95,12 +95,12 @@
<td>{{task.priority}}</td>
<td>
<a [routerLink]="['/users', {id: task.assignedtoid}]">
Status: {{task.assignedtoid}}
User: {{task.assignedtoid}}
</a>
</td>
<td>
<a [routerLink]="['/categories', {id: task.categoryid}]">
Status: {{task.categoryid}}
Category: {{task.categoryid}}
</a>
</td>
<td>

View File

@ -94,13 +94,13 @@ export class TaskTableComponent extends TableComponentBase<ScrumTask> {
}
sortByStatus() {
this.doStringSort('title', task => task.title);
this.doNumericSort('statusid', task => task.statusid);
}
sortByAssigned() {
this.doStringSort('title', task => task.title);
this.doNumericSort('assignedtoid', task => task.assignedtoid);
}
sortByCategory() {
this.doStringSort('title', task => task.title);
this.doNumericSort('categoryid', task => task.categoryid);
}
private findTaskById(id: number): ScrumTask {

View File

@ -31,7 +31,7 @@
</th>
<th (click)="sortByStatus()" class="sortable">
<span>Status</span>
<span *ngIf="sortBy === 'status'" class="pl-3">
<span *ngIf="sortBy === 'statusid'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
@ -51,7 +51,7 @@
</th>
<th (click)="sortByCategory()" class="sortable">
<span>Category</span>
<span *ngIf="sortBy === 'category'" class="pl-3">
<span *ngIf="sortBy === 'categoryid'" class="pl-3">
<span *ngIf="sortDescending"></span>
<span *ngIf="sortDescending === false"></span>
</span>
@ -73,11 +73,11 @@
<a [routerLink]="['/status', {id: userstory.statusid}]">
Status: {{userstory.statusid}}
</a>
</td>s
</td>
<td>{{userstory.priority}}</td>
<td>
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
Status: {{userstory.categoryid}}
Category: {{userstory.categoryid}}
</a>
</td>
<td>

View File

@ -97,9 +97,9 @@ export class UserstoryTableComponent extends TableComponentBase<ScrumUserstory>
}
sortByStatus() {
this.doStringSort('title', us => us.title);
this.doNumericSort('statusid', us => us.statusid);
}
sortByCategory() {
this.doStringSort('title', us => us.title);
this.doNumericSort('categoryid', us => us.categoryid);
}
}