diff --git a/src/app/task-form/task-form.component.css b/src/app/task-form/task-form.component.css
index e69de29..cc04e06 100644
--- a/src/app/task-form/task-form.component.css
+++ b/src/app/task-form/task-form.component.css
@@ -0,0 +1,12 @@
+.modal-footer {
+ border-top: 0px solid;
+ padding-top: 5%;
+}
+.modal-content {
+ width: 1040px;
+ right: 55%;
+}
+
+.modal {
+ margin: 0 auto;
+}
diff --git a/src/app/task-form/task-form.component.html b/src/app/task-form/task-form.component.html
index f61d287..e1abec3 100644
--- a/src/app/task-form/task-form.component.html
+++ b/src/app/task-form/task-form.component.html
@@ -1,30 +1,62 @@
-
-
-
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/app/task-form/task-form.component.ts b/src/app/task-form/task-form.component.ts
index 154e22f..60dd90b 100644
--- a/src/app/task-form/task-form.component.ts
+++ b/src/app/task-form/task-form.component.ts
@@ -1,50 +1,53 @@
import { Component, OnInit, Input } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { BackendService, ScrumTask, Priority, ScrumStatus, ScrumCategory, ScrumUser, ScrumProject } from '../services/backend.service';
+import {
+ BackendService,
+ ScrumTask,
+ Priority,
+ ScrumStatus,
+ ScrumCategory,
+ ScrumUser,
+ ScrumProject
+} from '../services/backend.service';
@Component({
- selector: 'app-task-form',
- templateUrl: './task-form.component.html',
- styleUrls: ['./task-form.component.css']
+ selector: 'app-task-form',
+ templateUrl: './task-form.component.html',
+ styleUrls: [ './task-form.component.css' ]
})
export class TaskFormComponent implements OnInit {
+ @Input() public task: ScrumTask;
+ public editing: Boolean;
- @Input()
- public task: ScrumTask;
- public editing: Boolean;
+ constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {}
- constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) { }
+ ngOnInit(): void {
+ if (this.task === null || this.task === undefined) {
+ this.task = { title: '' };
+ this.editing = false;
+ } else {
+ this.editing = true;
+ }
+ }
- ngOnInit(): void {
- if (this.task === null || this.task === undefined) {
- this.task = {title: ""};
- this.editing = false;
- }
- else
- {
- this.editing = true;
- }
- }
+ onSubmit() {
+ if (this.editing) {
+ this.backendService.putTask(this.task).subscribe((response) => {
+ if (response.status > 399) {
+ alert('Fehler');
+ }
+ });
+ } else {
+ this.backendService.postTask(this.task).subscribe((response) => {
+ if (response.status > 399) {
+ alert('Fehler');
+ }
+ });
+ }
+ this.activeModalService.close(this.task);
+ }
- onSubmit() {
- if (this.editing) {
- this.backendService.putTask(this.task).subscribe(response => {
- if (response.status > 399) {
- alert('Fehler');
- }
- });
- }
- else {
- this.backendService.postTask(this.task).subscribe(response => {
- if (response.status > 399) {
- alert('Fehler');
- }
- });
- }
- this.activeModalService.close(this.task);
- }
-
- onClose(){
- this.activeModalService.dismiss(this.task);
- }
+ onClose() {
+ this.activeModalService.dismiss(this.task);
+ }
}