This commit is contained in:
2023-05-05 12:10:17 +02:00
parent 72ae5f9bbc
commit 9c44077b71
3 changed files with 24 additions and 7 deletions

View File

@@ -97,6 +97,24 @@ export class ManagementComponent implements OnInit {
this.showWaypointForm = false;
}
deleteLocation(id: number) {
this.locationService.deleteLocation(id).subscribe(location => {
this.locations?.splice(this.locations?.indexOf(location), 1);
});
}
deleteWaypoint(id: number) {
this.waypointService.deleteWaypoint(id).subscribe(waypoint => {
this.waypoints?.splice(this.waypoints?.indexOf(waypoint), 1);
});
}
deleteUser(id: number) {
this.userService.deleteUser(id).subscribe(user => {
this.users?.splice(this.users?.indexOf(user), 1);
});
}
openUserForm() {
this.showUserForm = true;
}