From da7cf0ab58be337cbade9e0f9ea76f625610024b Mon Sep 17 00:00:00 2001 From: Ajay Gandecha Date: Thu, 14 Mar 2024 16:56:28 -0400 Subject: [PATCH] Conform Room Reservation Feature to CSXL's Material UI Conventions (#332) --- .../new-reservation-page.component.css | 29 ++++++-- .../new-reservation-page.component.html | 69 ++++++++++--------- .../date-selector/date-selector.widget.html | 2 +- .../room-reservation-table.widget.css | 7 ++ .../room-reservation-table.widget.html | 41 ++++++----- 5 files changed, 91 insertions(+), 57 deletions(-) diff --git a/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.css b/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.css index baf71848f..787417358 100644 --- a/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.css +++ b/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.css @@ -1,12 +1,23 @@ -.table-container { - overflow-x: auto; /* Enable horizontal scrolling for the table container */ - max-width: 100%; /* Ensure it doesn't exceed the viewport width */ +.mat-mdc-card { + max-width: 100%; } -.horizontal-scroll { - white-space: nowrap; /* Prevent line breaks for child elements */ +.mat-mdc-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 12px; } +.mat-mdc-card-title { + padding-left: 10px; +} + +.mat-mdc-card-subtitle { + padding-left: 10px; +} + + /* Add any additional styling for the room-reservation-table if needed */ .date-selector { @@ -47,6 +58,7 @@ width: 20px; height: 20px; margin-right: 5px; + border-radius: 6px; } .legend-text { @@ -56,3 +68,10 @@ .reservation-limit { padding-left: 10px; } + +@media only screen and (max-width: 900px) { + .mat-mdc-card-header { + flex-direction: column; + align-items: baseline; + } +} \ No newline at end of file diff --git a/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.html b/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.html index cc0710a13..ea992af22 100644 --- a/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.html +++ b/frontend/src/app/coworking/room-reservation/new-reservation-page/new-reservation-page.component.html @@ -1,34 +1,39 @@ -
- -
+ + + Reserve a Room + Total Hours Remaining: + {{ numHoursStudyRoomReservations$ | async }} +
+ +
+
-
- -
+ + -
-
-
- Available -
-
-
- Reserved -
-
-
- Your Reservations -
-
-
- Selected -
-
-
- Unavailable -
-
- -
-

Total Hours Remaining: {{ numHoursStudyRoomReservations$ | async }}

-
+
+
+
+ Available +
+
+
+ Reserved +
+
+
+ Your Reservations +
+
+
+ Selected +
+
+
+ Unavailable +
+
+
+
diff --git a/frontend/src/app/coworking/widgets/date-selector/date-selector.widget.html b/frontend/src/app/coworking/widgets/date-selector/date-selector.widget.html index e3a11a851..42486efd6 100644 --- a/frontend/src/app/coworking/widgets/date-selector/date-selector.widget.html +++ b/frontend/src/app/coworking/widgets/date-selector/date-selector.widget.html @@ -1,4 +1,4 @@ - + - - - - - - - - {{ record.key }} - - - +
+ + + + + + + + + + + +
{{ record.key }}
+