This pull request improves the room search and suggestion features in the rogue-thi-app by adding a modal dialog to edit the preferences, refactoring the code to use utility functions and hooks, and updating the translations. It also fixes a typo in the room-distances script and changes a translation in the api-translations.json file.
rooms-utils growssuggestions and translationsautumn of refactor
Added a hook to manage the building preferences in the local storage and provide a setter and a saver function for the preferences (link, link)
Added a function to translate the room function from German to English or vice versa using the i18n module (link, link, link, link, link, link)
Added a function to return all buildings filtered by Neuburg or Ingolstadt using the timetable (link)
Modified the getMajorityRoom function to use the current week and the first day of the week as the date for the timetable, instead of the current date (link)
Modified the getEmptySuggestions function to use the user's preferred duration and buildings from the local storage, instead of the default duration and the majority room (link)
Removed the getTranslatedFunction function and replaced it with the getTranslatedRoomFunction function in RoomMap.js (link, link, link, link, link, link)
Removed the BUILDINGS constant and imported it from rooms-utils.js in search.js (link, link)
Corrected the typo in the staircases variable name in the calculate-distances.py file (link, link, link, link, link)
🤖 Generated by Copilot at 33830c5
Summary
🏢🌐🎛️
This pull request improves the room search and suggestion features in the
rogue-thi-app
by adding a modal dialog to edit the preferences, refactoring the code to use utility functions and hooks, and updating the translations. It also fixes a typo in theroom-distances
script and changes a translation in theapi-translations.json
file.Walkthrough
i18n
module (link, link, link, link, link, link)getMajorityRoom
function to use the current week and the first day of the week as the date for the timetable, instead of the current date (link)getEmptySuggestions
function to use the user's preferred duration and buildings from the local storage, instead of the default duration and the majority room (link)getTranslatedFunction
function and replaced it with thegetTranslatedRoomFunction
function inRoomMap.js
(link, link, link, link, link, link)BUILDINGS
constant and imported it fromrooms-utils.js
insearch.js
(link, link)staircases
variable name in thecalculate-distances.py
file (link, link, link, link, link)