Revert accidentally commited dashboard changes.

This commit is contained in:
Patrick Fic
2025-09-16 12:44:40 -07:00
parent d4335178ec
commit 8ef36504c5
6 changed files with 6 additions and 83 deletions

View File

@@ -2,7 +2,6 @@ import {
AuditOutlined,
BarChartOutlined,
CloseOutlined,
DashboardFilled,
FileAddFilled,
LogoutOutlined,
MoonOutlined,
@@ -49,11 +48,6 @@ export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
}}
mode="inline"
items={[
{
key: "/dashboard",
icon: <DashboardFilled />,
label: <Link to="/dashboard">Dashboard</Link>
},
{
key: "/",
icon: <PieChartOutlined />,

View File

@@ -1,61 +0,0 @@
import { Card, Typography } from "antd";
import React from "react";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { setSelectedJobId } from "../../../redux/application/application.actions";
import { selectDates, selectReportingError } from "../../../redux/reporting/reporting.selectors";
import ReportingTitleAtom from "../../atoms/reporting-title/reporting-title.atom";
import ReportingDatesMolecule from "../../molecules/reporting-dates/reporting-dates.molecule";
import ReportingJobsListMolecule from "../../molecules/reporting-jobs-list/reporting-jobs-list.molecule";
import ReportingScatterChartMolecule from "../../molecules/reporting-scatterchart/reporting-scatterchart.molecule";
import ReportingTotalsStatsMolecule from "../../molecules/reporting-totals-stats/reporting-totals-stats.molecule";
import "./dashboard.page.styles.scss";
const mapStateToProps = createStructuredSelector({
dates: selectDates,
error: selectReportingError
});
const mapDispatchToProps = (dispatch) => ({
setSelectedJobId: (id) => dispatch(setSelectedJobId(id))
});
export function DashboardPage({ dates, error, setSelectedJobId }) {
return (
<div className="reporting-container">
<Card>
<ReportingDatesMolecule />
</Card>
{error && (
<div>
<Typography.Title level={4}>{error.message}</Typography.Title>
<ul>
{error.jobs.map((j, idx) => (
<li key={idx}>
<Link onClick={() => setSelectedJobId(j.id)} to={"/"}>
{`${j.clm_no} - ${j.error}`}
</Link>
</li>
))}
</ul>
</div>
)}
{!error && dates && dates.startDate && dates.endDate && (
<div className="reporting-cards">
<Card>
<ReportingTitleAtom />
<ReportingTotalsStatsMolecule />
</Card>
<Card>
<ReportingJobsListMolecule />
</Card>
<Card>
<ReportingScatterChartMolecule />
</Card>
</div>
)}
</div>
);
}
export default connect(mapStateToProps, mapDispatchToProps)(DashboardPage);

View File

@@ -1,8 +0,0 @@
.reporting-container {
height: 100%;
overflow-y: auto;
//background-color: rgb(244, 244, 244);
& > .reporting-cards > * {
padding: 1rem;
}
}

View File

@@ -1,6 +1,8 @@
import { Layout } from "antd";
import React from "react";
import { connect } from "react-redux";
import { Route, Routes } from "react-router-dom";
import { Routes } from "react-router-dom";
import { Route } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectBodyshop, selectDarkMode } from "../../../redux/user/user.selectors";
import ErrorResultAtom from "../../atoms/error-result/error-result.atom";
@@ -8,13 +10,12 @@ import ReleaseNotes from "../../molecules/release-notes/release-notes.molecule";
import NotificationModalOrganism from "../../organisms/notification-modal/notification-modal.organism";
import SiderMenuOrganism from "../../organisms/sider-menu/sider-menu.organism";
import UpdateManagerOrganism from "../../organisms/update-manager/update-manager.organism";
import AdminPage from "../admin/admin.page";
import AuditPage from "../audit/audit.page";
import DashboardPage from "../dashboard/dashboard.page";
import JobsPage from "../jobs/jobs.page";
import ReportingPage from "../reporting/reporting.page";
import ScanPage from "../scan/scan.page";
import SettingsPage from "../settings/settings.page";
import AuditPage from "../audit/audit.page";
import AdminPage from "../admin/admin.page";
const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, darkMode: selectDarkMode });
const mapDispatchToProps = (dispatch) => ({});
@@ -38,7 +39,6 @@ export function RoutesPage({ bodyshop, darkMode }) {
<NotificationModalOrganism />
<Routes>
<Route exact path="/settings" element={<SettingsPage />} />
<Route exact path="/dashboard" element={<DashboardPage />} />
<Route exact path="/reporting" element={<ReportingPage />} />
<Route exact path="/audit" element={<AuditPage />} />
<Route exact path="/scan" element={<ScanPage />} />

View File

@@ -2,7 +2,6 @@ import ReportingActionTypes from "./reporting.types";
const INITIAL_STATE = {
dates: { startDate: null, endDate: null },
data: [],
dashboardData: [],
scoreCard: null,
error: null,
loading: false,

View File

@@ -11,7 +11,6 @@ const ReportingActionTypes = {
ADD_EXCLUDED_ID: "ADD_EXCLUDED_ID",
REMOVE_EXCLUDED_ID: "REMOVE_EXCLUDED_ID",
CLEAR_EXCLUDED_IDS: "CLEAR_EXCLUDED_IDS",
SET_CACHED_JOBS: "SET_CACHED_JOBS",
SET_DASHBOARD_DATA: "SET_DASHBOARD_DATA"
SET_CACHED_JOBS: "SET_CACHED_JOBS"
};
export default ReportingActionTypes;