Merge branch 'master' into deployment/cicd
This commit is contained in:
commit
e51604efdf
@ -36,11 +36,15 @@ export class BackendService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//enum prio{high, middle, low}; --> noch nicht im backend
|
export enum Priority {
|
||||||
|
High="high",
|
||||||
|
Medium="medium",
|
||||||
|
Low="low"
|
||||||
|
}
|
||||||
|
|
||||||
export interface Task {
|
export interface Task {
|
||||||
id?: number;
|
id?: number;
|
||||||
title: string;
|
title: string;
|
||||||
//prio; --> noch nicht im backend
|
|
||||||
content?: string;
|
content?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
category?: number;
|
category?: number;
|
||||||
@ -48,4 +52,5 @@ export interface Task {
|
|||||||
sprint?: number;
|
sprint?: number;
|
||||||
project?: number;
|
project?: number;
|
||||||
userstory?: number;
|
userstory?: number;
|
||||||
}
|
priority?: Priority;
|
||||||
|
}
|
@ -10,6 +10,15 @@
|
|||||||
<input type="text" class="form-control" id="Content" required name="content" [(ngModel)]="content">
|
<input type="text" class="form-control" id="Content" required name="content" [(ngModel)]="content">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="Prio">Prio</label>
|
||||||
|
<select class="form-control" id="prio" required name="prio" [(ngModel)]="prio">
|
||||||
|
<option value="low">Low</option>
|
||||||
|
<option value="medium">Medium</option>
|
||||||
|
<option value="high">High</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success">Submit</button>
|
<button type="submit" class="btn btn-success">Submit</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { BackendService, Task } from '../services/backend.service';
|
import { BackendService, Task, Priority } from '../services/backend.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-task-form',
|
selector: 'app-task-form',
|
||||||
@ -11,6 +11,7 @@ export class TaskFormComponent implements OnInit {
|
|||||||
|
|
||||||
public title: string;
|
public title: string;
|
||||||
public content: string;
|
public content: string;
|
||||||
|
public prio: Priority;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public task: Task;
|
public task: Task;
|
||||||
@ -22,6 +23,7 @@ export class TaskFormComponent implements OnInit {
|
|||||||
if (this.task !== null && this.task !== undefined) {
|
if (this.task !== null && this.task !== undefined) {
|
||||||
this.title = this.task.title;
|
this.title = this.task.title;
|
||||||
this.content = this.task.content;
|
this.content = this.task.content;
|
||||||
|
this.prio = this.task.priority;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,6 +31,7 @@ export class TaskFormComponent implements OnInit {
|
|||||||
if (this.task !== null && this.task !== undefined) {
|
if (this.task !== null && this.task !== undefined) {
|
||||||
this.task.title = this.title;
|
this.task.title = this.title;
|
||||||
this.task.content = this.content;
|
this.task.content = this.content;
|
||||||
|
this.task.priority = this.prio;
|
||||||
this.backendService.putTask(this.task).subscribe(response => {
|
this.backendService.putTask(this.task).subscribe(response => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<span>Titel: {{task.title}}</span>
|
<span>Titel: {{task.title}}</span>
|
||||||
<br/>
|
<br/>
|
||||||
<span>Inhalt: {{task.content}}</span>
|
<span>Inhalt: {{task.content}}</span>
|
||||||
|
<br/>
|
||||||
|
<span>Priotität: {{task.priority}}</span>
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-secondary m-2" (click)="openTaskForm(task)">Bearbeiten</button>
|
<button class="btn btn-secondary m-2" (click)="openTaskForm(task)">Bearbeiten</button>
|
||||||
<button class="btn btn-secondary m-2" (click)="deleteTask(task)">Löschen</button>
|
<button class="btn btn-secondary m-2" (click)="deleteTask(task)">Löschen</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user