update the readme and created a new whitelabel for MiPCA that will be used to replace the omniAir one
This commit is contained in:
parent
fa1130f777
commit
abd829a0f3
16 changed files with 169 additions and 10 deletions
BIN
src/assets/whitelabels/MiPCA/MiPCALogo.png
Normal file
BIN
src/assets/whitelabels/MiPCA/MiPCALogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -13,7 +13,7 @@ import BinsIcon from "products/Bindapt/BinsIcon";
|
|||
import { useGlobalState } from "providers";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import { IsAdaptiveAgriculture, isBXT, IsMiVent, IsAdCon, IsOmniAir } from "services/whiteLabel";
|
||||
import { IsAdaptiveAgriculture, isBXT, IsMiVent, IsAdCon, IsOmniAir, IsMiPCA } from "services/whiteLabel";
|
||||
import FieldsIcon from "products/AgIcons/FieldsIcon";
|
||||
import NexusSTIcon from "products/Construction/NexusSTIcon";
|
||||
import OmniAirDeviceIcon from "products/AviationIcons/OmniAirDeviceIcon";
|
||||
|
|
@ -40,6 +40,7 @@ export default function BottomNavigator(props: Props) {
|
|||
const isMiVent = IsMiVent();
|
||||
const isAdCon = IsAdCon();
|
||||
const isOmni = IsOmniAir();
|
||||
const isMiPCA = IsMiPCA();
|
||||
|
||||
const reRoute = useCallback(
|
||||
(path: string) => {
|
||||
|
|
@ -117,14 +118,14 @@ export default function BottomNavigator(props: Props) {
|
|||
value="constructionMap"
|
||||
/>
|
||||
)}
|
||||
{isOmni && (
|
||||
{(isOmni || isMiPCA) && (
|
||||
<BottomNavigationAction
|
||||
label="Map"
|
||||
icon={<AirportMapIcon type={getType()} />}
|
||||
value="aviationMap"
|
||||
/>
|
||||
)}
|
||||
{isOmni && (
|
||||
{(isOmni || isMiPCA) && (
|
||||
<BottomNavigationAction
|
||||
label="Terminals"
|
||||
icon={<PlaneIcon type={getType()} />}
|
||||
|
|
@ -139,7 +140,7 @@ export default function BottomNavigator(props: Props) {
|
|||
<BindaptIcon type={getType()} />
|
||||
) : isAdCon ? (
|
||||
<NexusSTIcon type={getType()} />
|
||||
) : isOmni ? (
|
||||
) : (isOmni || isMiPCA) ? (
|
||||
<OmniAirDeviceIcon type={getType()} />
|
||||
) : (
|
||||
<DevicesIcon />
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import {
|
|||
IsAdaptiveAgriculture,
|
||||
// hasTutorialPlaylist,
|
||||
IsAdCon,
|
||||
IsMiPCA,
|
||||
// isBXT,
|
||||
IsMiVent,
|
||||
IsOmniAir,
|
||||
|
|
@ -166,7 +167,8 @@ export default function SideNavigator(props: Props) {
|
|||
const isMiVent = IsMiVent();
|
||||
const isAg = IsAdaptiveAgriculture()
|
||||
const isStreamline = IsStreamline()
|
||||
const isMiPCA = IsOmniAir()
|
||||
const isOmni = IsOmniAir()
|
||||
const isMiPCA = IsMiPCA()
|
||||
const isAdCon = IsAdCon()
|
||||
return (
|
||||
<List className={classes.list} component="nav">
|
||||
|
|
@ -184,7 +186,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{(isMiPCA || user.hasFeature("admin")) && (
|
||||
{((isOmni || isMiPCA) || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Aviation Map" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-aviation-map"
|
||||
|
|
@ -240,7 +242,7 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{(isMiPCA || user.hasFeature("admin")) && (
|
||||
{((isOmni || isMiPCA) || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Terminals" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-terminals"
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ export default function Gate(props: Props) {
|
|||
const deviceDrawer = () => {
|
||||
return (
|
||||
<DeviceLinkDrawer
|
||||
deviceTags={["omniair"]}
|
||||
deviceTags={["omniair", "mipca"]}
|
||||
devicePrefMap={devPrefs}
|
||||
prefOptions={[
|
||||
<MenuItem
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import AeroGrowDarkLogo from "../assets/whitelabels/AeroGrow/darkLogo.png";
|
|||
import AeroGrowLightLogo from "../assets/whitelabels/AeroGrow/lightLogo.png";
|
||||
import MiVentLightLogo from "../assets/whitelabels/MiVent/lightLogo.png";
|
||||
// import OmniAirLogo from "../assets/whitelabels/OmniAir/OmniAirLogo.png";
|
||||
import MiPCALogo from "../assets/whitelabels/OmniAir/MiPCALogo.png";
|
||||
import MiPCALogo from "../assets/whitelabels/MiPCA/MiPCALogo.png";
|
||||
import StreamlineLogo from "../assets/whitelabels/Streamline/stream-logo.png"
|
||||
// import { green, yellow } from "@mui/material/colors";
|
||||
|
||||
|
|
@ -284,6 +284,32 @@ export function IsOmniAir(): boolean {
|
|||
);
|
||||
}
|
||||
|
||||
const MIPCA_WHITE_LABEL: WhiteLabel = {
|
||||
name: "MiPCA",
|
||||
primaryColour: "#004f9b",
|
||||
secondaryColour: "yellow",
|
||||
signatureColour: "#272727",
|
||||
signatureAccentColour: "#fff",
|
||||
//omni air and MiPCA are the same client ID in Auth0, it is to replace it, once omniair gets removed we can re-name this
|
||||
auth0ClientId: import.meta.env.VITE_AUTH0_OMNIAIR_CLIENT_ID,
|
||||
redirectOnLogout: true,
|
||||
logoutRedirectTarget: "https://mionetech.com",
|
||||
darkLogo: MiPCALogo,
|
||||
lightLogo: MiPCALogo,
|
||||
transparentLogoBG: true,
|
||||
blacklist: ["cost"],
|
||||
docs: "MiPCA",
|
||||
protips: protips.concat([])
|
||||
};
|
||||
|
||||
export function IsMiPCA(): boolean {
|
||||
return (
|
||||
getName() === "MiPCA" ||
|
||||
window.location.origin.includes("staging") ||
|
||||
window.location.origin.includes("localhost")
|
||||
);
|
||||
}
|
||||
|
||||
const whitelabels = new Map<string, WhiteLabel>([
|
||||
["streamline", STREAMLINE_WHITE_LABEL],
|
||||
["adaptiveag", ADAPTIVE_AGRICULTURE_WHITE_LABEL],
|
||||
|
|
@ -296,7 +322,8 @@ const whitelabels = new Map<string, WhiteLabel>([
|
|||
["10.0", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
|
||||
["mivent", MIVENT_WHITE_LABEL],
|
||||
["adaptiveconstruction", ADAPTIVE_CONSTRUCTION_WHITE_LABEL],
|
||||
["omniair", OMNIAIR_WHITE_LABEL]
|
||||
["omniair", OMNIAIR_WHITE_LABEL],
|
||||
["mipca", MIPCA_WHITE_LABEL]
|
||||
]);
|
||||
|
||||
export function getWhitelabel(): WhiteLabel {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue