Show id of newly created items immediately

This commit is contained in:
Jakob Fahr 2020-07-15 13:28:20 +02:00
parent b718dacc22
commit bffbe6dffa
No known key found for this signature in database
GPG Key ID: 8873416D8E4CEF6B
3 changed files with 10 additions and 1 deletions

View File

@ -46,6 +46,9 @@ export class SprintFormComponent implements OnInit {
console.log('Sprint gespeichert!');
if (response.status > 399) {
alert('Fehler');
} else {
// Copy properties returned by the API
Object.assign(this.sprint, response.body);
}
});
}

View File

@ -69,6 +69,9 @@ export class TaskFormComponent implements OnInit {
this.backendService.postTask(this.task).subscribe((response) => {
if (response.status > 399) {
alert('Fehler');
} else {
// Copy properties returned by the API
Object.assign(this.task, response.body);
}
});
}

View File

@ -29,7 +29,7 @@ export class UserstoryFormComponent implements OnInit {
public user: ScrumUser = { name: '' };
public allCategories: any[] = [];
public category: ScrumCategory = { title: '' };
private editing: boolean;
public editing: boolean;
constructor(
private backendService: BackendService,
@ -67,6 +67,9 @@ export class UserstoryFormComponent implements OnInit {
.subscribe((response) => {
if (response.status > 399) {
alert('Fehler');
} else {
// Copy properties returned by the API
Object.assign(this.userstory, response.body);
}
});
}