1.3.2 scaffolding, add audit error for no group, add SUVs
This commit is contained in:
@@ -1,31 +1,35 @@
|
||||
import { PrinterFilled } from "@ant-design/icons";
|
||||
import { Alert, Button, Card, Col, DatePicker, Form, Input, Result, Row, Select, Space } from "antd";
|
||||
import { Alert, Button, Card, Col, DatePicker, Form, Input, Result, Row, Select, Space, Typography } from "antd";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { useReactToPrint } from "react-to-print";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ipcTypes from "../../../ipc.types";
|
||||
import { queryReportingData } from "../../../redux/reporting/reporting.actions";
|
||||
import { selectAuditError } from "../../../redux/reporting/reporting.selectors";
|
||||
import { selectAuditError, selectReportingError } from "../../../redux/reporting/reporting.selectors";
|
||||
import dayjs from "../../../util/day";
|
||||
import AuditResultsOrganism from "../../organisms/audit-results/audit-results.organism";
|
||||
import FeatureWrapper from "../../templates/feature-wrapper";
|
||||
import "./audit.page.styles.scss";
|
||||
import { selectBodyshop } from "../../../redux/user/user.selectors";
|
||||
import { Link } from "react-router-dom";
|
||||
import { setSelectedJobId } from "../../../redux/application/application.actions";
|
||||
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
auditError: selectAuditError
|
||||
auditError: selectAuditError,
|
||||
reportingError: selectReportingError
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
queryReportingData: (dates) => dispatch(queryReportingData(dates))
|
||||
queryReportingData: (dates) => dispatch(queryReportingData(dates)),
|
||||
setSelectedJobId: (id) => dispatch(setSelectedJobId(id))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(AuditPage);
|
||||
|
||||
export function AuditPage({ auditError, queryReportingData, bodyshop }) {
|
||||
export function AuditPage({ auditError, queryReportingData, bodyshop, reportingError, setSelectedJobId }) {
|
||||
const [form] = Form.useForm();
|
||||
const [sheets, setSheets] = useState([]);
|
||||
useEffect(() => {
|
||||
@@ -178,6 +182,20 @@ export function AuditPage({ auditError, queryReportingData, bodyshop }) {
|
||||
/>
|
||||
</Col>
|
||||
)}
|
||||
{reportingError && (
|
||||
<div>
|
||||
<Typography.Title level={4}>{reportingError.message}</Typography.Title>
|
||||
<ul>
|
||||
{reportingError.jobs.map((j, idx) => (
|
||||
<li key={idx}>
|
||||
<Link onClick={() => setSelectedJobId(j.id)} to={"/"}>
|
||||
{`${j.clm_no} - ${j.error}`}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<AuditResultsOrganism />
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"BRONCO SPORT",
|
||||
|
||||
"TRAILBLAZER",
|
||||
"BLAZER LT",
|
||||
|
||||
"CHEROKEE",
|
||||
"CHEROKEE CLASSIC",
|
||||
|
||||
Reference in New Issue
Block a user