mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
cleanups, missing branding bug fixed
This commit is contained in:
25
src/App.tsx
25
src/App.tsx
@ -50,8 +50,6 @@ import EntityView from "qqq/pages/entity-view";
|
||||
import ProcessRun from "qqq/pages/process-run";
|
||||
import QClient from "qqq/utils/QClient";
|
||||
import QProcessUtils from "qqq/utils/QProcessUtils";
|
||||
import BlueIcon from "../public/nf-icon-blue.png";
|
||||
import BlueLogo from "../public/nf-logo-blue.png";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// define the parts of the nav that are static - before the qqq tables etc get dynamic added //
|
||||
@ -89,7 +87,6 @@ LicenseInfo.setLicenseKey(process.env.REACT_APP_MATERIAL_UI_LICENSE_KEY);
|
||||
|
||||
export default function App()
|
||||
{
|
||||
let logo, icon;
|
||||
const [, setCookie] = useCookies([SESSION_ID_COOKIE_NAME]);
|
||||
const {
|
||||
user, getAccessTokenSilently, getIdTokenClaims, logout, loginWithRedirect,
|
||||
@ -282,17 +279,19 @@ export default function App()
|
||||
try
|
||||
{
|
||||
const metaData = await QClient.getInstance().loadMetaData();
|
||||
setBranding(metaData.branding);
|
||||
|
||||
const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
||||
if(favicon)
|
||||
if (metaData.branding)
|
||||
{
|
||||
favicon.href = metaData.branding.icon;
|
||||
}
|
||||
const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement;
|
||||
if(appleIcon)
|
||||
{
|
||||
appleIcon.href = metaData.branding.icon
|
||||
setBranding(metaData.branding);
|
||||
const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
||||
const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement;
|
||||
if (favicon)
|
||||
{
|
||||
favicon.href = metaData.branding.icon;
|
||||
}
|
||||
if (appleIcon)
|
||||
{
|
||||
appleIcon.href = metaData.branding.icon;
|
||||
}
|
||||
}
|
||||
|
||||
let profileRoutes = {};
|
||||
|
@ -40,43 +40,43 @@ const carrierSpendData = {
|
||||
|
||||
rows: [
|
||||
{
|
||||
product: <ProductCell image={axlehire} name="AxleHire" orders={921} />,
|
||||
product: <ProductCell image={axlehire} name="AxleHire" orders="921" />,
|
||||
value: <DefaultCell>$140,925</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$24,531</DefaultCell>,
|
||||
refunds: <RefundsCell value={121} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={cdl} name="CDL" orders={2.421} />,
|
||||
product: <ProductCell image={cdl} name="CDL" orders="2,421" />,
|
||||
value: <DefaultCell>$40,600</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$9,430</DefaultCell>,
|
||||
refunds: <RefundsCell value={54} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={dhl} name="DHL" orders={2.421} />,
|
||||
product: <ProductCell image={dhl} name="DHL" orders="1,391" />,
|
||||
value: <DefaultCell>$90,233</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$18.30</DefaultCell>,
|
||||
refunds: <RefundsCell value={54} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={fedex} name="FedEx" orders={12.821} />,
|
||||
product: <ProductCell image={fedex} name="FedEx" orders="12,821" />,
|
||||
value: <DefaultCell>$80,250</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$4,200</DefaultCell>,
|
||||
refunds: <RefundsCell value={40} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={lso} name="LSO" orders={5.921} />,
|
||||
product: <ProductCell image={lso} name="LSO" orders="5,921" />,
|
||||
value: <DefaultCell>$91,300</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$7,364</DefaultCell>,
|
||||
refunds: <RefundsCell value={5} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={ontrac} name="OnTrac" orders={5.921} />,
|
||||
product: <ProductCell image={ontrac} name="OnTrac" orders="5,921" />,
|
||||
value: <DefaultCell>$77,300</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$4,064</DefaultCell>,
|
||||
refunds: <RefundsCell value={5} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
||||
},
|
||||
{
|
||||
product: <ProductCell image={ups} name="UPS" orders={8.232} />,
|
||||
product: <ProductCell image={ups} name="UPS" orders="8,232" />,
|
||||
value: <DefaultCell>$130,992</DefaultCell>,
|
||||
adsSpent: <DefaultCell>$9,500</DefaultCell>,
|
||||
refunds: <RefundsCell value={13} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
||||
|
Reference in New Issue
Block a user