try of readings status

This commit is contained in:
Michael 2020-06-30 10:46:19 +02:00
parent bd26dde79c
commit 7b51aaa444
2 changed files with 17 additions and 2 deletions

View File

@ -52,8 +52,12 @@
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<label for="Inhalt">Status</label> <label for="Inhalt">Status</label>
<input type="text" class="form-control" id="Status" required name="status" <!-- <input type="text" class="form-control" id="Status" required name="status"
[(ngModel)]="task.status"> [(ngModel)]="task.status"> -->
<select class="form-control custom-select mr-sm-2" id="prio" required name="prio"
[(ngModel)]="task.priority">
<option *ngFor="let status of allStatus" value="low">{{status.title}}</option>
</select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="Inhalt">Assigned User</label> <label for="Inhalt">Assigned User</label>

View File

@ -23,6 +23,7 @@ export class TaskFormComponent implements OnInit {
public editing: Boolean; public editing: Boolean;
public userstoryId: string; public userstoryId: string;
public userstories: any[] = []; public userstories: any[] = [];
public allStatus: any[] = [];
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) { constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {
this.getUserStories(); this.getUserStories();
@ -79,4 +80,14 @@ export class TaskFormComponent implements OnInit {
} }
}); });
} }
getTaskStatus() {
this.backendService.getAllStatus().subscribe((response) => {
if (response.status > 399) {
alert('Fehler');
} else {
this.allStatus.push(...response.body);
}
});
}
} }