-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conform Room Reservation Feature to CSXL's Material UI Conventions (#332
- Loading branch information
1 parent
891b2bf
commit da7cf0a
Showing
5 changed files
with
91 additions
and
57 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
69 changes: 37 additions & 32 deletions
69
...c/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.html
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,34 +1,39 @@ | ||
<div class="date-selector"> | ||
<date-selector></date-selector> | ||
</div> | ||
<mat-card appearance="outlined"> | ||
<mat-card-header> | ||
<mat-card-title>Reserve a Room</mat-card-title> | ||
<mat-card-subtitle | ||
>Total Hours Remaining: | ||
{{ numHoursStudyRoomReservations$ | async }}</mat-card-subtitle | ||
> | ||
<div class="date-selector"> | ||
<date-selector></date-selector> | ||
</div> | ||
</mat-card-header> | ||
|
||
<div class="table-container"> | ||
<room-reservation-table class="horizontal-scroll"></room-reservation-table> | ||
</div> | ||
<mat-card-content> | ||
<room-reservation-table class="horizontal-scroll"></room-reservation-table> | ||
|
||
<div class="legend-container"> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #03691e"></div> | ||
<span class="legend-text">Available</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: red"></div> | ||
<span class="legend-text">Reserved</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #3479be"></div> | ||
<span class="legend-text">Your Reservations</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: orange"></div> | ||
<span class="legend-text">Selected</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #4d4d4d"></div> | ||
<span class="legend-text">Unavailable</span> | ||
</div> | ||
</div> | ||
|
||
<div class="reservation-limit"> | ||
<p>Total Hours Remaining: {{ numHoursStudyRoomReservations$ | async }}</p> | ||
</div> | ||
<div class="legend-container"> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #03691e"></div> | ||
<span class="legend-text">Available</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: red"></div> | ||
<span class="legend-text">Reserved</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #3479be"></div> | ||
<span class="legend-text">Your Reservations</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: orange"></div> | ||
<span class="legend-text">Selected</span> | ||
</div> | ||
<div class="legend-item"> | ||
<div class="legend-color" style="background-color: #4d4d4d"></div> | ||
<span class="legend-text">Unavailable</span> | ||
</div> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> |
2 changes: 1 addition & 1 deletion
2
frontend/src/app/coworking/widgets/date-selector/date-selector.widget.html
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
7 changes: 7 additions & 0 deletions
7
frontend/src/app/coworking/widgets/room-reservation-table/room-reservation-table.widget.css
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
41 changes: 22 additions & 19 deletions
41
frontend/src/app/coworking/widgets/room-reservation-table/room-reservation-table.widget.html
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,26 +1,29 @@ | ||
<table class="table"> | ||
<tr> | ||
<th></th> | ||
<ng-container *ngFor="let timeSlot of timeSlots"> | ||
<th [innerHTML]="timeSlot" class="time-slot"></th> | ||
</ng-container> | ||
</tr> | ||
<tr *ngFor="let record of reservationsMap | keyvalue"> | ||
<th>{{ record.key }}</th> | ||
<td | ||
*ngFor="let timeSlot of record.value; let j = index" | ||
[style.background]="cellPropertyMap[timeSlot].backgroundColor" | ||
(click)=" | ||
!cellPropertyMap[timeSlot].isDisabled && toggleCellColor(record.key, j) | ||
"></td> | ||
</tr> | ||
</table> | ||
<div class="table-container"> | ||
<table class="table"> | ||
<tr> | ||
<th></th> | ||
<ng-container *ngFor="let timeSlot of timeSlots"> | ||
<th [innerHTML]="timeSlot" class="time-slot"></th> | ||
</ng-container> | ||
</tr> | ||
<tr *ngFor="let record of reservationsMap | keyvalue"> | ||
<th>{{ record.key }}</th> | ||
<td | ||
*ngFor="let timeSlot of record.value; let j = index" | ||
[style.background]="cellPropertyMap[timeSlot].backgroundColor" | ||
(click)=" | ||
!cellPropertyMap[timeSlot].isDisabled && | ||
toggleCellColor(record.key, j) | ||
"></td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class="divider"> | ||
<button | ||
mat-raised-button | ||
mat-stroked-button | ||
class="button" | ||
(click)="draftReservation()" | ||
[disabled]="!selectButton"> | ||
Select | ||
Reserve | ||
</button> | ||
</div> |