generated from bcgov/EPIC.scaffold
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from bcgov/feature/ES-184-menu
Feature/ES-184-menu: EPIC.compliance Menu
- Loading branch information
Showing
29 changed files
with
952 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,7 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
.idea | ||
|
||
/coverage | ||
/.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"all": true, | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"check-coverage": true, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"cypress/**/*.*", | ||
"**/*.d.ts", | ||
"**/*.cy.tsx", | ||
"**/*.cy.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
VITE_API_URL= | ||
VITE_KEYCLOAK_URL= | ||
VITE_KEYCLOAK_CLIENT= | ||
VITE_KEYCLOAK_REALM= | ||
VITE_ENV= | ||
VITE_VERSION= | ||
|
||
VITE_APP_TITLE= | ||
VITE_APP_URL= | ||
|
||
VITE_OIDC_AUTHORITY= | ||
VITE_CLIENT_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { DesignServices } from "@mui/icons-material"; | ||
import { Box, Typography } from "@mui/material"; | ||
import { BCPalette } from "epic.theme"; | ||
|
||
export default function ComingSoon() { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
height: "100%", | ||
marginBottom: 16, | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
padding: "1rem", | ||
background: BCPalette.components.background.lightGray, | ||
marginBottom: "2.5rem", | ||
}} | ||
> | ||
<DesignServices | ||
fontSize="large" | ||
sx={{ color: BCPalette.components.border.active }} | ||
/> | ||
</Box> | ||
<Typography variant="h3" marginBottom={"0.5rem"}> | ||
Coming soon! | ||
</Typography> | ||
<Typography variant="h5" fontWeight="400"> | ||
Our team is developing this feature and plans to launch it soon | ||
</Typography> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
compliance-web/src/components/Shared/EnvironmentBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { AppConfig } from "@/utils/config"; | ||
import { ErrorOutline } from "@mui/icons-material"; | ||
import { Box, Typography, useTheme } from "@mui/material"; | ||
|
||
|
||
export default function EnvironmentBanner() { | ||
const env = AppConfig.environment; | ||
const isTestEnvironment = ["dev", "test", "demo", "local"].includes(env); | ||
const theme = useTheme(); | ||
|
||
if (!isTestEnvironment) { | ||
return ( | ||
<Box | ||
height={8} | ||
bgcolor={{backgroundColor: theme.palette.secondary.main}} | ||
></Box> | ||
); | ||
} | ||
|
||
return ( | ||
<Box | ||
sx={{ | ||
backgroundColor: theme.palette.secondary.main, | ||
color: theme.palette.text.secondary, | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
gap: "8px", | ||
height: 40, | ||
}} | ||
textAlign="center" | ||
> | ||
<ErrorOutline /> | ||
<Typography variant="h6" fontWeight={400}>You are using a {env.toUpperCase()} environment</Typography> | ||
</Box> | ||
); | ||
} |
29 changes: 29 additions & 0 deletions
29
compliance-web/src/components/Shared/SideNav/ExpandMenuButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { useMenuStore } from "@/store/menuStore"; | ||
import { ChevronLeft, ChevronRight } from "@mui/icons-material"; | ||
import { Button } from "@mui/material"; | ||
|
||
export default function ExpandMenuButton() { | ||
const { expandMenu, toggleExpandMenu } = useMenuStore(); | ||
|
||
return ( | ||
<Button | ||
sx={{ | ||
height: "3rem", | ||
width: "2rem", | ||
padding: "0.75rem 0.5rem", | ||
minWidth: "auto", | ||
marginLeft: "2px", | ||
marginRight: "14px", | ||
borderRadius: "0px 0.25rem 0.25rem 0", | ||
}} | ||
color="primary" | ||
onClick={toggleExpandMenu} | ||
> | ||
{expandMenu ? ( | ||
<ChevronLeft fontSize={"large"} /> | ||
) : ( | ||
<ChevronRight fontSize={"large"} /> | ||
)} | ||
</Button> | ||
); | ||
} |
41 changes: 41 additions & 0 deletions
41
compliance-web/src/components/Shared/SideNav/MenuItemIconsList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { theme } from "@/styles/theme"; | ||
import { ListItem, Box, List } from "@mui/material"; | ||
import { Fragment } from "react/jsx-runtime"; | ||
import RouteItemsList, { RouteMenuItem } from "./RouteItemsList"; | ||
import { useMenuStore } from "@/store/menuStore"; | ||
|
||
export default function MenuItemIconsList() { | ||
const routeMenuItems: RouteMenuItem[] = RouteItemsList(); | ||
|
||
const { toggleMenu } = useMenuStore(); | ||
|
||
const renderMenuIcons = () => { | ||
return routeMenuItems.map((route) => { | ||
return ( | ||
<Fragment key={route.routeName}> | ||
<ListItem | ||
key={route.routeName} | ||
onClick={() => toggleMenu(route.routeName)} | ||
disablePadding | ||
sx={{ cursor: "pointer" }} | ||
> | ||
<Box | ||
sx={{ | ||
color: theme.palette.common.white, | ||
width: "100%", | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
padding: "1rem", | ||
}} | ||
> | ||
{route.icon ?? route.icon} | ||
</Box> | ||
</ListItem> | ||
</Fragment> | ||
); | ||
}); | ||
}; | ||
|
||
return <List>{renderMenuIcons()}</List>; | ||
} |
Oops, something went wrong.