Status now has title
This commit is contained in:
parent
c25d7993e5
commit
c20326f15d
|
@ -43,7 +43,7 @@
|
|||
<div class="form-group">
|
||||
<div ngbDropdown class="dropdown" [autoClose]="false">
|
||||
<button ngbDropdownToggle class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Status: {{task.statusid}}
|
||||
Status: {{getStatusTitleById(task.statusid)}}
|
||||
</button>
|
||||
<div ngbDropdownMenu class="dropdown-menu" aria-labelledby="dropdownMenu2">
|
||||
<div class="card-text" for="Inhalt">Status wählen</div>
|
||||
|
|
|
@ -68,6 +68,10 @@ export class TaskFormComponent implements OnInit {
|
|||
}
|
||||
|
||||
getRelatedStory() {
|
||||
if(!this.task.userstoryid)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
this.backendService.getUserstory(this.task.userstoryid).subscribe((response) => {
|
||||
if (response.status > 399) {
|
||||
alert('Fehler');
|
||||
|
@ -140,4 +144,15 @@ export class TaskFormComponent implements OnInit {
|
|||
}
|
||||
return story.title;
|
||||
}
|
||||
|
||||
getStatusTitleById(id: number) :string{
|
||||
if (!id) {
|
||||
return null;
|
||||
}
|
||||
var status = this.allStatus.find((x) => x.id === id);
|
||||
if (!status) {
|
||||
return null;
|
||||
}
|
||||
return status.title;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user