Skip to content

Conversation

@ajaygandecha
Copy link
Member

@ajaygandecha ajaygandecha commented Aug 17, 2025

Finally getting this one merged ahead of the Fall 2025 semester (especially since Kris is abroad).

Note: Description below courtesy of @fossinating:

Overview

This PR adds a new operating hours editor page to the CSXL accessible at /coworking/admin. Here, administrators can add, update, and delete operating hours from the frontend. Additionally, this PR adds a new calendar view for operating hours that can be viewed by all users on the CSXL.

Calendar View

The calendar view introduced in this PR has been abstracted out so that it can be used by other features on the CSXL to display events on a calendar. It can be used as such:

<calendar #calendar [selectedEvent]="selectedEvent" [selectEvent]="selecteEvent" [getCalendarEvents]="getCalendarEvents"/>

The inputs to the component are defined as such:

selectedEvent: Optional value representing the currently selected event.
selectEvent: Optional function used when selecting an event on the calendar. If not provided, events on the calendar cannot be selected.
getCalendarEvents: Function used to get the hours for a given time range. Function follows type (start: Date, end: Date): Observable<CalendarEvent[]>

Testing

Backend testing was completed using pytest, with 100% coverage

Frontend testing was completed manually, visually inspecting on both mobile and desktop layouts.

Full technical spec

A full technical spec, including screenshots of features, can be found in the docs.

Contributors:

Special thanks to Team A8 from COMP 423 - @fossinating, @francinew6, @TJOKOLI17, @ellagonzales !

fossinating and others added 30 commits November 4, 2024 17:05
* Add images for design doc

* Create design-doc.md

* Create design doc and move images

