added userstory dropdown

This commit is contained in:
Michael 2020-06-30 10:30:58 +02:00
parent 74418ff0dd
commit aa5c468262
2 changed files with 6 additions and 5 deletions

View File

@ -8,8 +8,8 @@
<h6 class="modal-caption text-muted"> Gehört zu Story: <a href="#" id="userstoryTitle">{{this.userstoryId}}</a></h6> <h6 class="modal-caption text-muted"> Gehört zu Story: <a href="#" id="userstoryTitle">{{this.userstoryId}}</a></h6>
</tr> </tr>
<select class="form-control custom-select mr-sm-2" id="prio" required name="prio" <select class="form-control custom-select mr-sm-2" id="prio" required name="prio"
[(ngModel)]="task.priority" *ngFor="let userstory of userstories"> [(ngModel)]="task.priority">
<option value="low">{{userstory}}</option> <option *ngFor="let userstory of userstories" value="low">{{userstory.title}}</option>
</select> </select>
</table> </table>
<button (click)="onClose()" type="button" class="close" aria-label="Close"> <button (click)="onClose()" type="button" class="close" aria-label="Close">

View File

@ -22,9 +22,11 @@ export class TaskFormComponent implements OnInit {
@Input() public task: ScrumTask; @Input() public task: ScrumTask;
public editing: Boolean; public editing: Boolean;
public userstoryId: string; public userstoryId: string;
public userstories: any[]; public userstories: any[] = [];
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {} constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {
this.getUserStories();
}
ngOnInit(): void { ngOnInit(): void {
if (this.task === null || this.task === undefined) { if (this.task === null || this.task === undefined) {
@ -35,7 +37,6 @@ export class TaskFormComponent implements OnInit {
} }
document.getElementById('titleField').focus(); document.getElementById('titleField').focus();
this.getRelatedStory(); this.getRelatedStory();
this.getUserStories();
} }
onSubmit() { onSubmit() {