mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-13 14:59:03 +00:00
Task chaining + some refactoring
This commit is contained in:
@@ -14,6 +14,7 @@ import {AuthService} from "../auth.service";
|
||||
export class CreateProjectComponent implements OnInit {
|
||||
|
||||
project = <Project>{};
|
||||
selectedProject: Project = null;
|
||||
|
||||
constructor(private apiService: ApiService,
|
||||
private messengerService: MessengerService,
|
||||
@@ -33,6 +34,8 @@ export class CreateProjectComponent implements OnInit {
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
this.project.chain = this.selectedProject ? this.selectedProject.id : 0;
|
||||
|
||||
this.apiService.createProject(this.project).subscribe(
|
||||
data => {
|
||||
this.router.navigateByUrl("/project/" + data["id"]);
|
||||
|
||||
Reference in New Issue
Block a user