We should probably have proper alt text but for now we have this
* Fix Queue Sort Order (#640)

* Added sort to queued tickets by start time

* Fix sorted order for students view

* Replace login icon, show "Sign In" text on mobile over icon (#637)

Replaces the "login" icon with "account_circle" on all devices, and
hides the icon on mobile/thin screens (width < 766px).
Also includes multiple toolbar changes to account for the width.

* Update dependencies to avoid broken build (#642)

This commit updates angular to latest security releases.
It also updates dompurify, for markdown, to not use latest version
which breaks the build.

* Prepare TA Applications for Spring 2025 (#641)

* Work on Spring 2025 TA Applications (#643)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Date Start / End Editor for Terms (#644)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Start / End Editing

---------

Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Andy Chan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
* Create calendar display in operating hours dialog

Created a calendar display in the operating hours dialog
Currently relies on the pre-existing methods for providing operating hours, and doesn't have a way of viewing past/future operating hours
Colors are not fully matched yet, need to talk with the TAs to find the best way to pull from the theme in the css
Needs work for mobile view, currently allows you to scroll away from the hour indicators
The calendar display should likely be moved out into its own widget, allowing a week to be pushed in at a time
Calendar also just displays based on the day of the week, ignores the actual date and will break if provided with operating hours from more than a single week
Should not yet be merged

* Move operating hours calendar into new widget

* Create branch for Calendar Page

* Create new page for open hours editor, Link page to gear button on coworking page

* Start work on moving operating hours request into the display widget

* Return operatingHours input to operating-hours-panel

I initially removed it as I was no longer passing it into the dialog box
It turns out it was used in the widget itself to show when the csxl would next be open in the event that it is currently closed

* Make calendar pull operating hours from the backend directly

* Implement unstyled week selector

* Fix whitespace in css file

* Style week selection text

* Fix autofocus

* Add calendar to calendar page

* Move date numbers to the matching column

* Make day outline pull from theme

* Make calendar only display reasonable hours

* Display entire table for calendar view

* Resize calendar month label

* Make calendar view wider

* Show weekend hours if included

* Increase size of date numbers and highlight the current date

* Create add hours UI

* Update docstring

* Remove unused imports

* Migrate time selectors to time input components

* Comment out recurrence until we're able to implement in backend

* Remove css styles targeting tags

* Rename operating hours editor component and adjust to better fit standards

* Add sprint 01 technical spec sheet

* Add information to technical specs

* Manually merge calendarPage and add-hours-button branches

* Implement add hours button functionality

* Complete merge by copying over commented code missed in merge

* Implement add operating hours flow

* Remove completed TODO

* Fix off by one issue with calendar rendering

* Reload page on success

* Update calendar on successful creation of operating hours

* Fix coloring of add hours icon

* Reimplement hiding functionality using signals

* Implement cancel button for operating hours edit panel

* Remove top/bottom margin on hours block in calendar

* Move opearting hours dialog and calendar into shared module with the panel

* Fix operating hours panel on home page

* Implement permissions requirement for calendar page

* Slightly expand spec and fix images in sprint00 doc

* Update docstrings with new authors

* Move open hours editor business logic to coworking service file (#22)

* Update spec to mention the changes to the models

* Fully move creation and update function out of operating hours editor component

* Fix highlighting of same day in wrong month/year

* Display year on calendar with month

---------

Co-authored-by: francinew6 <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>
Co-authored-by: TJOKOLI17 <[email protected]>
* Fix Queue Sort Order (#640)

* Added sort to queued tickets by start time

* Fix sorted order for students view

* Replace login icon, show "Sign In" text on mobile over icon (#637)

Replaces the "login" icon with "account_circle" on all devices, and
hides the icon on mobile/thin screens (width < 766px).
Also includes multiple toolbar changes to account for the width.

* Update dependencies to avoid broken build (#642)

This commit updates angular to latest security releases.
It also updates dompurify, for markdown, to not use latest version
which breaks the build.

* Prepare TA Applications for Spring 2025 (#641)

* Work on Spring 2025 TA Applications (#643)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Date Start / End Editor for Terms (#644)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Start / End Editing

* Update Office Hours pre-reservation policy (#645)

Shifting hours for a TA and fixing a miscoded reservation.

* Remove Comma That Broke Everything (#646)

* Pin all versions to minor releases (#648)

---------

Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Andy Chan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
* Create calendar display in operating hours dialog

Created a calendar display in the operating hours dialog
Currently relies on the pre-existing methods for providing operating hours, and doesn't have a way of viewing past/future operating hours
Colors are not fully matched yet, need to talk with the TAs to find the best way to pull from the theme in the css
Needs work for mobile view, currently allows you to scroll away from the hour indicators
The calendar display should likely be moved out into its own widget, allowing a week to be pushed in at a time
Calendar also just displays based on the day of the week, ignores the actual date and will break if provided with operating hours from more than a single week
Should not yet be merged

* Move operating hours calendar into new widget

* Create branch for Calendar Page

* Create new page for open hours editor, Link page to gear button on coworking page

* Start work on moving operating hours request into the display widget

* Return operatingHours input to operating-hours-panel

I initially removed it as I was no longer passing it into the dialog box
It turns out it was used in the widget itself to show when the csxl would next be open in the event that it is currently closed

* Make calendar pull operating hours from the backend directly

* Implement unstyled week selector

* Fix whitespace in css file

* Style week selection text

* Fix autofocus

* Add calendar to calendar page

* Move date numbers to the matching column

* Make day outline pull from theme

* Make calendar only display reasonable hours

* Display entire table for calendar view

* Resize calendar month label

* Make calendar view wider

* Show weekend hours if included

* Increase size of date numbers and highlight the current date

* Create add hours UI

* Update docstring

* Remove unused imports

* Migrate time selectors to time input components

* Comment out recurrence until we're able to implement in backend

* Remove css styles targeting tags

* Rename operating hours editor component and adjust to better fit standards

* Add sprint 01 technical spec sheet

* Add information to technical specs

* Manually merge calendarPage and add-hours-button branches

* Implement add hours button functionality

* Complete merge by copying over commented code missed in merge

* Implement add operating hours flow

* Remove completed TODO

* Fix off by one issue with calendar rendering

* Reload page on success

* Update calendar on successful creation of operating hours

* Fix coloring of add hours icon

* Reimplement hiding functionality using signals

* Implement cancel button for operating hours edit panel

* Remove top/bottom margin on hours block in calendar

* Move opearting hours dialog and calendar into shared module with the panel

* Fix operating hours panel on home page

* Implement permissions requirement for calendar page

* Slightly expand spec and fix images in sprint00 doc

* Update docstrings with new authors

* Move open hours editor business logic to coworking service file

* Add open hours panel to admin page

* Change path from 'calendar' to 'admin'

---------

Co-authored-by: David Foss <[email protected]>
Co-authored-by: francinew6 <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>
* Create calendar display in operating hours dialog

Created a calendar display in the operating hours dialog
Currently relies on the pre-existing methods for providing operating hours, and doesn't have a way of viewing past/future operating hours
Colors are not fully matched yet, need to talk with the TAs to find the best way to pull from the theme in the css
Needs work for mobile view, currently allows you to scroll away from the hour indicators
The calendar display should likely be moved out into its own widget, allowing a week to be pushed in at a time
Calendar also just displays based on the day of the week, ignores the actual date and will break if provided with operating hours from more than a single week
Should not yet be merged

* Move operating hours calendar into new widget

* Create branch for Calendar Page

* Create new page for open hours editor, Link page to gear button on coworking page

* Start work on moving operating hours request into the display widget

* Return operatingHours input to operating-hours-panel

I initially removed it as I was no longer passing it into the dialog box
It turns out it was used in the widget itself to show when the csxl would next be open in the event that it is currently closed

* Make calendar pull operating hours from the backend directly

* Implement unstyled week selector

* Fix whitespace in css file

* Style week selection text

* Fix autofocus

* Add calendar to calendar page

* Move date numbers to the matching column

* Make day outline pull from theme

* Make calendar only display reasonable hours

* Display entire table for calendar view

* Resize calendar month label

* Make calendar view wider

* Show weekend hours if included

* Increase size of date numbers and highlight the current date

* Create add hours UI

* Update docstring

* Remove unused imports

* Migrate time selectors to time input components

* Comment out recurrence until we're able to implement in backend

* Remove css styles targeting tags

* Rename operating hours editor component and adjust to better fit standards

* Add sprint 01 technical spec sheet

* Add information to technical specs

* Manually merge calendarPage and add-hours-button branches

* Implement add hours button functionality

* Complete merge by copying over commented code missed in merge

* Implement add operating hours flow

* Remove completed TODO

* Fix off by one issue with calendar rendering

* Reload page on success

* Update calendar on successful creation of operating hours

* Fix coloring of add hours icon

* Reimplement hiding functionality using signals

* Implement cancel button for operating hours edit panel

* Remove top/bottom margin on hours block in calendar

* Move opearting hours dialog and calendar into shared module with the panel

* Fix operating hours panel on home page

* Implement permissions requirement for calendar page

* Slightly expand spec and fix images in sprint00 doc

* Update docstrings with new authors

* Move open hours editor business logic to coworking service file (#22)

* Update spec to mention the changes to the models

* Fully move creation and update function out of operating hours editor component

* Fix highlighting of same day in wrong month/year

* Display year on calendar with month

* Create Delete button and functionality

* Redesign panel appearance system to take advantage of angular if statements

* Update comments to refer to operating hours instead of Organizations/Office Hours

* Clear selected operating hours on cancel

* Pass selectedOperatingHours signal into operating hours calendar

* Make calendar visually clickable when selected operating hours signal is provided

Using matRipple for animation and a class defining cursor: pointer

* Change selected operating hours on click

* Move selection of operating hours out into the admin component

We do this so that we can change the isAddingHours signal at the same time.
A possible alternative to visit in the future would be to remove the isAddingHours signal and instead pass in a new OperatingHours object when the button is pressed.

* Update values in operating hours edit form on selection

* Update buttons to conform to modern standards

* Fix delete api path in frontend service

* Highlight selected operating hours block

* Delete old ngIf usage

* Add Tobenna as author to coworking.service

* Remove extra log

* Op hours backend put api (#32)

* Implement Add Hours Flow (#20)

* Create calendar display in operating hours dialog

Created a calendar display in the operating hours dialog
Currently relies on the pre-existing methods for providing operating hours, and doesn't have a way of viewing past/future operating hours
Colors are not fully matched yet, need to talk with the TAs to find the best way to pull from the theme in the css
Needs work for mobile view, currently allows you to scroll away from the hour indicators
The calendar display should likely be moved out into its own widget, allowing a week to be pushed in at a time
Calendar also just displays based on the day of the week, ignores the actual date and will break if provided with operating hours from more than a single week
Should not yet be merged

* Move operating hours calendar into new widget

* Create branch for Calendar Page

* Create new page for open hours editor, Link page to gear button on coworking page

* Start work on moving operating hours request into the display widget

* Return operatingHours input to operating-hours-panel

I initially removed it as I was no longer passing it into the dialog box
It turns out it was used in the widget itself to show when the csxl would next be open in the event that it is currently closed

* Make calendar pull operating hours from the backend directly

* Implement unstyled week selector

* Fix whitespace in css file

* Style week selection text

* Fix autofocus

* Add calendar to calendar page

* Move date numbers to the matching column

* Make day outline pull from theme

* Make calendar only display reasonable hours

* Display entire table for calendar view

* Resize calendar month label

* Make calendar view wider

* Show weekend hours if included

* Increase size of date numbers and highlight the current date

* Create add hours UI

* Update docstring

* Remove unused imports

* Migrate time selectors to time input components

* Comment out recurrence until we're able to implement in backend

* Remove css styles targeting tags

* Rename operating hours editor component and adjust to better fit standards

* Add sprint 01 technical spec sheet

* Add information to technical specs

* Manually merge calendarPage and add-hours-button branches

* Implement add hours button functionality

* Complete merge by copying over commented code missed in merge

* Implement add operating hours flow

* Remove completed TODO

* Fix off by one issue with calendar rendering

* Reload page on success

* Update calendar on successful creation of operating hours

* Fix coloring of add hours icon

* Reimplement hiding functionality using signals

* Implement cancel button for operating hours edit panel

* Remove top/bottom margin on hours block in calendar

* Move opearting hours dialog and calendar into shared module with the panel

* Fix operating hours panel on home page

* Implement permissions requirement for calendar page

* Slightly expand spec and fix images in sprint00 doc

* Update docstrings with new authors

* Move open hours editor business logic to coworking service file (#22)

* Update spec to mention the changes to the models

* Fully move creation and update function out of operating hours editor component

* Fix highlighting of same day in wrong month/year

* Display year on calendar with month

---------

Co-authored-by: francinew6 <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>
Co-authored-by: TJOKOLI17 <[email protected]>

* Sync upstream (#23)

* Fix Queue Sort Order (#640)

* Added sort to queued tickets by start time

* Fix sorted order for students view

* Replace login icon, show "Sign In" text on mobile over icon (#637)

Replaces the "login" icon with "account_circle" on all devices, and
hides the icon on mobile/thin screens (width < 766px).
Also includes multiple toolbar changes to account for the width.

* Update dependencies to avoid broken build (#642)

This commit updates angular to latest security releases.
It also updates dompurify, for markdown, to not use latest version
which breaks the build.

* Prepare TA Applications for Spring 2025 (#641)

* Work on Spring 2025 TA Applications (#643)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Date Start / End Editor for Terms (#644)

* Prepare TA Applications for Spring 2025

* Fix Another Date Field

* Add Application Start / End Editing

* Update Office Hours pre-reservation policy (#645)

Shifting hours for a TA and fixing a miscoded reservation.

* Remove Comma That Broke Everything (#646)

* Pin all versions to minor releases (#648)

---------

Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Andy Chan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>

* Merge admin-tab-route into stage (#28)

* Create calendar display in operating hours dialog

Created a calendar display in the operating hours dialog
Currently relies on the pre-existing methods for providing operating hours, and doesn't have a way of viewing past/future operating hours
Colors are not fully matched yet, need to talk with the TAs to find the best way to pull from the theme in the css
Needs work for mobile view, currently allows you to scroll away from the hour indicators
The calendar display should likely be moved out into its own widget, allowing a week to be pushed in at a time
Calendar also just displays based on the day of the week, ignores the actual date and will break if provided with operating hours from more than a single week
Should not yet be merged

* Move operating hours calendar into new widget

* Create branch for Calendar Page

* Create new page for open hours editor, Link page to gear button on coworking page

* Start work on moving operating hours request into the display widget

* Return operatingHours input to operating-hours-panel

I initially removed it as I was no longer passing it into the dialog box
It turns out it was used in the widget itself to show when the csxl would next be open in the event that it is currently closed

* Make calendar pull operating hours from the backend directly

* Implement unstyled week selector

* Fix whitespace in css file

* Style week selection text

* Fix autofocus

* Add calendar to calendar page

* Move date numbers to the matching column

* Make day outline pull from theme

* Make calendar only display reasonable hours

* Display entire table for calendar view

* Resize calendar month label

* Make calendar view wider

* Show weekend hours if included

* Increase size of date numbers and highlight the current date

* Create add hours UI

* Update docstring

* Remove unused imports

* Migrate time selectors to time input components

* Comment out recurrence until we're able to implement in backend

* Remove css styles targeting tags

* Rename operating hours editor component and adjust to better fit standards

* Add sprint 01 technical spec sheet

* Add information to technical specs

* Manually merge calendarPage and add-hours-button branches

* Implement add hours button functionality

* Complete merge by copying over commented code missed in merge

* Implement add operating hours flow

* Remove completed TODO

* Fix off by one issue with calendar rendering

* Reload page on success

* Update calendar on successful creation of operating hours

* Fix coloring of add hours icon

* Reimplement hiding functionality using signals

* Implement cancel button for operating hours edit panel

* Remove top/bottom margin on hours block in calendar

* Move opearting hours dialog and calendar into shared module with the panel

* Fix operating hours panel on home page

* Implement permissions requirement for calendar page

* Slightly expand spec and fix images in sprint00 doc

* Update docstrings with new authors

* Move open hours editor business logic to coworking service file

* Add open hours panel to admin page

* Change path from 'calendar' to 'admin'

---------

Co-authored-by: David Foss <[email protected]>
Co-authored-by: francinew6 <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>

* Create function bodies for api and database update methods

* Implement backend database and api PUT method

* Add required access for git push allowance withtin devcontainer

* Fix PUT method route

* Implement frontend DELETE api method

* Fix update method OverlapException

* delete frontend delete method body

---------

Co-authored-by: David <[email protected]>
Co-authored-by: francinew6 <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>
Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Andy Chan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
Co-authored-by: David Foss <[email protected]>
Co-authored-by: David <[email protected]>

* Implement frontend edit-hours feature

* Implemented testing for Operating hours PUT operation

---------

Co-authored-by: David Foss <[email protected]>
Co-authored-by: francinew6 <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Ella Gonzales <[email protected]>
Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Andy Chan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
fossinating and others added 24 commits March 19, 2025 16:15
This is one initial step towards a more mobile friendly experience, and may be iterated on by changing the calendar to show <5 days on smaller width devices
* Switch from using localstorage to sessionstorage

Decided to do this as the intent of the storage is to preserve state between reloads, but we definitely don't this state to be maintained between sessions
This is also subject to change, support may need to be entirely dropped

* Hide form on portait mode

* Add TODO to rewrite selectOperatingHours

* Show "Create Operating Hours" dialog in portrait mode

* Update operating hours selection to support portrait mode

* Fix dialog buttons

* Fix calendar not updating after modificaton on mobile view

* Remove cancel button on mobile

* Update height of operating hours mobile editor dialog

* Process cancel of edit on mobile dialog close

* Increase height for adding hours dialog to match editing hours dialog

* Fix save button not showing in add operating hours dialog

* Fix error in detecting if the operating hours are new in dialog

I'll be honest I'm not the biggest fan of this "fix" but I do think this is going to be the best option we have for now

* Convert recurrence day selection to a drop down in mobile dialog

* Fix no hours message to be centered

* Resize current day highlight

It's very cramped on days like the 25th but there isn't much room to expand unless we switch to a rounded square instead

* Add comments + perform a bit of cleanup

Mostly just documenting new functions, a little bit of removal for unused functions

* Rewrite operating hours selection to use .bind()
* Add Digital Signage for the XL Lounge (#697)

* First commit: added tv component to app list

* Routed TvComponent around Navigation Component

Observed any changes to the route for when the routing ends so we can
work with a completed and resolved route instead of a snapshot, which
only contains the route at the `app.component` level. This is then
subscribed to, the correct route information is extracted, and tested
in the `app.component.html` page.

* Added background color and the date

* Created sigange service, some signage api calls, and some signage models. They are not in their final form yet, just a base to work off of.

* Added seat availability in Service

* API layer completed

* Addressed static issues

* Fixed imports, added backend service functionality for newest announcments as well as available rooms

* Fixed the rooms query in the signage service to actually be a query instead of calling a premade function. Added an Office Hour query to the same file and took a crack at adding a query for the top number of users who made the most checkins. Also added an __init__.py file to the Office hours folder for the models so that the signage model could access them.

* Added query for getting the newest news as well as newest events in the sigange service.

* Get API routes in /docs

However, both are currently returning 500 errors. I think the fast route
is due to a query in the office hours section.

I also fixed some imports & wrote docstrings for the API routes.

* Get Fast and Slow Routes Running

Fixed incorrect method calls/model fields

Shifted office hours to use the OfficeHoursOverview model. The to_model method
will be moved into the entity layer in a future commit.

Changed magic values in slow route to be named constants defined at the
top of the signage service.

Filtered users in the top users list by start of the current month as
well as making sure their reservation was completed (CHECKED_OUT).

* Send only Announcement Titles

* Moved to OfficeHoursOverview model conversion to Entity layer

* Started on testing for fast signage data

* Added reservation checks for available rooms

Added additional query parameters to the RoomEntity query to ensure
there is no active reservation for a room.

* Added current room test data to signage_test

Placed this demo data in here since if it is placed in the reservation
test data it breaks some tests. This was needed as the current test
data has no current room reservation. I felt here would make more sense
than another file for just the one item.

* Wrote the last assert statements for test_get_fast_data

* Created singage_data file for the additional reservation we need to test for in the database

* Get test running

Fix required changing the order of some fixture imports and adding more
imports that previous imports were dependant upon.

This seems very clunky and it would make more sense if the fixtures to
insert data required for say the seats were imported in the seat_data
file so we wouldn't have to worry about importing those in every test
file.

* Basic tests for signage finished

q

* Got rid of 'TODO' comment in backend service

* Created models and helper functions for tv.service

* Created TV serice methods and TV component constuctor

* Switch TV name to Signage

* Fixed API Service Calls/Model Transform

* Module-ized Signage

This way we can the keep signage to only be loaded when routed to.

* Added auto refresh with subscriptions and signals

* Occupancy widget

Copied drop in widget and removed lots of functionality to be
lightweight and only for display purposes. Began formatting fun but hung
up on width and height amounts. We may just need to modify these as we
get more completed.

* Occupancy in Component, Background Color, Title

Added the background color and changed the title style. Also added
some padding to the whole page as well as fixed title size.

* Created the news widget for the signage page. Added css to make it pretty.

* Style Updates

* Merged in signage-news branch

* Small Positioning Changes

* Formatted mat-cards to be in line with eachother and be the correct height/width

* Started Rooms Widget

* Added much styling to the top row cards, still need to fix the cards to be the correct width.

* More card formatting for the top row

* Created widget for event-card

* Switch to exact units

* Fix footer & occupancy numbers positioning

* Add red background for unavailable rooms

* Added the leaderboard widget

* Testing sizing using percentages instead of pixels

* Update event card

* Responsive title

* Fix event margin

* Formatting title of event widget

* Fix occupancy margin

* Ellipsis when a event description or news description is too long now implemented.

* Removed image from Upcoming Events and centered all the titles

* Add OH Blank Card

* Switch to Different Office Hours Model on Signage

This is since the old model did not provide the course name.

* OH Model Changes and Widget Sorting

Model changes to support converting from raw JSON

Widget sorting is done to support easier HTML template rendering

* OH Basic Data Display Uncomplete

More percise positioning is still needed

* Office Hours Widget Formatting completed

* Page Spinner Widget Created with formatting and styling complete

* Completed Page Spinner Widget

* OH Changes to Support Quick Refreshes

These changes are to support quick refreshes that will occur when
fetching fast data. I want to make sure that we can quickly update
the queue number without needing to completly referesh the widget, which
we will only do now when we notice a difference in office hours being
offered.

Some of these include only running the onChanges when we notice a change
other than the queued number and switching everything to referencing off
of the OfficeHours list.

* Switch page spinner to using event emitter

* Finish OfficeHoursWidget with Lazy Loading

Pagination was implemented so that the office hours pages are cycled
from left to right. Allowing the user to have more time to view one
column.

Lazy loading was also implemented to make sure we are changing the
order of columns in time with the spinner widget. However, if only
the queue lengths of all the office hours are changed, then this is
ignored and the update is sent right through.

* Update colors in room and leaderboard widget to work with dark mode

* Refactor CSS for leaderboard and office hours widgets to improve responsiveness

* Fix OfficeHours and Leaderboard height being too tall.

Minor adjustments to office hours to accomodate.

* Fix clock to update on the minute

* Weather API implemented as well as displaying weather icons and temperature.

* Removed extra constructor parameter from signage componenet.

* Put the fetchWeatherData() call into the signage service. Added night icon as well.

* Fixed logic for weather icon selection.

* Fixed bug where sunny icon kept overriding. Got rid of console.log cmds.

* Rework Leaderbaord to add pagination

* Add Pagination to Events Widget

Also added text if no events are recieved from the backend

* Styled leaderboard widget chips and spacing.

* Fixed chip border radius.

* Spinner added to news widget, edited news description css to decrease width and increase height.

* Fix error message output in weather. Unfortunately, this is now causing all of the slow data to not load in.

* Fix slow data race conditions

Fixes came from this deepseek chat: https://chat.deepseek.com/a/chat/s/ccac8700-97b1-4fbe-bd70-4c7922ffdd73

* Removed unneeded timestamp line

* Placed Blank Announcement Widget

* Left-align, per Ajay's request.

* Removed stray console.log cmds

* Spaced out leaderboard chips downwards more.

* Announcements shown, not styled yet

* Fix Spinner widget slowing down

Fix was changing the refresh time to once every 100ms instead of every 10ms

* Fixed OH widget content aligning to be left aligned, also alphabetized OH widget css.

* Announcement Formatting

* Fix logic/type and increase seconds between change

* Add office hours section numbers

* Modify Configuration Settings (Timers, office hours display amounts, refresh rate)

* Remove Unused Imports

* Moved back the `to_office_hours_overview` method to the service layer

It was no longer needed for signage (we made our own model)

* Switch data to using loop per Jade's Request

Also modified test to account for new office hours data from recurring events. All tests pass now.

* Service Changes

Added documentation, moved calls to constuctor

* CamelCase and typos

Didn't mess with occupancy widget as that will take a lot of rewrite since it was mostly copied + pasted

* Add Announcement Model

Also capitalized JSON in our models/methods

* Added documentation to assignWeatherIcon() method. Removed TODO and leftover comments in occupancy widget.

* Switched to use new `SignageProfile`

This is a stripped down version of `PublicProfile`. The goal here is to remove any sensisitve information so we can leave these routes open without needed any sort of validation.

* Clean HTML in rooms and leaderbaord

* Input signals and Documentation

* Occupancy logic simplification

* Weather service created, methods moved from signage service to clear clutter.

* Added comments for temperature2m and windSpeed10m.

* Removed 2m and 10m from temperature and windspeed variables.

* Title css changes

* Move org chips into if statement

* Json and .some

---------

Co-authored-by: wzahrt <[email protected]>
Co-authored-by: wzahrt <[email protected]>
Co-authored-by: atoneyd <[email protected]>

* Hotfix: Signage Office Hours get correct name, remove display of old events, change name of occupancy (#735)

* (feat:692) Office Hours Statistics (#739)

* Create Overview Model to push branches

* Pushing feature/692-ticket-statistics branch

* Task/707-ticket-statistics: Ticket Statistics Backend (#719)

* (task:710) implement backend service method to retrieve paginated ticket history

* (task:710) Write test and API endpoint for the paginated ticket feature

* (test:710) Reach 100% coverage on statistics ticket feature

* (fix:710) Fix error with multiple different filters

* Create Ticket Statistics Model (ticket_statistics.py). Add OfficeHoursStatisticsOverview
(models/my_courses.py). Create methods (office_hours_statistics.py) for getting avg.
wait time and duration of each ticket, total number of conceptual help vs. assignment
help, and total tickets overall and weekly.

* Fix attribute type and name

* Change back to ints

* Changed return type in get avg duration and get avg wait

* Trying to make apply_filters() method, so all can use

* Revert back to no Apply Filter

* Put all stats methods into one

* Added create ticket query

* Checkpoint for get_statistics

* Modifying statement, issue with calling .where()

* Meet with Ajay and Jade and fix sql issue

* Created an alias for the OfficeHoursTicket entity and used subquerying on the statement to remove some bugs in getting statistics. Wrote tests to make sure we get the right statistics when filters are applied

* Clean up test code before open PR

* Address Ajays PR Concerns

* Address Jade's PR comments

---------

Co-authored-by: jadekeegan <[email protected]>
Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Lauren Ferlito <[email protected]>

* (task:708) Implement Office Hours History UI (#721)

* (task:713) Create Statistics Component

* (task:713) Begin filter chip and dialog

* (task:713) Make chip reactive to selected item changes

* (task:713) Add filtering functionality

* (task:713) Adjust width of dropdown

* (task:713) Abstract out filter logic to be customizable

* (task:713) Ensure selected items remain selected after dialog closes and reopens

* Feature/690-ticket-history: Ticket History Backend (#717)

* (task:710) implement backend service method to retrieve paginated ticket history

* (task:710) Write test and API endpoint for the paginated ticket feature

* (test:710) Reach 100% coverage on statistics ticket feature

* (fix:710) Fix error with multiple different filters

---------

Co-authored-by: Ajay Gandecha <[email protected]>

* (task:709) get office hours filter data

* (task:709) Begin to connect the new API to the frontend

* (task:709) Fix broken API, add tests

* (task:709) Add styling for custom date range chip

* (task:709) Fix date picker placement

* (task:709) Change date picker to date range picker

* (task:709) Configure working date filter chip

* (task:709) Fix bug with filter chip wrapping

* (task:709) Implement summary cards

* (task:709) Connect filters to paginated effect

* (task:709) Create working version of ticket history view

* (task:709) Add fallback label to ticket list

* (task:709) Fix merge conflicts and reach 100% coverage

* (task:709) Re-add API route that got nuked in a merge?

* (task:709) Connect new APIs to frontend

* (task:709) Add (Staff) label to staff on tickets

---------

Co-authored-by: Jade Keegan <[email protected]>

* (task:722) Implement ticket details dialog

* (fix:722) Remove unnecessary div tags

* (task:722) Add markdown directive to ticket description

* (fix:728) Fix dark mode styling (#733)

* (task:723) Implement Ticket Data Export to CSV (#732)

* (task:723) Create and test backend service for ticket CSV generation

* (task:723) Implement API Route

* (task:723) Implement frontend functionality

* (fix:722) Fix merge conflict resolution

---------

Co-authored-by: Mira Mohan <[email protected]>
Co-authored-by: Mira Mohan <[email protected]>
Co-authored-by: jadekeegan <[email protected]>
Co-authored-by: Lauren Ferlito <[email protected]>

* Update styles.scss

* (fix) Remove short summary label (#740)

* Remove short summary label

* Fix braces

---------

Co-authored-by: Kris Jordan <[email protected]>

* Hotfix: Ticket Statistics (#741)

* (fix) Fix ticket length in statistics

* (fix) Add ticket history sorting

* (fix) Use entity to_model instead of manual conversion for ticket overview model (#742)

* Reopen SN135 for reservation

* Center Logo (#745)

* Center logo

* More stylingn

* remove unused svg

* Remove misc CSS comments

* Fix logo hover on login

* Clean code

* Center logo (#749)

* Center logo

* More stylingn

* remove unused svg

* Remove misc CSS comments

* Fix logo hover on login

* Clean code

* Clean navigation CSS

---------

Co-authored-by: Kris Jordan <[email protected]>

* (task:751) Office Hours Statistics Hotfixes (#756)

* (fix:752) Add statistics tab for UTAs and GTAs (#754)

* (fix:743) Ensure that ticket pagination params propagate to frontend (#755)

* (task:757) Add markdown support for events (#758)

* Assign weather icon method accounts for drizzle and freezing rain instead of defualting to sunny.

* Fix Failing Room Reservation Tests & Remove Pacer Test (#762)

* remove pacer test notification

* Comment out failing test

* Fix test_transform_map_for_office_hours

Needed to mock the office_hours method in the policy_svc since this file is updated with new times for office hours each smester, breaking this test.

* Add policy service mocking to integration test

* Term test refactor (#750)

* Update term data and corresponding OH/section data

Term data has been updated to be more modular and based off of the current
date and time with preset semester lengths. There is now just a previous,
current, current_edited (for testing term changes), and future. Related
data has been updated to correspond with this new system.

* Update tests to match new term data

All tests but 2 unrelated coworking tests are now passing. Some have been
updated to be more modular, such as the recurrence test which now uses
essentially a bitmap to test how many office hours event should be created
starting from a certain day. Future changes to eliminate all "magic
numbers" from testing data would be ideal, but will likely be finished
in a different branch.

---------

Co-authored-by: Andrew Lockard <[email protected]>
Co-authored-by: wzahrt <[email protected]>
Co-authored-by: wzahrt <[email protected]>
Co-authored-by: atoneyd <[email protected]>
Co-authored-by: Ajay Gandecha <[email protected]>
Co-authored-by: Mira Mohan <[email protected]>
Co-authored-by: Mira Mohan <[email protected]>
Co-authored-by: jadekeegan <[email protected]>
Co-authored-by: Lauren Ferlito <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
Co-authored-by: Kris Jordan <[email protected]>
Co-authored-by: Alicia Bao <[email protected]>
Co-authored-by: Benjamin Eldridge <[email protected]>
* Abstract out the calendar element

* Fix calendar outline missing
I would love to try to find a better way to do this, since I think we're supposed to have mat-error applied to mat-form-fields, however I can't seem to find a good place for either error since it doesn't seem to work on the end time input
Merges the current operating hours implementation progress to a branch on the CSXL repo for further development ahead of the start of the semester.

Credit: @fossinating, @ellagonzales, @francinew6, @TJOKOLI17
Rearranges the admin page to put operating hours at the top and
renames the pane for hours to `Operating Hours`.
Improved the date number font and spacing.
Added some small tweaks to the buttons on the editor, including making
the delete button a teriary button and left-aligning it.
Modifies the delete button on the dialog.
@ajaygandecha ajaygandecha self-assigned this Aug 17, 2025
@ajaygandecha ajaygandecha marked this pull request as ready for review August 17, 2025 18:44
@ajaygandecha
Copy link
Member Author

@KrisJordan will need a migration run for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants