better positioning for userstory modal
This commit is contained in:
parent
aa223ffa10
commit
53dd69ed56
10
package.json
10
package.json
@ -45,5 +45,13 @@
|
|||||||
"ts-node": "~8.3.0",
|
"ts-node": "~8.3.0",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"typescript": "~3.8.3"
|
"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"
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,14 @@ import { Routes, RouterModule } from '@angular/router';
|
|||||||
import { TaskListComponent } from './task-list/task-list.component';
|
import { TaskListComponent } from './task-list/task-list.component';
|
||||||
import { UserstoryListComponent } from './userstory-list/userstory-list.component';
|
import { UserstoryListComponent } from './userstory-list/userstory-list.component';
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: 'tasks', component: TaskListComponent },
|
{ path: 'tasks', component: TaskListComponent },
|
||||||
{ path: 'userstories', component: UserstoryListComponent },
|
{ path: 'userstories', component: UserstoryListComponent },
|
||||||
{ path: '', redirectTo: '/tasks', pathMatch: 'full' },
|
{ path: '', redirectTo: '/tasks', pathMatch: 'full' }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forRoot(routes)],
|
imports: [ RouterModule.forRoot(routes) ],
|
||||||
exports: [RouterModule]
|
exports: [ RouterModule ]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule { }
|
export class AppRoutingModule {}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
.modal-footer{
|
.modal-footer {
|
||||||
border-top: 0px solid;
|
border-top: 0px solid;
|
||||||
padding-top: 5%;
|
padding-top: 5%;
|
||||||
}
|
}
|
||||||
.modal-lg{
|
.modal-content {
|
||||||
width: 1040px;
|
width: 1040px;
|
||||||
|
right: 55%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal{
|
.modal {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="modal-lg">
|
<!-- <div class="modal-lg"> -->
|
||||||
<div class="modal-content p-3">
|
<div class="modal-content p-3">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Neue Userstory anlegen</h4>
|
<h4 class="modal-title">Neue Userstory anlegen</h4>
|
||||||
@ -58,4 +58,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
@ -5,38 +5,32 @@ import { BackendService, ScrumUserstory, Priority } from '../services/backend.se
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-userstory-form',
|
selector: 'app-userstory-form',
|
||||||
templateUrl: './userstory-form.component.html',
|
templateUrl: './userstory-form.component.html',
|
||||||
styleUrls: ['./userstory-form.component.css']
|
styleUrls: [ './userstory-form.component.css' ]
|
||||||
})
|
})
|
||||||
export class UserstoryFormComponent implements OnInit {
|
export class UserstoryFormComponent implements OnInit {
|
||||||
|
@Input() public userstory: ScrumUserstory;
|
||||||
|
|
||||||
@Input()
|
|
||||||
public userstory: ScrumUserstory;
|
|
||||||
private editing: boolean;
|
private editing: boolean;
|
||||||
|
|
||||||
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) { }
|
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.userstory === null || this.userstory === undefined) {
|
if (this.userstory === null || this.userstory === undefined) {
|
||||||
this.userstory = {title: ""};
|
this.userstory = { title: '' };
|
||||||
this.editing = false;
|
this.editing = false;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
this.editing = true;
|
this.editing = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
if (this.editing) {
|
if (this.editing) {
|
||||||
this.backendService.putUserstory(this.userstory).subscribe(response => {
|
this.backendService.putUserstory(this.userstory).subscribe((response) => {
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else {
|
this.backendService.postUserstory(this.userstory).subscribe((response) => {
|
||||||
this.backendService.postUserstory(this.userstory).subscribe(response => {
|
|
||||||
if (response.status > 399) {
|
if (response.status > 399) {
|
||||||
alert('Fehler');
|
alert('Fehler');
|
||||||
}
|
}
|
||||||
@ -44,7 +38,7 @@ export class UserstoryFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
this.activeModalService.close(this.userstory);
|
this.activeModalService.close(this.userstory);
|
||||||
}
|
}
|
||||||
onClose(){
|
onClose() {
|
||||||
this.activeModalService.dismiss(this.userstory);
|
this.activeModalService.dismiss(this.userstory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user