/*
* QQQ - Low-code Application Framework for Engineers.
* Copyright (C) 2021-2022. Kingsrook, LLC
* 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
* contact@kingsrook.com
* https://github.com/Kingsrook/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
import Card from "@mui/material/Card";
import Grid from "@mui/material/Grid";
import Icon from "@mui/material/Icon";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import Tooltip from "@mui/material/Tooltip";
import {useState} from "react";
import DefaultLineChart from "examples/Charts/LineCharts/DefaultLineChart";
import DashboardLayout from "examples/LayoutContainers/DashboardLayout";
import DataTable from "examples/Tables/DataTable";
import Footer from "qqq/components/Footer";
import Navbar from "qqq/components/Navbar";
import MDBadgeDot from "qqq/components/Temporary/MDBadgeDot";
import MDBox from "qqq/components/Temporary/MDBox";
import MDButton from "qqq/components/Temporary/MDButton";
import MDTypography from "qqq/components/Temporary/MDTypography";
import ShipmentsByWarehouseTable from "qqq/pages/dashboards/Tables/ShipmentsByWarehouseTable";
import carrierSpendData from "qqq/pages/dashboards/Widgets/Data/CarrierSpendData";
import carrierVolumeLineChartData from "qqq/pages/dashboards/Widgets/Data/CarrierVolumeLineChartData";
import smallShipmentsByWarehouseData from "qqq/pages/dashboards/Widgets/Data/SmallShipmentsByWarehouseData";
import timeInTransitBarChartData from "qqq/pages/dashboards/Widgets/Data/timeInTransitBarChartData";
import ShipmentsByCarrierPieChart from "qqq/pages/dashboards/Widgets/ShipmentsByChannelPieChart";
import SimpleStatisticsCard from "qqq/pages/dashboards/Widgets/SimpleStatisticsCard";
import HorizontalBarChart from "./Widgets/HorizontalBarChart";
function CarrierPerformance(): JSX.Element
{
const [salesDropdownValue, setSalesDropdownValue] = useState("Last 30 Days");
const [customersDropdownValue, setCustomersDropdownValue] = useState("Last 30 Days");
const [revenueDropdownValue, setRevenueDropdownValue] = useState("Last 30 Days");
const [salesDropdown, setSalesDropdown] = useState(null);
const [customersDropdown, setCustomersDropdown] = useState(null);
const [revenueDropdown, setRevenueDropdown] = useState(null);
const openSalesDropdown = ({currentTarget}: any) => setSalesDropdown(currentTarget);
const closeSalesDropdown = ({currentTarget}: any) =>
{
setSalesDropdown(null);
setSalesDropdownValue(currentTarget.innerText || salesDropdownValue);
};
const openCustomersDropdown = ({currentTarget}: any) => setCustomersDropdown(currentTarget);
const closeCustomersDropdown = ({currentTarget}: any) =>
{
setCustomersDropdown(null);
setCustomersDropdownValue(currentTarget.innerText || salesDropdownValue);
};
const openRevenueDropdown = ({currentTarget}: any) => setRevenueDropdown(currentTarget);
const closeRevenueDropdown = ({currentTarget}: any) =>
{
setRevenueDropdown(null);
setRevenueDropdownValue(currentTarget.innerText || salesDropdownValue);
};
// Dropdown menu template for the DefaultStatisticsCard
const renderMenu = (state: any, close: any) => (
);
return (
}
chart={carrierVolumeLineChartData}
/>
Spend by Carrier YTD
);
}
export default CarrierPerformance;