From f32cd2a4f7e369b1825cacb555f0c335ad3784d0 Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Mon, 13 May 2024 22:17:57 +1200 Subject: [PATCH 1/9] VPS-164-UI for invalid scene permissions page Issue: A standalone page is required to redirect to when the user tries to access a scene that their role cannot access Solution: A page is implemented with a back button to the scene scenario selection page --- frontend/src/components/BackButton.jsx | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 frontend/src/components/BackButton.jsx diff --git a/frontend/src/components/BackButton.jsx b/frontend/src/components/BackButton.jsx new file mode 100644 index 00000000..35df829d --- /dev/null +++ b/frontend/src/components/BackButton.jsx @@ -0,0 +1,31 @@ +import React from "react"; +import { Link } from "react-router-dom"; + +const BackButton = () => { + const containerStyle = { + display: "flex", + justifyContent: "center", + alignItems: "center", + }; + + const buttonStyle = { + padding: "10px 20px", + fontSize: "16px", + borderRadius: "5px", + backgroundColor: "#0d37de", + color: "#fff", + textDecoration: "none", + }; + + return ( +
+ + + +
+ ); +}; + +export default BackButton; From 1516e7ad1c5172c9016d38008f7352fa2724088d Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Mon, 13 May 2024 22:53:15 +1200 Subject: [PATCH 2/9] Removed import react statements --- frontend/src/components/BackButton.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/BackButton.jsx b/frontend/src/components/BackButton.jsx index 35df829d..c568b632 100644 --- a/frontend/src/components/BackButton.jsx +++ b/frontend/src/components/BackButton.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Link } from "react-router-dom"; const BackButton = () => { From 8e0e7a81b4944ad753d169a26d25830a6eae9c64 Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Mon, 20 May 2024 11:05:07 +1200 Subject: [PATCH 3/9] Remove the playscenarioresolver --- frontend/src/containers/App.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/containers/App.jsx b/frontend/src/containers/App.jsx index 2e61ad1a..936ccf6e 100644 --- a/frontend/src/containers/App.jsx +++ b/frontend/src/containers/App.jsx @@ -14,7 +14,6 @@ import ManageGroupsPage from "./pages/ManageGroups/ManageGroupsPage"; import { ScenePage } from "./pages/SceneSelectionPage"; import theme from "./theme/App.theme"; import PlayScenarioResolver from "./pages/PlayScenarioPage/PlayScenarioResolver"; -import InvalidRolePage from "./pages/InvalidRolePage"; export default function App() { return ( @@ -28,9 +27,7 @@ export default function App() { path="/play/invalid-role" component={InvalidRolePage} > - - - + From 8a115fbed12c8b0f83175e025590b37195a6abb7 Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Mon, 20 May 2024 17:07:46 +1200 Subject: [PATCH 4/9] import invalidrolepage --- frontend/src/containers/App.jsx | 1 + images/Thumbs.db | Bin 0 -> 8192 bytes 2 files changed, 1 insertion(+) create mode 100644 images/Thumbs.db diff --git a/frontend/src/containers/App.jsx b/frontend/src/containers/App.jsx index 936ccf6e..b073dc22 100644 --- a/frontend/src/containers/App.jsx +++ b/frontend/src/containers/App.jsx @@ -14,6 +14,7 @@ import ManageGroupsPage from "./pages/ManageGroups/ManageGroupsPage"; import { ScenePage } from "./pages/SceneSelectionPage"; import theme from "./theme/App.theme"; import PlayScenarioResolver from "./pages/PlayScenarioPage/PlayScenarioResolver"; +import InvalidRolePage from "./pages/InvalidRolePage"; export default function App() { return ( diff --git a/images/Thumbs.db b/images/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..614d3cf6c632fc5e35124cbb163b909bf1e2bffa GIT binary patch literal 8192 zcmeHMc~}$KmM=&kATjI`WR(P>fXHqF0fGo2+Ont!sNF09L0L=!in1#zifjP^K@6)# z6xk7R14IK20wO5NBGCXr*>?~~CTQ#U-kbjB&Ah+nO`m+H>fBrRoO^!fck5Ptm6vVe z%$(AVAAr9TQvd{TxWa(oP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W1fgZWU?oqii`e&n4%2LVpPh|Q@Pk9=26M9UUc7Syn>!XcoP>GD=(KoKWHBKN<;VpP65BvFgV3{I3J4}! zN*{F^&g`uk_Nj`K&Tuq5X?%l0h%&ZDCRL*ZszTqjlI}Cq zHKNC;wPQ2_w%t-sLptJvvQ0$5@wQc6`7pD#n%}(BT%7lBOIybzZc%&{zV{Ke>w?)u z#VhtWC&#XjCxCiEbNNwhq*qO)}U}AIjYfwf*-IRkhGK% zh_1Qlz|vW=gPzqz40!l4=UG|B`t)bwOL59E&=Ofi7a%G#VMjpJXQ0(qpBJArB~O%d zixiKeHxGyfd`Yq$&^r@DKXF^N!?*<3YQD5T)|JTn^JEU8fMa05xsj!Z#>9g;7ZNHg zN4{*_oDKSKTQ{m|;=3JEtW~YiZq$Zb2ylqKCE%SUDTu5%Fi?eB(CF&AVNUnCOt*fu zdHsDN1d&KF9Y?o04C58f2uKOUTv(C?pFRu=ABN0;%- z5k{zUxiLWJ>$}XC6UdIa_1K00@%n9955decDZTWlR?+Z0@BxJvRKh0jea#lJTDyty zr?JzNu=05C+$33PDf?f(?ywd9{-d5H7ld5jQO>0$o1F?+V#ntVHYn_ovV(Bn{abz^ I{r3j-AAb#Y{{R30 literal 0 HcmV?d00001 From 9d3dad4dd3ce1ef08c3ab6b62873cd152358f71a Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Mon, 27 May 2024 18:10:18 +1200 Subject: [PATCH 5/9] Removed the deletebutton from sidebar Replaced the deletebutton with a deletemodal on the sidebar --- frontend/src/components/SideBar.jsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/SideBar.jsx b/frontend/src/components/SideBar.jsx index d85744f2..e9395458 100644 --- a/frontend/src/components/SideBar.jsx +++ b/frontend/src/components/SideBar.jsx @@ -6,9 +6,9 @@ import ScenarioContext from "../context/ScenarioContext"; import AccessLevel from "../enums/route.access.level"; import { useDelete, usePost } from "../hooks/crudHooks"; import styles from "../styling/SideBar.module.scss"; -import DeleteButton from "./DeleteButton"; import HelpButton from "./HelpButton"; import CreateScenerioCard from "./CreateScenarioCard"; +import DeleteModal from "./DeleteModal"; /** * Component used for navigation and executing actions located at the left side of the screen. @@ -152,15 +152,10 @@ export default function SideBar() {
  • - - Delete - +
  • + Delete + + + + ); +} + +export default DeleteModal; From 7453ae29e9f6740535f37d2824db11e003a3e485 Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Tue, 28 May 2024 15:19:57 +1200 Subject: [PATCH 7/9] removed the backbutton, not needed for the delete modal --- frontend/src/components/BackButton.jsx | 30 -------------------------- 1 file changed, 30 deletions(-) delete mode 100644 frontend/src/components/BackButton.jsx diff --git a/frontend/src/components/BackButton.jsx b/frontend/src/components/BackButton.jsx deleted file mode 100644 index c568b632..00000000 --- a/frontend/src/components/BackButton.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Link } from "react-router-dom"; - -const BackButton = () => { - const containerStyle = { - display: "flex", - justifyContent: "center", - alignItems: "center", - }; - - const buttonStyle = { - padding: "10px 20px", - fontSize: "16px", - borderRadius: "5px", - backgroundColor: "#0d37de", - color: "#fff", - textDecoration: "none", - }; - - return ( -
    - - - -
    - ); -}; - -export default BackButton; From de92d29e40f9a9167fb5dedc6353ef12ec3feb7f Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Tue, 28 May 2024 15:20:11 +1200 Subject: [PATCH 8/9] added the playscenarioresolver --- frontend/src/containers/App.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/containers/App.jsx b/frontend/src/containers/App.jsx index b073dc22..2e61ad1a 100644 --- a/frontend/src/containers/App.jsx +++ b/frontend/src/containers/App.jsx @@ -28,7 +28,9 @@ export default function App() { path="/play/invalid-role" component={InvalidRolePage} > - + + + From 6ee98cd3d5abf214f9713c520c2edd32aa027232 Mon Sep 17 00:00:00 2001 From: jacobmathew105 <136278107+jacobmathew105@users.noreply.github.com> Date: Tue, 28 May 2024 16:51:01 +1200 Subject: [PATCH 9/9] Updated snapshots for the scenarioselctionpage and the sidebar page --- .../__snapshots__/SideBar.test.js.snap | 48 ++++++++++--------- .../ScenarioSelectionPage.test.js.snap | 28 ++++++----- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/frontend/src/components/__tests__/__snapshots__/SideBar.test.js.snap b/frontend/src/components/__tests__/__snapshots__/SideBar.test.js.snap index cc4df160..6733d112 100644 --- a/frontend/src/components/__tests__/__snapshots__/SideBar.test.js.snap +++ b/frontend/src/components/__tests__/__snapshots__/SideBar.test.js.snap @@ -94,30 +94,32 @@ exports[`Side Bar component snapshot test 1`] = `
  • - + + Delete + + +
  • - + + Delete + + + +