diff --git a/src/assets/images/ReportsIcon.js b/src/assets/images/ReportsIcon.js new file mode 100644 index 0000000..ad607b4 --- /dev/null +++ b/src/assets/images/ReportsIcon.js @@ -0,0 +1,31 @@ +import PropTypes from 'prop-types'; +const ReportsIcon = ({ width = 96, height = 96, color = '#007aff', ...props }) => ( + + + + + +); +export default ReportsIcon; + +ReportsIcon.propTypes = { + width: PropTypes.string, + height: PropTypes.string, + color: PropTypes.string +}; diff --git a/src/assets/images/ScanIcon.js b/src/assets/images/ScanIcon.js new file mode 100644 index 0000000..5193b97 --- /dev/null +++ b/src/assets/images/ScanIcon.js @@ -0,0 +1,45 @@ +import PropTypes from 'prop-types'; + +const ScanIcon = ({ width = '96', height = '96', color = '#007AFF', ...props }) => ( + + + + + +); + +export default ScanIcon; + +ScanIcon.propTypes = { + width: PropTypes.string, + height: PropTypes.string, + color: PropTypes.string +}; diff --git a/src/assets/images/SearchInventoryIcon.js b/src/assets/images/SearchInventoryIcon.js new file mode 100644 index 0000000..8db5cb0 --- /dev/null +++ b/src/assets/images/SearchInventoryIcon.js @@ -0,0 +1,51 @@ +import PropTypes from 'prop-types'; + +const SearchInventoryIcon = ({ width = '78', height = '86', color = '#007AFF', ...props }) => ( + + + + + + +); + +export default SearchInventoryIcon; + +SearchInventoryIcon.propTypes = { + width: PropTypes.string, + height: PropTypes.string, + color: PropTypes.string +}; diff --git a/src/assets/images/SetupIcon.js b/src/assets/images/SetupIcon.js index b3cfed6..2db6f87 100644 --- a/src/assets/images/SetupIcon.js +++ b/src/assets/images/SetupIcon.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -const SetupIcon = ({ width = 25, height = 24, color = '#292D32', ...props }) => ( +const SetupIcon = ({ width = 96, height = 96, color = '#007aff', ...props }) => ( ( <> - + { + const grid = myContainer.current; + const gridChild = grid.childElementCount; + gridColumns = Math.floor(Math.sqrt(gridChild)); + grid.style.gridTemplateColumns = `repeat(${gridColumns}, minmax(250px, auto))`; + }); + return ( + + {tiles && + tiles.map((tile) => ( + + {' '} + {tile.icon} + + ))} + + ); +} + +TileGrid.propTypes = { + // tiles: PropTypes.object({ + // name: PropTypes.string.isRequired, + // path: PropTypes.string.isRequired, + // icon: PropTypes.any + // }) + tiles: PropTypes.any +}; diff --git a/src/components/TileComponent/TileGrid.js b/src/components/TileComponent/TileGrid.js index a1265e7..81d3b9d 100644 --- a/src/components/TileComponent/TileGrid.js +++ b/src/components/TileComponent/TileGrid.js @@ -35,7 +35,7 @@ export default function TileGrid({ tiles }) { {tiles && tiles.map((tile) => ( - + {' '} {tile.icon} @@ -45,10 +45,5 @@ export default function TileGrid({ tiles }) { } TileGrid.propTypes = { - // tiles: PropTypes.object({ - // name: PropTypes.string.isRequired, - // path: PropTypes.string.isRequired, - // icon: PropTypes.any - // }) - tiles: PropTypes.any + tiles: PropTypes.array }; diff --git a/src/pages/homepage/index.js b/src/pages/homepage/index.js new file mode 100644 index 0000000..d1e99ea --- /dev/null +++ b/src/pages/homepage/index.js @@ -0,0 +1,58 @@ +import MDBox from 'components/MDBox'; +import DashboardNavbar from 'components/DashboardNavbar'; +import Footer from 'components/Footer'; +import DashboardLayout from 'layouts/DashboardLayout'; +import SetupIcon from 'assets/images/SetupIcon'; +import SearchInventoryIcon from 'assets/images/SearchInventoryIcon'; +import ReportsIcon from 'assets/images/ReportsIcon'; +import ScanIcon from 'assets/images/ScanIcon'; +import TileBasic from 'components/TileBasic'; +import { makeStyles } from '@mui/styles'; + +const useStyles = makeStyles({ + iconSize: { + width: '50%', + height: '50%', + marginBottom: '10px' + }, + margin: { + marginBottom: '20px' + } +}); + +function HomepageScreen() { + const classes = useStyles(); + const data = [ + { + name: 'Search Inventory', + path: '/', + icon: + }, + { + name: 'Scan', + path: '/', + icon: + }, + { + name: 'Setup', + path: '/', + icon: + }, + { + name: 'Reports', + path: '/', + icon: + } + ]; + + return ( + + + + + +
+
+ ); +} +export default HomepageScreen; diff --git a/src/routes/index.js b/src/routes/index.js index 3f81202..b878c21 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -46,6 +46,7 @@ import LoginScreen from 'pages/authentication'; import Icon from '@mui/material/Icon'; import InventoryScreen from 'pages/inventory'; import WarehouseScreen from 'pages/warehouse'; +import HomepageScreen from 'pages/homepage'; import LabelingScreen from 'pages/labeling'; import UserAccessScreen from 'pages/useraccess'; import NewWarehouseDetails from 'pages/newWarehouseDetails'; @@ -85,6 +86,20 @@ const protectedRoutes = [ name: 'Home', key: 'Home', icon: dashboard, + collapse: [ + { + name: 'Home', + key: 'home', + route: '/home', + component: + } + ] + }, + { + type: 'collapse', + name: 'Test', + key: 'Test', + icon: dashboard, collapse: [ { name: 'Dashboard',