-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from UdL-EPS-SoftArch/fix-room-creation-usabil…
…ity-aberration Fix room creation usability aberration
- Loading branch information
Showing
6 changed files
with
59 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,43 @@ | ||
<div *ngIf="canCreateRoom" class="container mt-5 w-50 p-3"> | ||
<h1 class="mb-4">Create Apartment</h1> | ||
<h1 class="mb-4">Create Room</h1> | ||
|
||
<form (ngSubmit)="onSubmit()" #roomForm="ngForm"> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Select apartment</label> | ||
<select class="form-select" id="apartmentSelect" required [(ngModel)]="this.apartmentId"> | ||
<option value="" disabled>Select...</option> | ||
<option *ngFor="let apartment_value of apartments" [value]="apartment_value.id"> | ||
{{ apartment_value.name }} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Is ocuppied ?</label> | ||
<select class="form-select" id="trueFalseSelectOcupied" required [(ngModel)]="this.room.isOccupied"> | ||
<form (ngSubmit)="onSubmit()" #roomForm="ngForm"> | ||
<div class="mb-3"> | ||
<label for="apartmentSelect" class="form-label">Select apartment</label> | ||
<select class="form-select" id="apartmentSelect" required [(ngModel)]="this.apartmentId" name="apartmentId"> | ||
<option value="" disabled>Select...</option> | ||
<option [value]="true">True</option> | ||
<option [value]="false">False</option> | ||
</select> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Has bed ?</label> | ||
<select class="form-select" id="trueFalseSelectHasBed" required [(ngModel)]="this.room.hasBed"> | ||
<option value="" disabled>Select...</option> | ||
<option [value]="true">True</option> | ||
<option [value]="false">False</option> | ||
</select> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Has window ?</label> | ||
<select class="form-select" id="trueFalseSelectHasWindow" required [(ngModel)]="this.room.hasWindow"> | ||
<option value="" disabled>Select...</option> | ||
<option [value]="true">True</option> | ||
<option [value]="false">False</option> | ||
</select> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="name" class="form-label">Has desk ?</label> | ||
<select class="form-select" id="trueFalseSelectHasDesk" required [(ngModel)]="this.room.hasDesk"> | ||
<option value="" disabled>Select...</option> | ||
<option [value]="true">True</option> | ||
<option [value]="false">False</option> | ||
</select> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="surface" class="form-label">Surface</label> | ||
<input type="number" id="surfaceInput" class="form-control" [(ngModel)]="this.room.surface" /> | ||
|
||
</div> | ||
<option *ngFor="let apartment_value of apartments" [value]="apartment_value.id"> | ||
{{ apartment_value.name }} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" class="form-check-input" id="isOccupied" [(ngModel)]="this.room.isOccupied" name="isOccupied"> | ||
<label class="form-check-label" for="isOccupied">Is occupied?</label> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" class="form-check-input" id="hasBed" [(ngModel)]="this.room.hasBed" name="hasBed"> | ||
<label class="form-check-label" for="hasBed">Has bed?</label> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" class="form-check-input" id="hasWindow" [(ngModel)]="this.room.hasWindow" name="hasWindow"> | ||
<label class="form-check-label" for="hasWindow">Has window?</label> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" class="form-check-input" id="hasDesk" [(ngModel)]="this.room.hasDesk" name="hasDesk"> | ||
<label class="form-check-label" for="hasDesk">Has desk?</label> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="surface" class="form-label">Surface</label> | ||
<input type="number" id="surfaceInput" class="form-control" [(ngModel)]="this.room.surface" name="surface"> | ||
</div> | ||
|
||
|
||
|
||
|
||
<button type="submit" class="btn btn-primary mt-3">Submit</button> | ||
</form> | ||
<button type="submit" class="btn btn-primary mt-3">Create</button> | ||
</form> | ||
</div> | ||
|
||
<div *ngIf="!canCreateRoom" class="container mt-5 w-50 p-3"> | ||
<div class="alert alert-danger" role="alert"> | ||
You are not authorized to create a Room. | ||
</div> | ||
</div> | ||
<div class="alert alert-danger" role="alert"> | ||
You are not authorized to create a Room. | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters