feat(new-hotel): add new hotel creation functionality
This commit is contained in:
parent
0a0378e1c4
commit
a069e2f630
9 changed files with 97 additions and 4 deletions
16
src/app/new-hotel/new-hotel.component.html
Normal file
16
src/app/new-hotel/new-hotel.component.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<p>Create Hotel</p>
|
||||
|
||||
<form [formGroup]="hotelForm">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="border-red-500" [class.border-8]='hotelForm.get("name")?.invalid && hotelForm.get("name")?.touched' id="name" formControlName="name">
|
||||
<label for="description">Description</label>
|
||||
<input type="text" class="border-red-500" [class.border-8]='hotelForm.get("description")?.invalid && hotelForm.get("description")?.touched' id="description" formControlName="description">
|
||||
<label for="imageUrl">Image</label>
|
||||
<input type="url" class="border-red-500" [class.border-8]='hotelForm.get("imageUel")?.invalid && hotelForm.get("imageUrl")?.touched' id="imageUrl" formControlName="imageUrl">
|
||||
<label for="price">Price</label>
|
||||
<input type="price" class="border-red-500" [class.border-8]='hotelForm.get("price")?.invalid' id="price" formControlName="price">
|
||||
<label for="rating">Rating</label>
|
||||
<input type="rating" class="border-red-500" [class.border-8]='hotelForm.get("rating")?.invalid' id="rating" formControlName="rating">
|
||||
<button (click)="submit()" [disabled]="!hotelForm.valid" type="submit">Submit</button>
|
||||
<a routerLink="/">Cancel</a>
|
||||
</form>
|
Reference in a new issue