Compare commits

..

1 commit

Author SHA1 Message Date
c0bc95493a fix(deps): update dependencies (major and minor) to v19
Some checks failed
renovate/artifacts Artifact file update failure
2024-11-26 08:01:28 +00:00
2 changed files with 0 additions and 8 deletions

View file

@ -1,5 +1,4 @@
@if (hotel != null) { @if (hotel != null) {
<app-hotel-item [hotel]="hotel" [isDetail]="true"></app-hotel-item> <app-hotel-item [hotel]="hotel" [isDetail]="true"></app-hotel-item>
<app-hotel-form [hotel]="hotel"></app-hotel-form> <app-hotel-form [hotel]="hotel"></app-hotel-form>
<button (click)="delete()">DELETE</button>
} }

View file

@ -20,13 +20,6 @@ export class HotelDetailsComponent implements OnInit {
constructor(private route: ActivatedRoute, private http: HttpClient, private router: Router) { } constructor(private route: ActivatedRoute, private http: HttpClient, private router: Router) { }
delete(): void {
if (confirm("Are u sure u want to delete this hotel")) {
this.http.delete<Hotel>("/api/hotels/" + this.route.snapshot.paramMap.get("id")).subscribe();
this.router.navigate(["/"]);
}
}
ngOnInit(): void { ngOnInit(): void {
const routeParams = this.route.snapshot.paramMap; const routeParams = this.route.snapshot.paramMap;
const hotelId = routeParams.get("id"); const hotelId = routeParams.get("id");