-
-
-
-
-
-
-
-
-
Zuständiger
-
-
-
+
+
+
+
+
+
+
+
+
+
Zuständiger
+
+
+
-
+
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.component.js b/project-manager/src/app/tasks/edit-task/edit-task.component.js
index efd5a96..fabbf65 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.component.js
+++ b/project-manager/src/app/tasks/edit-task/edit-task.component.js
@@ -1,80 +1,89 @@
-import { ViewChild, Component } from '@angular/core';
-import { Title } from '@angular/platform-browser';
-import { Router, ActivatedRoute } from '@angular/router';
-import { Location } from '@angular/common';
-import { NgForm } from '@angular/forms';
-import { createInitialTask } from '../../models/model-interfaces';
-import { TaskService } from '../../services/task-service/task.service';
+import {ViewChild, Component} from '@angular/core';
+import {Title} from '@angular/platform-browser';
+import {Router, ActivatedRoute} from '@angular/router';
+import {Location} from '@angular/common';
+import {NgForm} from '@angular/forms';
+import {createInitialTask} from '../../models/model-interfaces';
+import {TaskService} from '../../services/task-service/task.service';
import * as model from '../../models/model-interfaces';
export var EditTaskComponent = (function () {
- function EditTaskComponent(route, taskService, router, titleService, location) {
- this.route = route;
- this.taskService = taskService;
- this.router = router;
- this.titleService = titleService;
- this.location = location;
- this.model = model;
- this.task = createInitialTask();
- this.saved = false;
+ function EditTaskComponent(route, taskService, router, titleService, location) {
+ this.route = route;
+ this.taskService = taskService;
+ this.router = router;
+ this.titleService = titleService;
+ this.location = location;
+ this.model = model;
+ this.task = createInitialTask();
+ this.saved = false;
+ }
+
+ EditTaskComponent.prototype.ngOnInit = function () {
+ var _this = this;
+ this.subscription = this.route.params
+ .map(function (params) {
+ return params['id'];
+ })
+ .filter(function (id) {
+ return id != undefined;
+ })
+ .flatMap(function (id) {
+ return _this.taskService.getTask(id);
+ })
+ .subscribe(function (task) {
+ _this.task = task;
+ });
+ };
+ EditTaskComponent.prototype.ngOnDestroy = function () {
+ this.subscription.unsubscribe();
+ };
+ EditTaskComponent.prototype.addTag = function () {
+ this.task.tags.push({label: ''});
+ return false;
+ };
+ EditTaskComponent.prototype.removeTag = function (i) {
+ this.task.tags.splice(i, 1);
+ return false;
+ };
+ EditTaskComponent.prototype.saveTask = function () {
+ var _this = this;
+ this.taskService.saveTask(this.task).subscribe(function (task) {
+ _this.saved = true;
+ var relativeUrl = _this.router.url.includes('edit') ? '../..' : '..';
+ _this.router.navigate([relativeUrl], {relativeTo: _this.route});
+ });
+ };
+ EditTaskComponent.prototype.cancel = function () {
+ //this.location.back();
+ var relativeUrl = this.router.url.includes('edit') ? '../..' : '..';
+ this.router.navigate([relativeUrl], {relativeTo: this.route});
+ return false;
+ };
+ EditTaskComponent.prototype.canDeactivate = function () {
+ if (this.saved || !this.form.dirty) {
+ return true;
}
- EditTaskComponent.prototype.ngOnInit = function () {
- var _this = this;
- this.subscription = this.route.params
- .map(function (params) { return params['id']; })
- .filter(function (id) { return id != undefined; })
- .flatMap(function (id) { return _this.taskService.getTask(id); })
- .subscribe(function (task) {
- _this.task = task;
- });
- };
- EditTaskComponent.prototype.ngOnDestroy = function () {
- this.subscription.unsubscribe();
- };
- EditTaskComponent.prototype.addTag = function () {
- this.task.tags.push({ label: '' });
- return false;
- };
- EditTaskComponent.prototype.removeTag = function (i) {
- this.task.tags.splice(i, 1);
- return false;
- };
- EditTaskComponent.prototype.saveTask = function () {
- var _this = this;
- this.taskService.saveTask(this.task).subscribe(function (task) {
- _this.saved = true;
- var relativeUrl = _this.router.url.includes('edit') ? '../..' : '..';
- _this.router.navigate([relativeUrl], { relativeTo: _this.route });
- });
- };
- EditTaskComponent.prototype.cancel = function () {
- //this.location.back();
- var relativeUrl = this.router.url.includes('edit') ? '../..' : '..';
- this.router.navigate([relativeUrl], { relativeTo: this.route });
- return false;
- };
- EditTaskComponent.prototype.canDeactivate = function () {
- if (this.saved || !this.form.dirty) {
- return true;
- }
- return window.confirm("Ihr Formular besitzt ungespeicherte \u00C4nderungen, m\u00F6chten Sie die Seite wirklich verlassen?");
- };
- EditTaskComponent.decorators = [
- { type: Component, args: [{
- templateUrl: './edit-task.component.html',
- styleUrls: ['./edit-task.component.css']
- },] },
- ];
- /** @nocollapse */
- EditTaskComponent.ctorParameters = [
- { type: ActivatedRoute, },
- { type: TaskService, },
- { type: Router, },
- { type: Title, },
- { type: Location, },
- ];
- EditTaskComponent.propDecorators = {
- 'form': [{ type: ViewChild, args: [NgForm,] },],
- };
- return EditTaskComponent;
+ return window.confirm("Ihr Formular besitzt ungespeicherte \u00C4nderungen, m\u00F6chten Sie die Seite wirklich verlassen?");
+ };
+ EditTaskComponent.decorators = [
+ {
+ type: Component, args: [{
+ templateUrl: './edit-task.component.html',
+ styleUrls: ['./edit-task.component.css']
+ },]
+ },
+ ];
+ /** @nocollapse */
+ EditTaskComponent.ctorParameters = [
+ {type: ActivatedRoute,},
+ {type: TaskService,},
+ {type: Router,},
+ {type: Title,},
+ {type: Location,},
+ ];
+ EditTaskComponent.propDecorators = {
+ 'form': [{type: ViewChild, args: [NgForm,]},],
+ };
+ return EditTaskComponent;
}());
-//# sourceMappingURL=edit-task.component.js.map
\ No newline at end of file
+//# sourceMappingURL=edit-task.component.js.map
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.component.js.map b/project-manager/src/app/tasks/edit-task/edit-task.component.js.map
index dc5259e..45d3777 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.component.js.map
+++ b/project-manager/src/app/tasks/edit-task/edit-task.component.js.map
@@ -1 +1,10 @@
-{"version":3,"file":"edit-task.component.js","sourceRoot":"","sources":["edit-task.component.ts"],"names":[],"mappings":"OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,eAAe;OAC3C,EAAC,KAAK,EAAC,MAAM,2BAA2B;OACxC,EACL,MAAM,EACN,cAAc,EACf,MAAM,iBAAiB;OACjB,EAAC,QAAQ,EAAC,MAAM,iBAAiB;OACjC,EAAC,MAAM,EAAC,MAAM,gBAAgB;OAC9B,EAAO,iBAAiB,EAAC,MAAM,+BAA+B;OAC9D,EAAC,WAAW,EAAC,MA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AAI,EAAE,cAAc,GAAG;QACxB,EAAC,IAAI,EAAE,WAAW,GAAG;QACrB,EAAC,IAAI,EAAE,MAAM,GAAG;QAChB,EAAC,IAAI,EAAE,KAAK,GAAG;QACf,EAAC,IAAI,EAAE,QAAQ,GAAG;KACjB,CAAC;IACK,gCAAc,GAA2C;QAChE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,MAAM,EAAG,EAAE,EAAE;KAC/C,CAAC;IACF,wBAAC;AAAD,CAAC,AAnFD,IAmFC"}
\ No newline at end of file
+{
+ "version": 3,
+ "file": "edit-task.component.js",
+ "sourceRoot": "",
+ "sources": [
+ "edit-task.component.ts"
+ ],
+ "names": [],
+ "mappings": "OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,eAAe;OAC3C,EAAC,KAAK,EAAC,MAAM,2BAA2B;OACxC,EACL,MAAM,EACN,cAAc,EACf,MAAM,iBAAiB;OACjB,EAAC,QAAQ,EAAC,MAAM,iBAAiB;OACjC,EAAC,MAAM,EAAC,MAAM,gBAAgB;OAC9B,EAAO,iBAAiB,EAAC,MAAM,+BAA+B;OAC9D,EAAC,WAAW,EAAC,MAAM,0CAA0C;OAE7D,KAAK,KAAK,MAAM,+BAA+B;AAItD;IAUE,2BACoB,KAAqB,EACrB,WAAwB,EACxB,MAAc,EACd,YAAmB,EACnB,QAAkB;QAJlB,UAAK,GAAL,KAAK,CAAgB;QACrB,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAQ;QACd,iBAAY,GAAZ,YAAY,CAAO;QACnB,aAAQ,GAAR,QAAQ,CAAU;QAbtC,UAAK,GAAG,KAAK,CAAC;QACd,SAAI,GAAS,iBAAiB,EAAE,CAAC;QACjC,UAAK,GAAG,KAAK,CAAC;IAYd,CAAC;IAED,oCAAQ,GAAR;QAAA,iBAQC;QAPC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;aA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ACE,uBAAuB;QAEvB,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE,EAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAC,CAAC,CAAC;QAE9D,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IAED,yCAAa,GAAb;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,IAAI,CAAC;QACd,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,qGAA2F,CAAC,CAAC;IACrH,CAAC;IAEI,4BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oBACxB,WAAW,EAAE,4BAA4B;oBACzC,SAAS,EAAE,CAAC,2BAA2B,CAAC;iBACzC,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,gCAAc,GAA6D;QAClF,EAAC,IAAI,EAAE,cAAc,GAAG;QACxB,EAAC,IAAI,EAAE,WAAW,GAAG;QACrB,EAAC,IAAI,EAAE,MAAM,GAAG;QAChB,EAAC,IAAI,EAAE,KAAK,GAAG;QACf,EAAC,IAAI,EAAE,QAAQ,GAAG;KACjB,CAAC;IACK,gCAAc,GAA2C;QAChE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,MAAM,EAAG,EAAE,EAAE;KAC/C,CAAC;IACF,wBAAC;AAAD,CAAC,AAnFD,IAmFC"
+}
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.component.spec.ts b/project-manager/src/app/tasks/edit-task/edit-task.component.spec.ts
new file mode 100644
index 0000000..e69de29
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.component.ts b/project-manager/src/app/tasks/edit-task/edit-task.component.ts
index d73041e..3616e68 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.component.ts
+++ b/project-manager/src/app/tasks/edit-task/edit-task.component.ts
@@ -26,8 +26,7 @@ export class EditTaskComponent {
subscription: Subscription;
- constructor(
- private route: ActivatedRoute,
+ constructor(private route: ActivatedRoute,
private taskService: TaskService,
private router: Router,
private titleService: Title,
@@ -53,7 +52,7 @@ export class EditTaskComponent {
return false;
}
- removeTag(i:number) {
+ removeTag(i: number) {
this.task.tags.splice(i, 1);
return false;
}
@@ -75,7 +74,7 @@ export class EditTaskComponent {
return false;
}
- canDeactivate() : boolean {
+ canDeactivate(): boolean {
if (this.saved || !this.form.dirty) {
return true;
}
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.guard.js b/project-manager/src/app/tasks/edit-task/edit-task.guard.js
index 6526933..9df1633 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.guard.js
+++ b/project-manager/src/app/tasks/edit-task/edit-task.guard.js
@@ -1,15 +1,16 @@
-import { Injectable } from '@angular/core';
+import {Injectable} from '@angular/core';
export var EditTaskGuard = (function () {
- function EditTaskGuard() {
- }
- EditTaskGuard.prototype.canDeactivate = function (component, route, router) {
- return component.canDeactivate();
- };
- EditTaskGuard.decorators = [
- { type: Injectable },
- ];
- /** @nocollapse */
- EditTaskGuard.ctorParameters = [];
- return EditTaskGuard;
+ function EditTaskGuard() {
+ }
+
+ EditTaskGuard.prototype.canDeactivate = function (component, route, router) {
+ return component.canDeactivate();
+ };
+ EditTaskGuard.decorators = [
+ {type: Injectable},
+ ];
+ /** @nocollapse */
+ EditTaskGuard.ctorParameters = [];
+ return EditTaskGuard;
}());
-//# sourceMappingURL=edit-task.guard.js.map
\ No newline at end of file
+//# sourceMappingURL=edit-task.guard.js.map
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.guard.js.map b/project-manager/src/app/tasks/edit-task/edit-task.guard.js.map
index 47de599..1e9fbd5 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.guard.js.map
+++ b/project-manager/src/app/tasks/edit-task/edit-task.guard.js.map
@@ -1 +1,10 @@
-{"version":3,"file":"edit-task.guard.js","sourceRoot":"","sources":["edit-task.guard.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE,MAAS,eAAe;AAM7C;IAAA;IAcA,CAAC;IAZC,qCAAa,GAAb,UAAc,SAA4B,EAC5B,KAA6B,EAC7B,MAA2B;QAEvC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACnC,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,4BAAc,GAA6D,EACjF,CAAC;IACF,oBAAC;AAAD,CAAC,AAdD,IAcC"}
\ No newline at end of file
+{
+ "version": 3,
+ "file": "edit-task.guard.js",
+ "sourceRoot": "",
+ "sources": [
+ "edit-task.guard.ts"
+ ],
+ "names": [],
+ "mappings": "OAAO,EAAE,UAAU,EAAE,MAAS,eAAe;AAM7C;IAAA;IAcA,CAAC;IAZC,qCAAa,GAAb,UAAc,SAA4B,EAC5B,KAA6B,EAC7B,MAA2B;QAEvC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACnC,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,4BAAc,GAA6D,EACjF,CAAC;IACF,oBAAC;AAAD,CAAC,AAdD,IAcC"
+}
diff --git a/project-manager/src/app/tasks/edit-task/edit-task.guard.ts b/project-manager/src/app/tasks/edit-task/edit-task.guard.ts
index 46b56d4..cbdab94 100644
--- a/project-manager/src/app/tasks/edit-task/edit-task.guard.ts
+++ b/project-manager/src/app/tasks/edit-task/edit-task.guard.ts
@@ -1,15 +1,14 @@
-import { Injectable } from '@angular/core';
+import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate} from '@angular/router';
-import { Observable } from 'rxjs/Observable';
+import {Observable} from 'rxjs/Observable';
import {EditTaskComponent} from "./edit-task.component";
@Injectable()
-export class EditTaskGuard implements CanDeactivate
{
+export class EditTaskGuard implements CanDeactivate {
canDeactivate(component: EditTaskComponent,
route: ActivatedRouteSnapshot,
- router: RouterStateSnapshot)
- : Observable | boolean {
+ router: RouterStateSnapshot): Observable | boolean {
return component.canDeactivate();
}
}
diff --git a/project-manager/src/app/tasks/task-list/task-item.component.css b/project-manager/src/app/tasks/task-list/task-item.component.css
index de48bd6..898b169 100644
--- a/project-manager/src/app/tasks/task-list/task-item.component.css
+++ b/project-manager/src/app/tasks/task-list/task-item.component.css
@@ -1,52 +1,77 @@
div.task-list-entry, a.task-list-entry {
- padding: 8px;
- width: 525px;
- border-radius: 2px;
- border: lightgrey solid 1px;
- cursor: pointer;
- margin-bottom: -1px;
+ padding: 8px;
+ width: 525px;
+ border-radius: 2px;
+ border: lightgrey solid 1px;
+ cursor: pointer;
+ margin-bottom: -1px;
}
.marked {
- background: lightgrey;
+ background: lightgrey;
}
span {
- cursor: pointer;
+ cursor: pointer;
}
+
a {
- font-size: x-large;
- font-weight: 700;
+ font-size: x-large;
+ font-weight: 700;
}
+
small {
- color: grey;
+ color: grey;
}
.trash {
- padding-top: 18px;
- font-size: 17px;
- margin-left: -10px;
+ padding-top: 18px;
+ font-size: 17px;
+ margin-left: -10px;
}
.selected {
- background-color: aliceblue;
+ background-color: aliceblue;
}
-@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
-@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
-@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
+@-webkit-keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+@-moz-keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
.fade-in {
- opacity:0; /* make things invisible upon start */
- -webkit-animation:fadeIn ease-in 1; /* call our keyframe named fadeIn, use animattion ease-in and repeat it only 1 time */
- -moz-animation:fadeIn ease-in 1;
- animation:fadeIn ease-in 1;
+ opacity: 0; /* make things invisible upon start */
+ -webkit-animation: fadeIn ease-in 1; /* call our keyframe named fadeIn, use animattion ease-in and repeat it only 1 time */
+ -moz-animation: fadeIn ease-in 1;
+ animation: fadeIn ease-in 1;
- -webkit-animation-fill-mode:forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1)*/
- -moz-animation-fill-mode:forwards;
- animation-fill-mode:forwards;
+ -webkit-animation-fill-mode: forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1)*/
+ -moz-animation-fill-mode: forwards;
+ animation-fill-mode: forwards;
- -webkit-animation-duration:0.5s;
- -moz-animation-duration:0.5s;
- animation-duration:0.5s;
-}
\ No newline at end of file
+ -webkit-animation-duration: 0.5s;
+ -moz-animation-duration: 0.5s;
+ animation-duration: 0.5s;
+}
diff --git a/project-manager/src/app/tasks/task-list/task-item.component.ts b/project-manager/src/app/tasks/task-list/task-item.component.ts
index f6fce8b..2ac272d 100644
--- a/project-manager/src/app/tasks/task-list/task-item.component.ts
+++ b/project-manager/src/app/tasks/task-list/task-item.component.ts
@@ -8,7 +8,7 @@ import {Task} from '../../models/model-interfaces';
styleUrls: ['./task-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
inputs: ['task', 'selected'],
- outputs: ['taskSelected' , 'taskDelete'],
+ outputs: ['taskSelected', 'taskDelete'],
})
export class TaskItemComponent {
@@ -17,12 +17,13 @@ export class TaskItemComponent {
checkCounter = 0;
- taskSelected = new EventEmitter();
+ taskSelected = new EventEmitter();
taskDelete = new EventEmitter();
constructor(private router: Router) {
}
+
select() {
this.taskSelected.emit(this.task.id)
}
@@ -33,7 +34,7 @@ export class TaskItemComponent {
ngAfterViewChecked() {
//var taskId = (this.task ? this.task.id : '');
- // console.log(`Task ${taskId} checked ${++this.checkCounter} times`)
+ // console.log(`Task ${taskId} checked ${++this.checkCounter} times`)
}
}
diff --git a/project-manager/src/app/tasks/task-list/task-list.component.css b/project-manager/src/app/tasks/task-list/task-list.component.css
index 553f9a6..f42aa33 100644
--- a/project-manager/src/app/tasks/task-list/task-list.component.css
+++ b/project-manager/src/app/tasks/task-list/task-list.component.css
@@ -1,8 +1,8 @@
.search-bar {
- padding-top: 20px;
- padding-bottom: 20px;
+ padding-top: 20px;
+ padding-bottom: 20px;
}
.task-list {
- width: 525px;
+ width: 525px;
}
diff --git a/project-manager/src/app/tasks/task-list/task-list.component.ts b/project-manager/src/app/tasks/task-list/task-list.component.ts
index 720c57d..0a1e299 100644
--- a/project-manager/src/app/tasks/task-list/task-list.component.ts
+++ b/project-manager/src/app/tasks/task-list/task-list.component.ts
@@ -40,15 +40,15 @@ export class TaskListComponent implements OnInit {
Observable.merge(paramsStream, searchTermStream)
.distinctUntilChanged()
- .switchMap(query => this.taskService.findTasks(query))
+ .switchMap(query => this.taskService.findTasks(query))
.subscribe();
/*
- this.tasks$ = Observable.merge(paramsStream, searchTermStream)
- .distinctUntilChanged()
- .switchMap(query => this.taskService.findTasks(query));
- */
+ this.tasks$ = Observable.merge(paramsStream, searchTermStream)
+ .distinctUntilChanged()
+ .switchMap(query => this.taskService.findTasks(query));
+ */
}
@@ -58,13 +58,13 @@ export class TaskListComponent implements OnInit {
selectTask(taskId: string | number) {
this.selectedTaskId = taskId;
- this.router.navigate([ {outlets: {'right': [ 'overview' , taskId]}}], {relativeTo: this.route});
+ this.router.navigate([{outlets: {'right': ['overview', taskId]}}], {relativeTo: this.route});
}
findTasks(queryString: string) {
- // jetzt über type-ahead gelöst
- // this.tasks$ = this.taskService.findTasks(queryString);
- // this.adjustBrowserUrl(queryString);
+ // jetzt über type-ahead gelöst
+ // this.tasks$ = this.taskService.findTasks(queryString);
+ // this.adjustBrowserUrl(queryString);
}
adjustBrowserUrl(queryString = '') {
diff --git a/project-manager/src/app/tasks/task-overview/task-overview.component.css b/project-manager/src/app/tasks/task-overview/task-overview.component.css
index ca39f6b..c62e2f3 100644
--- a/project-manager/src/app/tasks/task-overview/task-overview.component.css
+++ b/project-manager/src/app/tasks/task-overview/task-overview.component.css
@@ -1,12 +1,12 @@
.label-small {
- font-size: 50%;
- z-index: 10;
+ font-size: 50%;
+ z-index: 10;
}
.overview {
- border-left: thin solid lightgrey;
- padding-left: 10px;
- padding-top: 20px;
- margin-left: 10px;
- height: 100vh;
+ border-left: thin solid lightgrey;
+ padding-left: 10px;
+ padding-top: 20px;
+ margin-left: 10px;
+ height: 100vh;
}
diff --git a/project-manager/src/app/tasks/task-overview/task-overview.component.html b/project-manager/src/app/tasks/task-overview/task-overview.component.html
index ff00297..1b39995 100644
--- a/project-manager/src/app/tasks/task-overview/task-overview.component.html
+++ b/project-manager/src/app/tasks/task-overview/task-overview.component.html
@@ -24,7 +24,8 @@