diff --git a/package.json b/package.json index 29d45f7..6d5be94 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@auth0/auth0-react": "1.10.2", "@emotion/react": "11.7.1", "@emotion/styled": "11.6.0", - "@kingsrook/qqq-frontend-core": "1.0.48", + "@kingsrook/qqq-frontend-core": "1.0.49", "@mui/icons-material": "5.4.1", "@mui/material": "5.11.1", "@mui/styles": "5.11.1", diff --git a/public/index.html b/public/index.html index 79fcc24..66fb271 100644 --- a/public/index.html +++ b/public/index.html @@ -21,15 +21,9 @@ Coded by www.creative-tim.com - Nutrifresh One - - + QQQ Material Dashboard + + diff --git a/public/manifest.json b/public/manifest.json index b73bd4e..6c08e68 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "Material Dashboard", - "name": "Material Dashboard 2 PRO React TS", + "short_name": "QQQ Material Dashboard", + "name": "QQQ Material Dashboard", "icons": [ { "src": "favicon.png", diff --git a/src/App.tsx b/src/App.tsx index e4ff133..1167121 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -532,7 +532,7 @@ export default function App() color={sidenavColor} icon={branding.icon} logo={branding.logo} - companyName={branding.companyName} + appName={branding.appName} routes={sideNavRoutes} onMouseEnter={handleOnMouseEnter} onMouseLeave={handleOnMouseLeave} diff --git a/src/qqq/components/horseshoe/Footer.tsx b/src/qqq/components/horseshoe/Footer.tsx index 4f4dc5a..3345809 100644 --- a/src/qqq/components/horseshoe/Footer.tsx +++ b/src/qqq/components/horseshoe/Footer.tsx @@ -40,6 +40,11 @@ interface Props [key: string]: any; } +Footer.defaultProps = { + company: {href: "", name: ""}, + links: [], +}; + function Footer({company, links}: Props): JSX.Element { const {href, name} = company; @@ -67,27 +72,30 @@ function Footer({company, links}: Props): JSX.Element position: "fixed", bottom: "0px", zIndex: -1, marginBottom: "10px", }} > - - © - {" "} - {new Date().getFullYear()} - , - - -   - {name} -   - - - + { + href && name && + + © + {" "} + {new Date().getFullYear()} + , + + +   + {name} +   + + + + } ({ @@ -111,10 +119,4 @@ function Footer({company, links}: Props): JSX.Element ); } -// Declaring default props for Footer -Footer.defaultProps = { - company: {href: "https://www.nutrifreshservices.com/", name: "Nutrifresh Services"}, - links: [], -}; - export default Footer; diff --git a/src/qqq/components/horseshoe/sidenav/SideNav.tsx b/src/qqq/components/horseshoe/sidenav/SideNav.tsx index 89a5f09..30d2251 100644 --- a/src/qqq/components/horseshoe/sidenav/SideNav.tsx +++ b/src/qqq/components/horseshoe/sidenav/SideNav.tsx @@ -41,7 +41,7 @@ interface Props color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "dark"; icon?: string; logo?: string; - companyName?: string; + appName?: string; routes: { [key: string]: | ReactNode @@ -64,7 +64,7 @@ interface Props [key: string]: any; } -function Sidenav({color, icon, logo, companyName, routes, ...rest}: Props): JSX.Element +function Sidenav({color, icon, logo, appName, routes, ...rest}: Props): JSX.Element { const [openCollapse, setOpenCollapse] = useState(false); const [openNestedCollapse, setOpenNestedCollapse] = useState(false); @@ -319,11 +319,11 @@ function Sidenav({color, icon, logo, companyName, routes, ...rest}: Props): JSX. - {!miniSidenav && logo && } - {miniSidenav && icon && } - {!miniSidenav && companyName && sidenavLogoLabel(theme, {miniSidenav})}> + {!miniSidenav && logo && } + {miniSidenav && icon && } + {!miniSidenav && !logo && appName && sidenavLogoLabel(theme, {miniSidenav})}> - {companyName} + {appName} } @@ -352,7 +352,7 @@ Sidenav.defaultProps = { color: "info", icon: "", logo: "", - companyName: "", + appName: "", }; export default Sidenav; diff --git a/src/qqq/layouts/BaseLayout.tsx b/src/qqq/layouts/BaseLayout.tsx index a7f7d03..2911728 100644 --- a/src/qqq/layouts/BaseLayout.tsx +++ b/src/qqq/layouts/BaseLayout.tsx @@ -19,11 +19,13 @@ * along with this program. If not, see . */ +import {QInstance} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QInstance"; import Box from "@mui/material/Box"; import {ReactNode, useEffect, useState} from "react"; import Footer from "qqq/components/horseshoe/Footer"; import NavBar from "qqq/components/horseshoe/NavBar"; import DashboardLayout from "qqq/layouts/DashboardLayout"; +import Client from "qqq/utils/qqq/Client"; interface Props { @@ -45,6 +47,16 @@ export const breakpoints = { function BaseLayout({stickyNavbar, children}: Props): JSX.Element { const [tabsOrientation, setTabsOrientation] = useState<"horizontal" | "vertical">("horizontal"); + const [metaData, setMetaData] = useState(null as QInstance); + + useEffect(() => + { + (async () => + { + const metaData = await Client.getInstance().loadMetaData(); + setMetaData(metaData); + })(); + }, []); useEffect(() => { @@ -72,7 +84,7 @@ function BaseLayout({stickyNavbar, children}: Props): JSX.Element {children} -