Added new collumns to task and userstory table (no logic yet)
This commit is contained in:
parent
eefa6de678
commit
781165e974
@ -40,6 +40,13 @@
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByStatus()" class="sortable">
|
||||
<span>Status</span>
|
||||
<span *ngIf="sortBy === 'status'" class="pl-3">
|
||||
<span *ngIf="sortDescending">▲</span>
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByPrio()" class="sortable">
|
||||
<span>Priorität</span>
|
||||
<label class="pl-3" (click)="$event.stopPropagation()">
|
||||
@ -53,6 +60,20 @@
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByAssigned()" class="sortable">
|
||||
<span>Assigned To</span>
|
||||
<span *ngIf="sortBy === 'assignedto'" 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="sortDescending">▲</span>
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -66,7 +87,22 @@
|
||||
US #{{task.userstoryid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a [routerLink]="['/status', {id: task.statusid}]">
|
||||
Status: {{task.statusid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{task.priority}}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/users', {id: task.assignedtoid}]">
|
||||
Status: {{task.assignedtoid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a [routerLink]="['/categories', {id: task.categoryid}]">
|
||||
Status: {{task.categoryid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-secondary m-2" (click)="openTaskForm(task)">Bearbeiten</button>
|
||||
<button class="btn btn-secondary m-2" (click)="deleteTask(task)">Löschen</button>
|
||||
|
@ -5,6 +5,8 @@ import {TaskFormComponent} from '../task-form/task-form.component';
|
||||
import {TableComponentBase} from '../services/table-component.base';
|
||||
import {ActivatedRoute, ParamMap, Router} from '@angular/router';
|
||||
import {getNumberForPriority} from '../services/sorting.service';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { isNumber } from 'util';
|
||||
|
||||
@Component({
|
||||
selector: 'app-userstory-table',
|
||||
@ -93,6 +95,16 @@ export class TaskTableComponent extends TableComponentBase<ScrumTask> {
|
||||
this.doNumericSort('userstory', task => task.userstoryid);
|
||||
}
|
||||
|
||||
sortByStatus() {
|
||||
this.doStringSort('title', task => task.title);
|
||||
}
|
||||
sortByAssigned() {
|
||||
this.doStringSort('title', task => task.title);
|
||||
}
|
||||
sortByCategory() {
|
||||
this.doStringSort('title', task => task.title);
|
||||
}
|
||||
|
||||
private findTaskById(id: number): ScrumTask {
|
||||
return this.items.find(t => t.id === id);
|
||||
}
|
||||
|
@ -29,6 +29,13 @@
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByStatus()" class="sortable">
|
||||
<span>Status</span>
|
||||
<span *ngIf="sortBy === 'status'" class="pl-3">
|
||||
<span *ngIf="sortDescending">▲</span>
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByPrio()" class="sortable">
|
||||
<span>Priorität</span>
|
||||
<label class="pl-3" (click)="$event.stopPropagation()">
|
||||
@ -42,6 +49,13 @@
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th (click)="sortByCategory()" class="sortable">
|
||||
<span>Category</span>
|
||||
<span *ngIf="sortBy === 'category'" class="pl-3">
|
||||
<span *ngIf="sortDescending">▲</span>
|
||||
<span *ngIf="sortDescending === false">▼</span>
|
||||
</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -55,7 +69,17 @@
|
||||
{{getNumberOfTasks(userstory)}} Tasks
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a [routerLink]="['/status', {id: userstory.statusid}]">
|
||||
Status: {{userstory.statusid}}
|
||||
</a>
|
||||
</td>s
|
||||
<td>{{userstory.priority}}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
|
||||
Status: {{userstory.categoryid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-secondary m-2" (click)="openUserstoryForm(userstory)">Bearbeiten</button>
|
||||
<button class="btn btn-secondary m-2" (click)="deleteUserstory(userstory)">Löschen</button>
|
||||
|
@ -95,4 +95,11 @@ export class UserstoryTableComponent extends TableComponentBase<ScrumUserstory>
|
||||
public sortByTasks() {
|
||||
this.doNumericSort('tasks', us => this.getNumberOfTasks(us));
|
||||
}
|
||||
|
||||
sortByStatus() {
|
||||
this.doStringSort('title', us => us.title);
|
||||
}
|
||||
sortByCategory() {
|
||||
this.doStringSort('title', us => us.title);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user