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:
11
src/App.tsx
11
src/App.tsx
@ -50,8 +50,6 @@ import EntityView from "qqq/pages/entity-view";
|
|||||||
import ProcessRun from "qqq/pages/process-run";
|
import ProcessRun from "qqq/pages/process-run";
|
||||||
import QClient from "qqq/utils/QClient";
|
import QClient from "qqq/utils/QClient";
|
||||||
import QProcessUtils from "qqq/utils/QProcessUtils";
|
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 //
|
// 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()
|
export default function App()
|
||||||
{
|
{
|
||||||
let logo, icon;
|
|
||||||
const [, setCookie] = useCookies([SESSION_ID_COOKIE_NAME]);
|
const [, setCookie] = useCookies([SESSION_ID_COOKIE_NAME]);
|
||||||
const {
|
const {
|
||||||
user, getAccessTokenSilently, getIdTokenClaims, logout, loginWithRedirect,
|
user, getAccessTokenSilently, getIdTokenClaims, logout, loginWithRedirect,
|
||||||
@ -282,17 +279,19 @@ export default function App()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
const metaData = await QClient.getInstance().loadMetaData();
|
const metaData = await QClient.getInstance().loadMetaData();
|
||||||
|
if (metaData.branding)
|
||||||
|
{
|
||||||
setBranding(metaData.branding);
|
setBranding(metaData.branding);
|
||||||
|
|
||||||
const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
const favicon = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
||||||
|
const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement;
|
||||||
if (favicon)
|
if (favicon)
|
||||||
{
|
{
|
||||||
favicon.href = metaData.branding.icon;
|
favicon.href = metaData.branding.icon;
|
||||||
}
|
}
|
||||||
const appleIcon = document.querySelector("link[rel~='apple-touch-icon']") as HTMLLinkElement;
|
|
||||||
if (appleIcon)
|
if (appleIcon)
|
||||||
{
|
{
|
||||||
appleIcon.href = metaData.branding.icon
|
appleIcon.href = metaData.branding.icon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let profileRoutes = {};
|
let profileRoutes = {};
|
||||||
|
@ -40,43 +40,43 @@ const carrierSpendData = {
|
|||||||
|
|
||||||
rows: [
|
rows: [
|
||||||
{
|
{
|
||||||
product: <ProductCell image={axlehire} name="AxleHire" orders={921} />,
|
product: <ProductCell image={axlehire} name="AxleHire" orders="921" />,
|
||||||
value: <DefaultCell>$140,925</DefaultCell>,
|
value: <DefaultCell>$140,925</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$24,531</DefaultCell>,
|
adsSpent: <DefaultCell>$24,531</DefaultCell>,
|
||||||
refunds: <RefundsCell value={121} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
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>,
|
value: <DefaultCell>$40,600</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$9,430</DefaultCell>,
|
adsSpent: <DefaultCell>$9,430</DefaultCell>,
|
||||||
refunds: <RefundsCell value={54} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
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>,
|
value: <DefaultCell>$90,233</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$18.30</DefaultCell>,
|
adsSpent: <DefaultCell>$18.30</DefaultCell>,
|
||||||
refunds: <RefundsCell value={54} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
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>,
|
value: <DefaultCell>$80,250</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$4,200</DefaultCell>,
|
adsSpent: <DefaultCell>$4,200</DefaultCell>,
|
||||||
refunds: <RefundsCell value={40} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
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>,
|
value: <DefaultCell>$91,300</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$7,364</DefaultCell>,
|
adsSpent: <DefaultCell>$7,364</DefaultCell>,
|
||||||
refunds: <RefundsCell value={5} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
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>,
|
value: <DefaultCell>$77,300</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$4,064</DefaultCell>,
|
adsSpent: <DefaultCell>$4,064</DefaultCell>,
|
||||||
refunds: <RefundsCell value={5} icon={{color: "error", name: "keyboard_arrow_down"}} />,
|
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>,
|
value: <DefaultCell>$130,992</DefaultCell>,
|
||||||
adsSpent: <DefaultCell>$9,500</DefaultCell>,
|
adsSpent: <DefaultCell>$9,500</DefaultCell>,
|
||||||
refunds: <RefundsCell value={13} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
refunds: <RefundsCell value={13} icon={{color: "success", name: "keyboard_arrow_up"}} />,
|
||||||
|
Reference in New Issue
Block a user