IO-1605 Refactor smart scheduling.

This commit is contained in:
Patrick Fic
2021-12-29 17:50:17 -06:00
parent e0d74aecb3
commit 454f69b511
13 changed files with 361 additions and 116 deletions

View File

@@ -10,13 +10,17 @@ import Event from "../job-at-change/schedule-event.container";
import HeaderComponent from "./schedule-calendar-header.component";
import "./schedule-calendar.styles.scss";
import JobDetailCards from "../job-detail-cards/job-detail-cards.component";
import { selectProblemJobs } from "../../redux/application/application.selectors";
import { Alert } from "antd";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
problemJobs: selectProblemJobs,
});
const localizer = momentLocalizer(moment);
export function ScheduleCalendarWrapperComponent({
bodyshop,
problemJobs,
data,
refetch,
defaultView,
@@ -48,6 +52,15 @@ export function ScheduleCalendarWrapperComponent({
return (
<>
<JobDetailCards />
{problemJobs &&
problemJobs.map((problem) => (
<Alert
key={problem.id}
type="error"
message={`${problem.ro_number} has a data consistency issue. It has been exlcuded for scheduling purposes. CODE: ${problem.code}`}
/>
))}
<Calendar
events={data}
defaultView={search.view || defaultView || "week"}