diff --git a/package.json b/package.json index 22bbf00..f1353ed 100644 --- a/package.json +++ b/package.json @@ -45,5 +45,13 @@ "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.8.3" - } + }, + "description": "This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.7.", + "main": "karma.conf.js", + "repository": { + "type": "git", + "url": "https://git.informatik.fh-nuernberg.de/scrum-taskboard/frontend.git" + }, + "author": "", + "license": "ISC" } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7e0c37c..a59d88d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,15 +4,14 @@ import { Routes, RouterModule } from '@angular/router'; import { TaskListComponent } from './task-list/task-list.component'; import { UserstoryListComponent } from './userstory-list/userstory-list.component'; - const routes: Routes = [ - { path: 'tasks', component: TaskListComponent }, - { path: 'userstories', component: UserstoryListComponent }, - { path: '', redirectTo: '/tasks', pathMatch: 'full' }, + { path: 'tasks', component: TaskListComponent }, + { path: 'userstories', component: UserstoryListComponent }, + { path: '', redirectTo: '/tasks', pathMatch: 'full' } ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] + imports: [ RouterModule.forRoot(routes) ], + exports: [ RouterModule ] }) -export class AppRoutingModule { } +export class AppRoutingModule {} diff --git a/src/app/task-form/task-form.component.html b/src/app/task-form/task-form.component.html index b0a5f4e..f61d287 100644 --- a/src/app/task-form/task-form.component.html +++ b/src/app/task-form/task-form.component.html @@ -21,7 +21,7 @@ - + diff --git a/src/app/userstory-form/userstory-form.component.css b/src/app/userstory-form/userstory-form.component.css index cb7d33d..cc04e06 100644 --- a/src/app/userstory-form/userstory-form.component.css +++ b/src/app/userstory-form/userstory-form.component.css @@ -1,12 +1,12 @@ -.modal-footer{ - border-top: 0px solid; - padding-top: 5%; +.modal-footer { + border-top: 0px solid; + padding-top: 5%; } -.modal-lg{ - width: 1040px; +.modal-content { + width: 1040px; + right: 55%; } - .modal{ - margin: 0 auto; - - } \ No newline at end of file +.modal { + margin: 0 auto; +} diff --git a/src/app/userstory-form/userstory-form.component.html b/src/app/userstory-form/userstory-form.component.html index 416f3df..4773281 100644 --- a/src/app/userstory-form/userstory-form.component.html +++ b/src/app/userstory-form/userstory-form.component.html @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/userstory-form/userstory-form.component.ts b/src/app/userstory-form/userstory-form.component.ts index 28f605f..0312338 100644 --- a/src/app/userstory-form/userstory-form.component.ts +++ b/src/app/userstory-form/userstory-form.component.ts @@ -3,48 +3,42 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { BackendService, ScrumUserstory, Priority } from '../services/backend.service'; @Component({ - selector: 'app-userstory-form', - templateUrl: './userstory-form.component.html', - styleUrls: ['./userstory-form.component.css'] + selector: 'app-userstory-form', + templateUrl: './userstory-form.component.html', + styleUrls: [ './userstory-form.component.css' ] }) export class UserstoryFormComponent implements OnInit { + @Input() public userstory: ScrumUserstory; + private editing: boolean; + constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {} - @Input() - public userstory: ScrumUserstory; - private editing: boolean; + ngOnInit(): void { + if (this.userstory === null || this.userstory === undefined) { + this.userstory = { title: '' }; + this.editing = false; + } else { + this.editing = true; + } + } - constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) { } - - ngOnInit(): void { - if (this.userstory === null || this.userstory === undefined) { - this.userstory = {title: ""}; - this.editing = false; - } - else - { - this.editing = true; - } - } - - onSubmit() { - if (this.editing) { - this.backendService.putUserstory(this.userstory).subscribe(response => { - if (response.status > 399) { - alert('Fehler'); - } - }); - } - else { - this.backendService.postUserstory(this.userstory).subscribe(response => { - if (response.status > 399) { - alert('Fehler'); - } - }); - } - this.activeModalService.close(this.userstory); - } - onClose(){ - this.activeModalService.dismiss(this.userstory); - } + onSubmit() { + if (this.editing) { + this.backendService.putUserstory(this.userstory).subscribe((response) => { + if (response.status > 399) { + alert('Fehler'); + } + }); + } else { + this.backendService.postUserstory(this.userstory).subscribe((response) => { + if (response.status > 399) { + alert('Fehler'); + } + }); + } + this.activeModalService.close(this.userstory); + } + onClose() { + this.activeModalService.dismiss(this.userstory); + } }