feat(new-hotel): add new hotel creation functionality

This commit is contained in:
Jan K9f 2024-11-26 08:48:07 +01:00
parent 0a0378e1c4
commit a069e2f630
Signed by: jank
GPG key ID: B267751B8AE29EFE
9 changed files with 97 additions and 4 deletions

View file

@ -1,5 +1,6 @@
<div class="container p-4 mx-auto max-w-4xl">
<h1>{{'hello' | uppercase | text}}</h1>
<a routerLink="/new">CREATE NEW HOTEL</a>
<app-search [(input)]="search"></app-search>
@if (hotels[0].hotelName) {
<div *ngFor="let hotel of hotels">

View file

@ -7,6 +7,7 @@ import { Hotel } from '../HotelItem/hotel';
import { HttpClient } from '@angular/common/http';
import { filter, from, last, map, Observable, scan } from 'rxjs';
import { HotelItem } from '../HotelItem/HotelItem.component';
import { RouterLink } from '@angular/router';
interface User {
name: string;
@ -16,7 +17,7 @@ interface User {
@Component({
selector: 'app-hotel-list',
standalone: true,
imports: [UpperCasePipe, TextPipe, SearchComponent, HotelItem, NgFor, NgIf],
imports: [UpperCasePipe, TextPipe, SearchComponent, HotelItem, NgFor, NgIf, RouterLink],
templateUrl: './hotel-list.component.html',
styleUrl: './hotel-list.component.css'
})