userstory dropdown only when creating task
This commit is contained in:
parent
e74325b558
commit
8d255ad61e
@ -5,12 +5,12 @@
|
|||||||
<h4 class="modal-title">Neuen Task anlegen</h4>
|
<h4 class="modal-title">Neuen Task anlegen</h4>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<h6 class="modal-caption text-muted">
|
<h6 class="modal-caption text-muted" *ngIf="this.editing">
|
||||||
Gehört zu Story:
|
Gehört zu Story:
|
||||||
<a href="#" id="userstoryTitle">{{ this.userstoryId }}</a>
|
<a href="#" id="userstoryTitle">{{ this.userstoryId }}</a>
|
||||||
</h6>
|
</h6>
|
||||||
</tr>
|
</tr>
|
||||||
<select class="form-control custom-select mr-sm-2" id="prio" required name="prio" [(ngModel)]="task.userstoryid">
|
<select *ngIf="!this.editing" class="form-control custom-select mr-sm-2" id="prio" required name="prio" [(ngModel)]="task.userstoryid">
|
||||||
<option *ngFor="let userstory of userstories" [ngValue]="userstory.id">{{ userstory.title }}</option>
|
<option *ngFor="let userstory of userstories" [ngValue]="userstory.id">{{ userstory.title }}</option>
|
||||||
</select>
|
</select>
|
||||||
</table>
|
</table>
|
||||||
|
@ -20,7 +20,8 @@ import { HttpResponse } from '@angular/common/http';
|
|||||||
})
|
})
|
||||||
export class TaskFormComponent implements OnInit {
|
export class TaskFormComponent implements OnInit {
|
||||||
@Input() public task: ScrumTask;
|
@Input() public task: ScrumTask;
|
||||||
public editing: Boolean;
|
public editing: boolean;
|
||||||
|
public creating: boolean;
|
||||||
public userstoryId: string;
|
public userstoryId: string;
|
||||||
public userstories: any[] = [];
|
public userstories: any[] = [];
|
||||||
public allStatus: any[] = [];
|
public allStatus: any[] = [];
|
||||||
@ -35,8 +36,11 @@ export class TaskFormComponent implements OnInit {
|
|||||||
if (this.task === null || this.task === undefined) {
|
if (this.task === null || this.task === undefined) {
|
||||||
this.task = { title: '' };
|
this.task = { title: '' };
|
||||||
this.editing = false;
|
this.editing = false;
|
||||||
} else {
|
this.creating = false;
|
||||||
|
} else if (this.task.userstoryid) {
|
||||||
this.editing = true;
|
this.editing = true;
|
||||||
|
} else {
|
||||||
|
this.creating = true;
|
||||||
}
|
}
|
||||||
document.getElementById('titleField').focus();
|
document.getElementById('titleField').focus();
|
||||||
this.getRelatedStory();
|
this.getRelatedStory();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user