Renamed Folder
This commit is contained in:
parent
dd4112f5bc
commit
c496bbe8ac
@ -1,3 +1,3 @@
|
|||||||
th.sortable:hover {
|
th.sortable:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
@ -1,229 +1,229 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<h3>Backlog</h3>
|
<h3>Backlog</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 container-fluid">
|
<div class="col-lg-6 container-fluid">
|
||||||
</div>
|
</div>
|
||||||
<div align="right" class="col-lg-6 container-fluid">
|
<div align="right" class="col-lg-6 container-fluid">
|
||||||
<button class="btn btn-secondary" (click)="openSprintForm()">Neuer Sprint</button>
|
<button class="btn btn-secondary" (click)="openSprintForm()">Neuer Sprint</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 container-fluid">
|
<div class="col-lg-6 container-fluid">
|
||||||
<h4>Verfügbare Userstories</h4>
|
<h4>Verfügbare Userstories</h4>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th (click)="sortById()" class="sortable">
|
<th (click)="sortById()" class="sortable">
|
||||||
<span>ID</span>
|
<span>ID</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'id'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'id'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'id'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'id'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'id'"><i class="fa fa-sort-down fa-lg"></i></span>
|
<span *ngIf="sortDescending === false && sortBy === 'id'"><i class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByTitle()" class="sortable">
|
<th (click)="sortByTitle()" class="sortable">
|
||||||
<span>Titel</span>
|
<span>Titel</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'title'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'title'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'title'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'title'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'title'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'title'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByTasks()" class="sortable">
|
<th (click)="sortByTasks()" class="sortable">
|
||||||
<span>Tasks</span>
|
<span>Tasks</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'tasks'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'tasks'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'tasks'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'tasks'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'tasks'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'tasks'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByStatus()" class="sortable">
|
<th (click)="sortByStatus()" class="sortable">
|
||||||
<span>Status</span>
|
<span>Status</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'statusid'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'statusid'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'statusid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'statusid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'statusid'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'statusid'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable">
|
<th class="sortable">
|
||||||
<div class="d-inline-block">
|
<div class="d-inline-block">
|
||||||
<div class="d-inline-block">
|
<div class="d-inline-block">
|
||||||
<span (click)="sortByPrio()">Priorität: </span>
|
<span (click)="sortByPrio()">Priorität: </span>
|
||||||
<div ngbDropdown class="d-inline-block">
|
<div ngbDropdown class="d-inline-block">
|
||||||
<span id="dropdownBasic1" ngbDropdownToggle>{{filterPriority || "All"}}</span>
|
<span id="dropdownBasic1" ngbDropdownToggle>{{filterPriority || "All"}}</span>
|
||||||
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
||||||
<option ngbDropdownItem (click)="filterPriority=null">All</option>
|
<option ngbDropdownItem (click)="filterPriority=null">All</option>
|
||||||
<option ngbDropdownItem *ngFor="let p of getAllPriorities()" (click)="filterPriority=p">{{p}}
|
<option ngbDropdownItem *ngFor="let p of getAllPriorities()" (click)="filterPriority=p">{{p}}
|
||||||
</option>
|
</option>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span (click)="sortByPrio()">
|
<span (click)="sortByPrio()">
|
||||||
<span *ngIf="sortBy != 'priority'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'priority'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'priority'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'priority'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'priority'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'priority'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByCategory()" class="sortable">
|
<th (click)="sortByCategory()" class="sortable">
|
||||||
<span>Category</span>
|
<span>Category</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'categoryid'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'categoryid'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'categoryid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'categoryid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'categoryid'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'categoryid'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let userstory of filteredItems" [class.table-info]="userstory.id === highlightId">
|
<tr *ngFor="let userstory of filteredItems" [class.table-info]="userstory.id === highlightId">
|
||||||
<td>{{userstory.id}}</td>
|
<td>{{userstory.id}}</td>
|
||||||
<td>{{userstory.title}}</td>
|
<td>{{userstory.title}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/tasks', {userstoryId: userstory.id}]">
|
<a [routerLink]="['/tasks', {userstoryId: userstory.id}]">
|
||||||
{{getNumberOfTasks(userstory)}} Tasks
|
{{getNumberOfTasks(userstory)}} Tasks
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/status', {id: userstory.statusid}]">
|
<a [routerLink]="['/status', {id: userstory.statusid}]">
|
||||||
{{getStatusTitleById(userstory.statusid)}}
|
{{getStatusTitleById(userstory.statusid)}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{userstory.priority}}</td>
|
<td>{{userstory.priority}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
|
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
|
||||||
{{getCategoryTitleById(userstory.categoryid)}}
|
{{getCategoryTitleById(userstory.categoryid)}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<button type="button" rel="tooltip" (click)="addToSprintBacklog(userstory)"
|
<button type="button" rel="tooltip" (click)="addToSprintBacklog(userstory)"
|
||||||
class="btn btn-sm btn-success btn-icon">
|
class="btn btn-sm btn-success btn-icon">
|
||||||
<i class="fas fa-plus-square"></i>
|
<i class="fas fa-plus-square"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
||||||
<div class="col-lg-6 container-fluid">
|
<div class="col-lg-6 container-fluid">
|
||||||
|
|
||||||
<h4>Sprint-Backlog</h4>
|
<h4>Sprint-Backlog</h4>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th (click)="sortById()" class="sortable">
|
<th (click)="sortById()" class="sortable">
|
||||||
<span>ID</span>
|
<span>ID</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'id'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'id'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'id'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'id'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'id'"><i class="fa fa-sort-down fa-lg"></i></span>
|
<span *ngIf="sortDescending === false && sortBy === 'id'"><i class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByTitle()" class="sortable">
|
<th (click)="sortByTitle()" class="sortable">
|
||||||
<span>Titel</span>
|
<span>Titel</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'title'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'title'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'title'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'title'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'title'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'title'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByTasks()" class="sortable">
|
<th (click)="sortByTasks()" class="sortable">
|
||||||
<span>Tasks</span>
|
<span>Tasks</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'tasks'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'tasks'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'tasks'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'tasks'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'tasks'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'tasks'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByStatus()" class="sortable">
|
<th (click)="sortByStatus()" class="sortable">
|
||||||
<span>Status</span>
|
<span>Status</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'statusid'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'statusid'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'statusid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'statusid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'statusid'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'statusid'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th class="sortable">
|
<th class="sortable">
|
||||||
<div class="d-inline-block">
|
<div class="d-inline-block">
|
||||||
<div class="d-inline-block">
|
<div class="d-inline-block">
|
||||||
<span (click)="sortByPrio()">Priorität: </span>
|
<span (click)="sortByPrio()">Priorität: </span>
|
||||||
<div ngbDropdown class="d-inline-block">
|
<div ngbDropdown class="d-inline-block">
|
||||||
<span id="dropdownBasic1" ngbDropdownToggle>{{filterPriority || "All"}}</span>
|
<span id="dropdownBasic1" ngbDropdownToggle>{{filterPriority || "All"}}</span>
|
||||||
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
|
||||||
<option ngbDropdownItem (click)="filterPriority=null">All</option>
|
<option ngbDropdownItem (click)="filterPriority=null">All</option>
|
||||||
<option ngbDropdownItem *ngFor="let p of getAllPriorities()" (click)="filterPriority=p">{{p}}
|
<option ngbDropdownItem *ngFor="let p of getAllPriorities()" (click)="filterPriority=p">{{p}}
|
||||||
</option>
|
</option>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span (click)="sortByPrio()">
|
<span (click)="sortByPrio()">
|
||||||
<span *ngIf="sortBy != 'priority'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'priority'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'priority'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'priority'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'priority'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'priority'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th (click)="sortByCategory()" class="sortable">
|
<th (click)="sortByCategory()" class="sortable">
|
||||||
<span>Category</span>
|
<span>Category</span>
|
||||||
<span>
|
<span>
|
||||||
<span *ngIf="sortBy != 'categoryid'"><i class="fa fa-sort fa-lg"></i></span>
|
<span *ngIf="sortBy != 'categoryid'"><i class="fa fa-sort fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending && sortBy === 'categoryid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
<span *ngIf="sortDescending && sortBy === 'categoryid'"><i class="fa fa-sort-up fa-lg"></i></span>
|
||||||
<span *ngIf="sortDescending === false && sortBy === 'categoryid'"><i
|
<span *ngIf="sortDescending === false && sortBy === 'categoryid'"><i
|
||||||
class="fa fa-sort-down fa-lg"></i></span>
|
class="fa fa-sort-down fa-lg"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let userstory of choosen" [class.table-info]="userstory.id === highlightId">
|
<tr *ngFor="let userstory of choosen" [class.table-info]="userstory.id === highlightId">
|
||||||
<td>{{userstory.id}}</td>
|
<td>{{userstory.id}}</td>
|
||||||
<td>{{userstory.title}}</td>
|
<td>{{userstory.title}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/tasks', {userstoryId: userstory.id}]">
|
<a [routerLink]="['/tasks', {userstoryId: userstory.id}]">
|
||||||
{{getNumberOfTasks(userstory)}} Tasks
|
{{getNumberOfTasks(userstory)}} Tasks
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/status', {id: userstory.statusid}]">
|
<a [routerLink]="['/status', {id: userstory.statusid}]">
|
||||||
{{getStatusTitleById(userstory.statusid)}}
|
{{getStatusTitleById(userstory.statusid)}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{userstory.priority}}</td>
|
<td>{{userstory.priority}}</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
|
<a [routerLink]="['/categories', {id: userstory.categoryid}]">
|
||||||
{{getCategoryTitleById(userstory.categoryid)}}
|
{{getCategoryTitleById(userstory.categoryid)}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button type="button" rel="tooltip" (click)="deleteFromSprintBacklog(userstory)"
|
<button type="button" rel="tooltip" (click)="deleteFromSprintBacklog(userstory)"
|
||||||
class="btn btn-danger btn-sm btn-icon">
|
class="btn btn-danger btn-sm btn-icon">
|
||||||
<i class="fa fa-trash"></i>
|
<i class="fa fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,185 +1,185 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
BackendService,
|
BackendService,
|
||||||
ScrumTask,
|
ScrumTask,
|
||||||
ScrumUserstory,
|
ScrumUserstory,
|
||||||
ScrumStatus,
|
ScrumStatus,
|
||||||
ScrumCategory,
|
ScrumCategory,
|
||||||
ScrumSprint,
|
ScrumSprint,
|
||||||
ScrumUser,
|
ScrumUser,
|
||||||
} from '../services/backend.service';
|
} from '../services/backend.service';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { TableComponentBase } from '../services/table-component.base';
|
import { TableComponentBase } from '../services/table-component.base';
|
||||||
import { getNumberForPriority } from '../services/sorting.service';
|
import { getNumberForPriority } from '../services/sorting.service';
|
||||||
import { UserstoryFormComponent } from '../userstory-form/userstory-form.component';
|
import { UserstoryFormComponent } from '../userstory-form/userstory-form.component';
|
||||||
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||||
import { SprintFormComponent } from '../sprint-form/sprint-form.component';
|
import { SprintFormComponent } from '../sprint-form/sprint-form.component';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-userstory-table',
|
selector: 'app-userstory-table',
|
||||||
templateUrl: './userstory-table.component.html',
|
templateUrl: './userstory-table.component.html',
|
||||||
styleUrls: ['./userstory-table.component.css'],
|
styleUrls: ['./userstory-table.component.css'],
|
||||||
})
|
})
|
||||||
export class UserstoryTableComponent extends TableComponentBase<
|
export class UserstoryTableComponent extends TableComponentBase<
|
||||||
ScrumUserstory
|
ScrumUserstory
|
||||||
> {
|
> {
|
||||||
public tasks: ScrumTask[] = [];
|
public tasks: ScrumTask[] = [];
|
||||||
public filterPriority: string | null = null;
|
public filterPriority: string | null = null;
|
||||||
public highlightId: number;
|
public highlightId: number;
|
||||||
public status: ScrumStatus[] = [];
|
public status: ScrumStatus[] = [];
|
||||||
public categories: ScrumCategory[] = [];
|
public categories: ScrumCategory[] = [];
|
||||||
|
|
||||||
public choosen: ScrumUserstory[] = [];
|
public choosen: ScrumUserstory[] = [];
|
||||||
|
|
||||||
public get filteredItems() {
|
public get filteredItems() {
|
||||||
return this.items.filter(
|
return this.items.filter(
|
||||||
(task) =>
|
(task) =>
|
||||||
this.filterPriority === null || task.priority === this.filterPriority
|
this.filterPriority === null || task.priority === this.filterPriority
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private backendService: BackendService,
|
private backendService: BackendService,
|
||||||
private modalService: NgbModal,
|
private modalService: NgbModal,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.applyFilterParameters(this.route.snapshot.paramMap);
|
this.applyFilterParameters(this.route.snapshot.paramMap);
|
||||||
this.route.paramMap.subscribe((map) => this.applyFilterParameters(map));
|
this.route.paramMap.subscribe((map) => this.applyFilterParameters(map));
|
||||||
|
|
||||||
backendService.getUserstories().subscribe((response) => {
|
backendService.getUserstories().subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
} else {
|
} else {
|
||||||
this.items.push(...response.body);
|
this.items.push(...response.body);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
backendService.getTasks().subscribe((response) => {
|
backendService.getTasks().subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
} else {
|
} else {
|
||||||
this.tasks.push(...response.body);
|
this.tasks.push(...response.body);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
backendService.getAllStatus().subscribe((response) => {
|
backendService.getAllStatus().subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
} else {
|
} else {
|
||||||
this.status.push(...response.body);
|
this.status.push(...response.body);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
backendService.getCategories().subscribe((response) => {
|
backendService.getCategories().subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
} else {
|
} else {
|
||||||
this.categories.push(...response.body);
|
this.categories.push(...response.body);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private applyFilterParameters(params: ParamMap) {
|
private applyFilterParameters(params: ParamMap) {
|
||||||
if (params.has('id')) {
|
if (params.has('id')) {
|
||||||
this.highlightId = parseInt(params.get('id'));
|
this.highlightId = parseInt(params.get('id'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteUserstory(userstory: ScrumUserstory) {
|
public deleteUserstory(userstory: ScrumUserstory) {
|
||||||
this.backendService.deleteUserstory(userstory).subscribe((response) => {
|
this.backendService.deleteUserstory(userstory).subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const index = this.items.indexOf(userstory);
|
const index = this.items.indexOf(userstory);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.items.splice(index, 1);
|
this.items.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public openUserstoryForm(editUserstory?: ScrumUserstory) {
|
public openUserstoryForm(editUserstory?: ScrumUserstory) {
|
||||||
const modalRef = this.modalService.open(UserstoryFormComponent, {
|
const modalRef = this.modalService.open(UserstoryFormComponent, {
|
||||||
backdrop: 'static',
|
backdrop: 'static',
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
size: 'lg'
|
size: 'lg'
|
||||||
});
|
});
|
||||||
if (editUserstory === null) {
|
if (editUserstory === null) {
|
||||||
modalRef.result.then((result) => {
|
modalRef.result.then((result) => {
|
||||||
this.items.push(result);
|
this.items.push(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
modalRef.componentInstance.userstory = editUserstory;
|
modalRef.componentInstance.userstory = editUserstory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getNumberOfTasks(userstory: ScrumUserstory) {
|
public getNumberOfTasks(userstory: ScrumUserstory) {
|
||||||
return this.tasks.filter((t) => t.userstoryid === userstory.id).length;
|
return this.tasks.filter((t) => t.userstoryid === userstory.id).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public sortById() {
|
public sortById() {
|
||||||
this.doNumericSort('id', (us) => us.id);
|
this.doNumericSort('id', (us) => us.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public sortByTitle() {
|
public sortByTitle() {
|
||||||
this.doStringSort('title', (us) => us.title);
|
this.doStringSort('title', (us) => us.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
public sortByPrio() {
|
public sortByPrio() {
|
||||||
this.doNumericSort('priority', (us) => getNumberForPriority(us.priority));
|
this.doNumericSort('priority', (us) => getNumberForPriority(us.priority));
|
||||||
}
|
}
|
||||||
|
|
||||||
public sortByTasks() {
|
public sortByTasks() {
|
||||||
this.doNumericSort('tasks', (us) => this.getNumberOfTasks(us));
|
this.doNumericSort('tasks', (us) => this.getNumberOfTasks(us));
|
||||||
}
|
}
|
||||||
|
|
||||||
sortByStatus() {
|
sortByStatus() {
|
||||||
this.doNumericSort('statusid', (us) => us.statusid);
|
this.doNumericSort('statusid', (us) => us.statusid);
|
||||||
}
|
}
|
||||||
sortByCategory() {
|
sortByCategory() {
|
||||||
this.doNumericSort('categoryid', (us) => us.categoryid);
|
this.doNumericSort('categoryid', (us) => us.categoryid);
|
||||||
}
|
}
|
||||||
|
|
||||||
getStatusTitleById(id) {
|
getStatusTitleById(id) {
|
||||||
var status = this.status.find((x) => x.id === id);
|
var status = this.status.find((x) => x.id === id);
|
||||||
if (!status) {
|
if (!status) {
|
||||||
return 'N/A';
|
return 'N/A';
|
||||||
}
|
}
|
||||||
return status.title;
|
return status.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCategoryTitleById(id) {
|
getCategoryTitleById(id) {
|
||||||
var category = this.categories.find((x) => x.id === id);
|
var category = this.categories.find((x) => x.id === id);
|
||||||
if (!category) {
|
if (!category) {
|
||||||
return 'N/A';
|
return 'N/A';
|
||||||
}
|
}
|
||||||
return category.title;
|
return category.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sprint-Backlog
|
// Sprint-Backlog
|
||||||
|
|
||||||
public addToSprintBacklog(userstory: ScrumUserstory) {
|
public addToSprintBacklog(userstory: ScrumUserstory) {
|
||||||
this.choosen.push(userstory);
|
this.choosen.push(userstory);
|
||||||
}
|
}
|
||||||
public deleteFromSprintBacklog(userstory: ScrumUserstory){
|
public deleteFromSprintBacklog(userstory: ScrumUserstory){
|
||||||
|
|
||||||
const index = this.choosen.indexOf(userstory);
|
const index = this.choosen.indexOf(userstory);
|
||||||
this.choosen.splice(index, 1);
|
this.choosen.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public addToSprint(choosen: ScrumUserstory[]){
|
public addToSprint(choosen: ScrumUserstory[]){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public openSprintForm(editSprint?: ScrumSprint) {
|
public openSprintForm(editSprint?: ScrumSprint) {
|
||||||
const modalRef = this.modalService.open(SprintFormComponent, {
|
const modalRef = this.modalService.open(SprintFormComponent, {
|
||||||
backdrop: 'static',
|
backdrop: 'static',
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
});
|
});
|
||||||
if (editSprint === null) {
|
if (editSprint === null) {
|
||||||
modalRef.result.then(result => {
|
modalRef.result.then(result => {
|
||||||
this.items.push(result);
|
this.items.push(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
modalRef.componentInstance.sprint = editSprint;
|
modalRef.componentInstance.sprint = editSprint;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user