Merge branch 'feature/sprint-form' into preview
This commit is contained in:
commit
2b415336c3
@ -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">
|
||||||
@ -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.statusid">
|
[(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>
|
||||||
|
@ -22,9 +22,13 @@ 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[] = [];
|
||||||
|
public allStatus: any[] = [];
|
||||||
|
|
||||||
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {}
|
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {
|
||||||
|
this.getUserStories();
|
||||||
|
this.getTaskStatus();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.task === null || this.task === undefined) {
|
if (this.task === null || this.task === undefined) {
|
||||||
@ -35,7 +39,6 @@ export class TaskFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
document.getElementById('titleField').focus();
|
document.getElementById('titleField').focus();
|
||||||
this.getRelatedStory();
|
this.getRelatedStory();
|
||||||
this.getUserStories();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
@ -78,4 +81,14 @@ export class TaskFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTaskStatus() {
|
||||||
|
this.backendService.getAllStatus().subscribe((response) => {
|
||||||
|
if (response.status > 399) {
|
||||||
|
alert('Fehler');
|
||||||
|
} else {
|
||||||
|
this.allStatus.push(...response.body);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user