From 8d255ad61e024128bac6125ef9318125c02df4c8 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jun 2020 16:43:02 +0200 Subject: [PATCH] userstory dropdown only when creating task --- src/app/task-form/task-form.component.html | 4 ++-- src/app/task-form/task-form.component.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/task-form/task-form.component.html b/src/app/task-form/task-form.component.html index 8adfa23..9890d0b 100644 --- a/src/app/task-form/task-form.component.html +++ b/src/app/task-form/task-form.component.html @@ -5,12 +5,12 @@ - - diff --git a/src/app/task-form/task-form.component.ts b/src/app/task-form/task-form.component.ts index c8860e7..8774b80 100644 --- a/src/app/task-form/task-form.component.ts +++ b/src/app/task-form/task-form.component.ts @@ -20,7 +20,8 @@ import { HttpResponse } from '@angular/common/http'; }) export class TaskFormComponent implements OnInit { @Input() public task: ScrumTask; - public editing: Boolean; + public editing: boolean; + public creating: boolean; public userstoryId: string; public userstories: any[] = []; public allStatus: any[] = []; @@ -35,8 +36,11 @@ export class TaskFormComponent implements OnInit { if (this.task === null || this.task === undefined) { this.task = { title: '' }; this.editing = false; - } else { + this.creating = false; + } else if (this.task.userstoryid) { this.editing = true; + } else { + this.creating = true; } document.getElementById('titleField').focus(); this.getRelatedStory();