From d1fb9eaddb86f1184f7503ecf03be622d536fff4 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:39:04 +1000 Subject: [PATCH 01/12] feat: view map button with limited functionality --- backend/package-lock.json | 12 ++++++++ frontend/app/room/[room]/page.tsx | 18 +++++++---- frontend/components/ViewOnMapButton.tsx | 37 ++++++++++++++++++++++ frontend/package-lock.json | 41 +++++++++++++++++++------ 4 files changed, 92 insertions(+), 16 deletions(-) create mode 100644 frontend/components/ViewOnMapButton.tsx diff --git a/backend/package-lock.json b/backend/package-lock.json index 29039035e..e86e8046a 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -83,6 +83,7 @@ "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -1485,6 +1486,7 @@ "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -1609,6 +1611,7 @@ "integrity": "sha512-/Zb/xaIDfxeJnvishjGdcR4jmr7S+bda8PKNhRGdljDM+elXhlvN0FyPSsMnLmJUrVG9aPO6dof80wjMawsASg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.58.2", "@typescript-eslint/types": "8.58.2", @@ -1833,6 +1836,7 @@ "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2176,6 +2180,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001669", "electron-to-chromium": "^1.5.41", @@ -2584,6 +2589,7 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.21.0" }, @@ -2858,6 +2864,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -3591,6 +3598,7 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.2.tgz", "integrity": "sha512-5bJ+nf/UCpAjHM8i06fl7eLyVC9iuNAjm9qzkiu2ZGhM0VscSvS6WDPfAwkdkBuoXGM9FJSbKl6wylMwP9Ktig==", "license": "MIT", + "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -4009,6 +4017,7 @@ "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", @@ -6314,6 +6323,7 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -6451,6 +6461,7 @@ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -6592,6 +6603,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/frontend/app/room/[room]/page.tsx b/frontend/app/room/[room]/page.tsx index e5f6a0bb7..3888c5919 100644 --- a/frontend/app/room/[room]/page.tsx +++ b/frontend/app/room/[room]/page.tsx @@ -24,7 +24,7 @@ import useRoomRatings from "hooks/useRoomRatings"; import Image from "next/image"; import { useParams } from "next/navigation"; import React, { useState } from "react"; - +import ViewOnMapButton from "../../../components/ViewOnMapButton"; import BookingButton from "../../../components/BookingButton"; import BookingCalendar from "../../../components/BookingCalendar"; import FeedbackButton from "../../../components/FeedbackButton"; @@ -162,11 +162,17 @@ const RoomPageHeader: React.FC<{ room: Room; buildingName: string }> = ({ {room.name} - + + + + diff --git a/frontend/components/ViewOnMapButton.tsx b/frontend/components/ViewOnMapButton.tsx new file mode 100644 index 000000000..fd0517cfc --- /dev/null +++ b/frontend/components/ViewOnMapButton.tsx @@ -0,0 +1,37 @@ +import { useTheme } from "@mui/material"; +import Link from "@mui/material/Link"; +import Typography from "@mui/material/Typography"; +import React from "react"; + +import Button from "./Button"; + +const ViewOnMapButton: React.FC<{ + buildingId: string; +}> = ({ buildingId }) => { + const theme = useTheme(); + + return ( + + + + ); +}; + +export default ViewOnMapButton; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 52bb95178..a3aedae8c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -233,6 +233,7 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -808,6 +809,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -831,6 +833,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -932,6 +935,7 @@ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -975,6 +979,7 @@ "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -2419,6 +2424,7 @@ "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@mui/core-downloads-tracker": "^6.5.0", @@ -2529,6 +2535,7 @@ "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.5.0.tgz", "integrity": "sha512-XcbBYxDS+h/lgsoGe78ExXFZXtuIlSBpn/KsZq8PtZcIkUNJInkuDqcLd2rVBQrDC1u+rvVovdaWPf2FHKJf3w==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@mui/private-theming": "^6.4.9", @@ -3863,8 +3870,7 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -4057,6 +4063,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz", "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -4078,6 +4085,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.2.2" @@ -4192,6 +4200,7 @@ "integrity": "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", @@ -4723,6 +4732,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5360,6 +5370,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -5847,6 +5858,7 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.21.0" }, @@ -5871,7 +5883,8 @@ "version": "1.11.20", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.20.tgz", "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/debug": { "version": "4.4.3", @@ -6039,8 +6052,7 @@ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/dom-helpers": { "version": "5.2.1", @@ -6318,6 +6330,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -6540,6 +6553,7 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -9503,6 +9517,7 @@ "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -9768,6 +9783,7 @@ "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", "license": "MIT", + "peer": true, "engines": { "node": ">=12" } @@ -9778,7 +9794,6 @@ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -9962,6 +9977,7 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", "license": "MIT", + "peer": true, "engines": { "node": "*" } @@ -10662,7 +10678,6 @@ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -10678,7 +10693,6 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -10691,8 +10705,7 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/prompts": { "version": "2.4.2", @@ -10787,6 +10800,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -10836,6 +10850,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -10891,6 +10906,7 @@ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", "integrity": "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.1", "@types/hoist-non-react-statics": "^3.3.1", @@ -10966,6 +10982,7 @@ "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.9.2" } @@ -11978,6 +11995,7 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -12069,6 +12087,7 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "license": "MIT", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -12268,6 +12287,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12804,6 +12824,7 @@ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } From 7b7dedee40d07bfeebbc68ab082ca972fe53073e Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Tue, 21 Apr 2026 17:36:08 +1000 Subject: [PATCH 02/12] feat: redirect to map button with query in url --- frontend/app/room/[room]/page.tsx | 2 +- frontend/components/ViewOnMapButton.tsx | 8 +++++--- frontend/utils/utils.ts | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/app/room/[room]/page.tsx b/frontend/app/room/[room]/page.tsx index 3888c5919..10c5dd87c 100644 --- a/frontend/app/room/[room]/page.tsx +++ b/frontend/app/room/[room]/page.tsx @@ -166,7 +166,7 @@ const RoomPageHeader: React.FC<{ room: Room; buildingName: string }> = ({ direction={{ xs: "column", sm: "row" }} justifyContent="space-between" > - + = ({ buildingId }) => { + roomId: string; +}> = ({ roomId }) => { const theme = useTheme(); + const buildingId = getBuildingIdFromRoomId(roomId); return ( - + - + ); }; From bed82efc63a711ff81ef60a45a5cdd37268a4dd3 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:13:48 +1000 Subject: [PATCH 04/12] feat: select scale animation for building map markers --- frontend/components/MapMarker.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/components/MapMarker.tsx b/frontend/components/MapMarker.tsx index 769af94a1..5b18c149b 100644 --- a/frontend/components/MapMarker.tsx +++ b/frontend/components/MapMarker.tsx @@ -87,6 +87,8 @@ const MapMarker: React.FC<{ sx={{ fontSize: 11, fontWeight: 500, + translate: isCurrentBuilding ? "0px -10px" : "0px 0px", + transition: "all 0.2s ease-in-out", textShadow: theme.palette.mode === "light" ? "-.5px -.5px 1px #f2f2f2, .5px -.5px 1px #f2f2f2, -.5px .5px 1px #f2f2f2, .5px .5px 1px #f2f2f2" @@ -103,6 +105,8 @@ const MapMarker: React.FC<{ borderRadius: "50%", border: isCurrentBuilding ? `5px solid ${colour}` : "4px solid white", backgroundColor: isCurrentBuilding ? "white" : colour, + scale: isCurrentBuilding ? 2 : 1, + transition: "all 0.2s ease-in-out", boxShadow: isCurrentBuilding ? `0px 0px 6px 4px ${alpha(colour, 0.5)}` : "", From 13cb826a8d16beb8a642420e62469e8a45b5cdc5 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:47:20 +1000 Subject: [PATCH 05/12] feat: view on map button added to building drawer in browse --- frontend/app/room/[room]/page.tsx | 4 +++- frontend/components/ViewOnMapButton.tsx | 13 ++++++++----- frontend/views/BuildingDrawer.tsx | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/frontend/app/room/[room]/page.tsx b/frontend/app/room/[room]/page.tsx index 10c5dd87c..f25403d91 100644 --- a/frontend/app/room/[room]/page.tsx +++ b/frontend/app/room/[room]/page.tsx @@ -34,6 +34,7 @@ import useBookings from "../../../hooks/useBookings"; import useBuilding from "../../../hooks/useBuilding"; import useRoom from "../../../hooks/useRoom"; import room_photos from "../../../public/room-photos.json"; +import { getBuildingIdFromRoomId } from "../../../utils/utils"; const adjustDateIfMidnight = (inputDate: Date): Date => { // Check if the time is midnight (00:00:00) @@ -113,6 +114,7 @@ const RoomPageHeader: React.FC<{ room: Room; buildingName: string }> = ({ : "This room is managed externally by its associated school. Please contact the school to request a booking"; const ratings = useRoomRatings(room.id); + const buildingId = getBuildingIdFromRoomId(room.id); const ratingValue = (() => { // round rating to nearest .5 if a rating exists if (!ratings || !ratings.data) return 0; @@ -166,7 +168,7 @@ const RoomPageHeader: React.FC<{ room: Room; buildingName: string }> = ({ direction={{ xs: "column", sm: "row" }} justifyContent="space-between" > - + = ({ roomId }) => { + buildingId: string; + variant?: "default" | "full-width"; +}> = ({ buildingId, variant = "default" }) => { const theme = useTheme(); - const buildingId = getBuildingIdFromRoomId(roomId); + const dispatch = useDispatch(); const router = useRouter(); const { building } = useBuilding(buildingId); @@ -30,9 +31,11 @@ const ViewOnMapButton: React.FC<{ name="View on Map" sx={{ height: 45, - ml: { xs: 0, sm: 1 }, + ml: variant === "full-width" ? "0px" : { xs: 0, sm: 1 }, my: { xs: 1, sm: 0 }, - width: { xs: "100%", sm: "160px" }, + width: variant === "full-width" ? "100%" : { xs: "100%", sm: "160px" }, + position: "relative", + //right: variant === "full-width" ? "6px" : "0px", //this is because building drawer has weird margin idk backgroundColor: theme.palette.background.default, color: theme.palette.primary.main, }} diff --git a/frontend/views/BuildingDrawer.tsx b/frontend/views/BuildingDrawer.tsx index 8981693af..8cddf6e6a 100644 --- a/frontend/views/BuildingDrawer.tsx +++ b/frontend/views/BuildingDrawer.tsx @@ -14,6 +14,7 @@ import { } from "../redux/currentBuildingSlice"; import { useDispatch, useSelector } from "../redux/hooks"; import RoomAvailabilityBox from "./RoomAvailabilityBox"; +import ViewOnMapButton from "@frontend/components/ViewOnMapButton"; const AppBox = styled(Box)(({ theme }) => ({ boxShadow: "none", @@ -128,6 +129,7 @@ const BuildingDrawer: React.FC = () => { style={{ objectFit: "cover" }} priority={true} /> + From 8726d4a058ae79c45bdaf2dd65b68a835f929232 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:59:42 +1000 Subject: [PATCH 06/12] fix: lint issues --- frontend/app/map/page.tsx | 8 +++++++- frontend/app/room/[room]/page.tsx | 3 ++- frontend/components/Map.tsx | 8 ++++---- frontend/components/MapMarker.tsx | 2 +- frontend/components/ViewOnMapButton.tsx | 9 +++++---- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/frontend/app/map/page.tsx b/frontend/app/map/page.tsx index 517d2b050..79381867d 100644 --- a/frontend/app/map/page.tsx +++ b/frontend/app/map/page.tsx @@ -1,7 +1,13 @@ "use client"; +import { Suspense } from "react"; + import { Map } from "../../components/Map"; export default function Page() { - return ; + return ( + + + + ); } diff --git a/frontend/app/room/[room]/page.tsx b/frontend/app/room/[room]/page.tsx index f25403d91..f56c45321 100644 --- a/frontend/app/room/[room]/page.tsx +++ b/frontend/app/room/[room]/page.tsx @@ -24,12 +24,13 @@ import useRoomRatings from "hooks/useRoomRatings"; import Image from "next/image"; import { useParams } from "next/navigation"; import React, { useState } from "react"; -import ViewOnMapButton from "../../../components/ViewOnMapButton"; + import BookingButton from "../../../components/BookingButton"; import BookingCalendar from "../../../components/BookingCalendar"; import FeedbackButton from "../../../components/FeedbackButton"; import LoadingCircle from "../../../components/LoadingCircle"; import RoomBackButton from "../../../components/RoomBackButton"; +import ViewOnMapButton from "../../../components/ViewOnMapButton"; import useBookings from "../../../hooks/useBookings"; import useBuilding from "../../../hooks/useBuilding"; import useRoom from "../../../hooks/useRoom"; diff --git a/frontend/components/Map.tsx b/frontend/components/Map.tsx index c5629ecb2..f90ae047c 100644 --- a/frontend/components/Map.tsx +++ b/frontend/components/Map.tsx @@ -1,4 +1,5 @@ import { Building } from "@common/types"; +import useBuilding from "@frontend/hooks/useBuilding"; import Box from "@mui/material/Box"; import { GoogleMap, @@ -7,6 +8,7 @@ import { useJsApiLoader, } from "@react-google-maps/api"; import { DarkModeContext } from "app/clientLayout"; +import { useSearchParams } from "next/navigation"; import React, { useContext, useEffect, useState } from "react"; import { useDebounceValue } from "usehooks-ts"; import BuildingDrawer from "views/BuildingDrawer"; @@ -14,13 +16,11 @@ import BuildingDrawer from "views/BuildingDrawer"; import { GOOGLE_API_KEY } from "../config"; import useBuildings from "../hooks/useBuildings"; import useUserLocation from "../hooks/useUserLocation"; +import { setCurrentBuilding } from "../redux/currentBuildingSlice"; +import { useDispatch } from "../redux/hooks"; import calculateDistance from "../utils/calculateDistance"; import getMapType from "../utils/getMapType"; import MapMarker from "./MapMarker"; -import { useSearchParams } from "next/navigation"; -import { setCurrentBuilding } from "../redux/currentBuildingSlice"; -import { useDispatch } from "../redux/hooks"; -import useBuilding from "@frontend/hooks/useBuilding"; const center = { lat: -33.91767, diff --git a/frontend/components/MapMarker.tsx b/frontend/components/MapMarker.tsx index 5b18c149b..2f4c8fe3d 100644 --- a/frontend/components/MapMarker.tsx +++ b/frontend/components/MapMarker.tsx @@ -7,8 +7,8 @@ import { Typography } from "@mui/material"; import Box, { BoxProps } from "@mui/material/Box"; import { styled, useTheme } from "@mui/material/styles"; import Image, { ImageProps } from "next/image"; -import React from "react"; import { useRouter, useSearchParams } from "next/navigation"; +import React from "react"; import useBuilding from "../hooks/useBuilding"; import useBuildingStatus from "../hooks/useBuildingStatus"; diff --git a/frontend/components/ViewOnMapButton.tsx b/frontend/components/ViewOnMapButton.tsx index 90f1c6609..1e893ae85 100644 --- a/frontend/components/ViewOnMapButton.tsx +++ b/frontend/components/ViewOnMapButton.tsx @@ -1,14 +1,15 @@ +import { Building } from "@common/types"; +import useBuilding from "@frontend/hooks/useBuilding"; import { useTheme } from "@mui/material"; import Link from "@mui/material/Link"; import Typography from "@mui/material/Typography"; +import { useRouter } from "next/navigation"; import React from "react"; -import { getBuildingIdFromRoomId } from "../utils/utils"; -import { Building } from "@common/types"; + import { setCurrentBuilding } from "../redux/currentBuildingSlice"; import { useDispatch } from "../redux/hooks"; -import { useRouter } from "next/navigation"; +import { getBuildingIdFromRoomId } from "../utils/utils"; import Button from "./Button"; -import useBuilding from "@frontend/hooks/useBuilding"; const ViewOnMapButton: React.FC<{ buildingId: string; From 6a2e0f636ddf5458010babcb04b86f2afe89206e Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:05:54 +1000 Subject: [PATCH 07/12] fix: building drawer passes tests --- frontend/__tests__/BuildingDrawer.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/__tests__/BuildingDrawer.test.tsx b/frontend/__tests__/BuildingDrawer.test.tsx index 5b051036e..363a1f7a4 100644 --- a/frontend/__tests__/BuildingDrawer.test.tsx +++ b/frontend/__tests__/BuildingDrawer.test.tsx @@ -14,6 +14,13 @@ jest.mock("@mui/material", () => ({ ...jest.requireActual("@mui/material"), useMediaQuery: jest.fn().mockReturnValue(false), })); +jest.mock("next/navigation", () => ({ + ...jest.requireActual("next/navigation"), + useRouter: jest.fn().mockReturnValue({ + push: jest.fn(), + replace: jest.fn(), + }), +})); describe("BuildingDrawer", () => { it("Building Drawer shows close button", () => { From e2179298fdc552b1064c41408bfd37043951d037 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:25:55 +1000 Subject: [PATCH 08/12] fix: lint errors --- frontend/components/Map.tsx | 27 +++--- frontend/components/MapMarker.tsx | 10 +-- frontend/package-lock.json | 136 +----------------------------- frontend/views/BuildingDrawer.tsx | 2 +- 4 files changed, 19 insertions(+), 156 deletions(-) diff --git a/frontend/components/Map.tsx b/frontend/components/Map.tsx index 9b8bc23a0..a4c2b5180 100644 --- a/frontend/components/Map.tsx +++ b/frontend/components/Map.tsx @@ -9,7 +9,7 @@ import { } from "@react-google-maps/api"; import { DarkModeContext } from "app/clientLayout"; import { useSearchParams } from "next/navigation"; -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useMemo } from "react"; import { useDebounceValue } from "usehooks-ts"; import BuildingDrawer from "views/BuildingDrawer"; @@ -73,7 +73,14 @@ export const Map = () => { googleMapsApiKey: GOOGLE_API_KEY, }); - const [distances, setDistances] = useState([]); + const distances = useMemo(() => { + if (buildings && userLat && userLng && isInBounds(userLat, userLng)) { + return buildings.map((building) => + calculateDistance(userLat, userLng, building.lat, building.long) + ); + } + return []; + }, [buildings, userLat, userLng]); //set current building to search param query - THIS IS WHERE OTHER QUERIES CAN GO const searchParams = useSearchParams(); @@ -84,21 +91,7 @@ export const Map = () => { if (building) { dispatch(setCurrentBuilding(building || null)); } - }, [building]); - - useEffect(() => { - if (buildings && userLat && userLng && isInBounds(userLat, userLng)) { - setDistances( - buildings.map((building) => - calculateDistance(userLat, userLng, building.lat, building.long) - ) - ); - } - - return buildings.map((building) => - calculateDistance(userLat, userLng, building.lat, building.long) - ); - }, [buildings, userLat, userLng]); + }, [building, dispatch]); const mapOptions = useMemo( () => ({ diff --git a/frontend/components/MapMarker.tsx b/frontend/components/MapMarker.tsx index 0a8313aff..608558047 100644 --- a/frontend/components/MapMarker.tsx +++ b/frontend/components/MapMarker.tsx @@ -82,7 +82,9 @@ const MapMarker: React.FC<{ const currentBuilding = useSelector(selectCurrentBuilding); const isCurrentBuilding = currentBuilding?.id === building?.id; - const [showPopup, setShowPopup] = React.useState(false); + const showPopup = currentHover?.id === building?.id; + const [appearAbove, setAppearAbove] = React.useState(false); + const [appearLeft, setAppearLeft] = React.useState(false); const handleSelectBuilding = () => { dispatch(setCurrentBuilding(building || null)); @@ -90,10 +92,6 @@ const MapMarker: React.FC<{ router.push(`/map?${params.toString()}`); }; - React.useEffect(() => { - setShowPopup(currentHover?.id === building?.id); - }, [currentHover, building]); - const colour = freerooms >= 5 ? "#66bb6a" : freerooms !== 0 ? "#ffa726" : "#f44336"; @@ -158,7 +156,7 @@ const MapMarker: React.FC<{ "&:hover": { cursor: "pointer", }, - })} + }} onClick={() => handleSelectBuilding()} /> diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 57567d1f5..d3df95064 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -838,28 +838,6 @@ "node": ">=18" } }, - "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", @@ -1354,9 +1332,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1373,9 +1348,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1392,9 +1364,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1411,9 +1380,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1430,9 +1396,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1449,9 +1412,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1468,9 +1428,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1487,9 +1444,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1506,9 +1460,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1531,9 +1482,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1556,9 +1504,6 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1581,9 +1526,6 @@ "cpu": [ "riscv64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1606,9 +1548,6 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1631,9 +1570,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1656,9 +1592,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1681,9 +1614,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -2781,9 +2711,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2800,9 +2727,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2819,9 +2743,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2838,9 +2759,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4595,9 +4513,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4612,9 +4527,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4629,9 +4541,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4646,9 +4555,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4663,9 +4569,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4680,9 +4583,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4697,9 +4597,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4714,9 +4611,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4731,9 +4625,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -4748,9 +4639,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5969,7 +5857,8 @@ "version": "1.11.21", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.21.tgz", "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/debug": { "version": "4.4.3", @@ -7048,24 +6937,6 @@ "bser": "2.1.1" } }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -10881,7 +10752,8 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/redux-thunk": { "version": "3.1.0", diff --git a/frontend/views/BuildingDrawer.tsx b/frontend/views/BuildingDrawer.tsx index 8f23ca9aa..47c810add 100644 --- a/frontend/views/BuildingDrawer.tsx +++ b/frontend/views/BuildingDrawer.tsx @@ -1,3 +1,4 @@ +import ViewOnMapButton from "@frontend/components/ViewOnMapButton"; import CloseIcon from "@mui/icons-material/Close"; import { Slide, Typography, useMediaQuery } from "@mui/material"; import Box, { BoxProps } from "@mui/material/Box"; @@ -14,7 +15,6 @@ import { } from "../redux/currentBuildingSlice"; import { useDispatch, useSelector } from "../redux/hooks"; import RoomAvailabilityBox from "./RoomAvailabilityBox"; -import ViewOnMapButton from "@frontend/components/ViewOnMapButton"; const AppBox = styled(Box)(({ theme }) => ({ boxShadow: "none", From 10ef9c9557e9e92608efb12d2e088b77c73acde7 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:31:41 +1000 Subject: [PATCH 09/12] fix: map imports --- frontend/components/Map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/Map.tsx b/frontend/components/Map.tsx index a4c2b5180..f1032f4fe 100644 --- a/frontend/components/Map.tsx +++ b/frontend/components/Map.tsx @@ -9,7 +9,7 @@ import { } from "@react-google-maps/api"; import { DarkModeContext } from "app/clientLayout"; import { useSearchParams } from "next/navigation"; -import React, { useContext, useEffect, useMemo } from "react"; +import React, { useContext, useEffect, useMemo, useState } from "react"; import { useDebounceValue } from "usehooks-ts"; import BuildingDrawer from "views/BuildingDrawer"; From 83a56ae78ab0e0ff12c0fa15e9a2ed937bea5677 Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:38:18 +1000 Subject: [PATCH 10/12] fix: package lock --- frontend/package-lock.json | 85 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d3df95064..481520ac1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -838,6 +838,30 @@ "node": ">=18" } }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", @@ -5833,12 +5857,6 @@ "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", "license": "MIT", "peer": true, - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -6526,7 +6544,6 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -6937,6 +6954,24 @@ "bser": "2.1.1" } }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -10303,6 +10338,7 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -10568,9 +10604,6 @@ "integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==", "license": "MIT", "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } @@ -11804,38 +11837,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tldts": { "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", From 94a2b05d7487291a3b8f9d743bf55c9730a5686d Mon Sep 17 00:00:00 2001 From: caelan-g <141709327+caelan-g@users.noreply.github.com> Date: Fri, 5 Jun 2026 17:42:10 +1000 Subject: [PATCH 11/12] fix: room stack --- frontend/app/room/[room]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/room/[room]/page.tsx b/frontend/app/room/[room]/page.tsx index 4a23c7733..df1cc5f51 100644 --- a/frontend/app/room/[room]/page.tsx +++ b/frontend/app/room/[room]/page.tsx @@ -185,7 +185,7 @@ const RoomPageHeader: React.FC<{ room: Room; buildingName: string }> = ({ Date: Fri, 5 Jun 2026 17:48:12 +1000 Subject: [PATCH 12/12] fix: view on map button sx --- frontend/components/ViewOnMapButton.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/components/ViewOnMapButton.tsx b/frontend/components/ViewOnMapButton.tsx index 1e893ae85..d31b70a85 100644 --- a/frontend/components/ViewOnMapButton.tsx +++ b/frontend/components/ViewOnMapButton.tsx @@ -1,14 +1,11 @@ -import { Building } from "@common/types"; import useBuilding from "@frontend/hooks/useBuilding"; import { useTheme } from "@mui/material"; -import Link from "@mui/material/Link"; import Typography from "@mui/material/Typography"; import { useRouter } from "next/navigation"; import React from "react"; import { setCurrentBuilding } from "../redux/currentBuildingSlice"; import { useDispatch } from "../redux/hooks"; -import { getBuildingIdFromRoomId } from "../utils/utils"; import Button from "./Button"; const ViewOnMapButton: React.FC<{ @@ -44,7 +41,7 @@ const ViewOnMapButton: React.FC<{ color="primary" onClick={() => handleMapRedirect(buildingId)} > - + View on Map