diff --git a/services/common/src/components/help/HelpGuide.tsx b/services/common/src/components/help/HelpGuide.tsx index b13df3577f..ea8307ca57 100644 --- a/services/common/src/components/help/HelpGuide.tsx +++ b/services/common/src/components/help/HelpGuide.tsx @@ -36,9 +36,10 @@ import { useAppDispatch, useAppSelector } from "@mds/common/redux/rootState"; interface HelpGuideProps { helpKey: string; + showText?: boolean; } -export const HelpGuideContent: FC = ({ helpKey }) => { +export const HelpGuideContent: FC = ({ helpKey, showText = false }) => { const dispatch = useAppDispatch(); const system: SystemFlagEnum = useSelector(getSystemFlag); const params = useParams(); @@ -50,7 +51,11 @@ export const HelpGuideContent: FC = ({ helpKey }) => { const [open, setOpen] = useState(false); const [isEditMode, setIsEditMode] = useState(false); const canEditHelp = useSelector(userHasRole(USER_ROLES.role_edit_helpdesk)); - const helpGuide = useAppSelector(getHelpByKey(helpKey, pageTab)) ?? { help_guid: null, help_key: helpKey, content: "" }; + const helpGuide = useAppSelector(getHelpByKey(helpKey, pageTab)) ?? { + help_guid: null, + help_key: helpKey, + content: "", + }; const { help_guid, help_key } = helpGuide; const hasHelpGuide = Boolean(help_guid); const defaultGuide = help_key === EMPTY_HELP_KEY; @@ -61,11 +66,14 @@ export const HelpGuideContent: FC = ({ helpKey }) => { const cancelEdit = () => { cancelConfirmWrapper(() => setIsEditMode(false), isFormDirty); - } + }; const showDrawer = () => setOpen(true); const hideDrawer = () => { - cancelConfirmWrapper(() => { setIsEditMode(false); setOpen(false) }, isFormDirty); + cancelConfirmWrapper(() => { + setIsEditMode(false); + setOpen(false); + }, isFormDirty); }; const handleFetchData = () => { @@ -114,11 +122,7 @@ export const HelpGuideContent: FC = ({ helpKey }) => { {hasHelpGuide ? "Edit Help Guide" : "Create Help Guide"} ); - const cancelEditButton = ( - - ); + const cancelEditButton = ; const submitButton = ( = ({ helpKey }) => { ); }; -const HelpGuide: FC = () => { +const HelpGuide: FC<{ showText?: boolean }> = ({ showText = false }) => { const dispatch = useDispatch(); const system: SystemFlagEnum = useSelector(getSystemFlag); const authenticated = useSelector(isAuthenticated); @@ -215,7 +222,7 @@ const HelpGuide: FC = () => { const { route = "", helpKey = "" } = routeData as any; return ( - {helpKey && } + {helpKey && } ); })} diff --git a/services/minespace-web/src/assets/downloads/MineSpace_User_Guide_2026.pdf b/services/minespace-web/src/assets/downloads/MineSpace_User_Guide_2026.pdf new file mode 100644 index 0000000000..37032ff83c Binary files /dev/null and b/services/minespace-web/src/assets/downloads/MineSpace_User_Guide_2026.pdf differ diff --git a/services/minespace-web/src/components/dashboard/mine/MineDashboardRoutes.tsx b/services/minespace-web/src/components/dashboard/mine/MineDashboardRoutes.tsx index 82c7ef3a2c..f55c76ffee 100644 --- a/services/minespace-web/src/components/dashboard/mine/MineDashboardRoutes.tsx +++ b/services/minespace-web/src/components/dashboard/mine/MineDashboardRoutes.tsx @@ -11,6 +11,7 @@ import Variances from "./variances/Variances"; import Incidents from "./incidents/Incidents"; import NoticesOfDeparture from "@/components/dashboard/mine/noticeOfDeparture/NoticeOfDeparture"; import MineUserAccessPage from "./users/MineUserAccessPage"; +import { MINESPACE_USER_GUIDE } from "@/constants/assets"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faHouse, @@ -24,6 +25,7 @@ import { faHouseWater, faUserMagnifyingGlass, faUsers, + faCircleQuestion, } from "@fortawesome/pro-light-svg-icons"; export const getMineDashboardRoutes = (showApplications, reportsBadgeCount?: number) => @@ -97,6 +99,12 @@ export const getMineDashboardRoutes = (showApplications, reportsBadgeCount?: num icon: , component: Tailings, }, + { + key: "help-guide", + label: "How to use MineSpace", + icon: , + onClick: () => window.open(MINESPACE_USER_GUIDE, "_blank"), + }, { key: "user-access", label: "User Access", diff --git a/services/minespace-web/src/components/layout/Header.tsx b/services/minespace-web/src/components/layout/Header.tsx index 8448af3600..5b9bb3a9b0 100644 --- a/services/minespace-web/src/components/layout/Header.tsx +++ b/services/minespace-web/src/components/layout/Header.tsx @@ -36,7 +36,7 @@ export const Header: FC = ({ xs, lg, xl, xxl, isAuthenticated = fal
{isAuthenticated && !isNewUser && } - {!isNewUser && } + {!isNewUser && }
diff --git a/services/minespace-web/src/constants/assets.js b/services/minespace-web/src/constants/assets.js index 7b6f4627c2..b595e66617 100644 --- a/services/minespace-web/src/constants/assets.js +++ b/services/minespace-web/src/constants/assets.js @@ -11,5 +11,6 @@ export { default as MAP_LOGO } from "../assets/images/maplogo.svg"; export { default as LANDING_BG } from "../assets/images/minespace-landing-bg.jpg"; export { default as USER_GUIDE } from "../assets/downloads/User Guide - Register of Tailings Storage Facilities and Dams.pdf"; +export { default as MINESPACE_USER_GUIDE } from "../assets/downloads/MineSpace_User_Guide_2026.pdf"; export { default as TAILINGS_DOCUMENT } from "../assets/downloads/Register of Tailings Storage Facilities and Dams.xlsm"; export { default as LOADER } from "../assets/images/loader.gif"; diff --git a/services/minespace-web/src/tests/components/dashboard/mine/__snapshots__/MineDashboard.spec.tsx.snap b/services/minespace-web/src/tests/components/dashboard/mine/__snapshots__/MineDashboard.spec.tsx.snap index 37467d827d..7af0796284 100644 --- a/services/minespace-web/src/tests/components/dashboard/mine/__snapshots__/MineDashboard.spec.tsx.snap +++ b/services/minespace-web/src/tests/components/dashboard/mine/__snapshots__/MineDashboard.spec.tsx.snap @@ -329,6 +329,35 @@ exports[`MineDashboard renders properly 1`] = ` Tailings & Dams +
  • +