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