better positioning for userstory modal
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
.modal {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="modal-lg">
|
||||
<!-- <div class="modal-lg"> -->
|
||||
<div class="modal-content p-3">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Neue Userstory anlegen</h4>
|
||||
@@ -58,4 +58,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user