Added jobs in production to schedule and error handling. BOD-371

This commit is contained in:
Patrick Fic
2020-08-27 10:26:54 -07:00
parent 5d58b2d9d7
commit 22ce28dddf
10 changed files with 177 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ import { connect } from "react-redux";
import { setModalContext } from "../../redux/modals/modals.actions";
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
import ScheduleModal from "../schedule-job-modal/schedule-job-modal.container";
import ScheduleProductionList from "../schedule-production-list/schedule-production-list.component";
const mapDispatchToProps = (dispatch) => ({
setScheduleContext: (context) =>
@@ -21,26 +22,31 @@ export function ScheduleCalendarComponent({
return (
<div>
<Button
onClick={() => {
refetch();
}}
>
<SyncOutlined />
</Button>
<div className="imex-flex-row">
<Button
className="imex-flex-row__margin"
onClick={() => {
refetch();
}}
>
<SyncOutlined />
</Button>
<Button
onClick={() => {
setScheduleContext({
actions: { refetch: refetch },
context: {
jobId: null,
},
});
}}
>
{t("appointments.actions.new")}
</Button>
<Button
className="imex-flex-row__margin"
onClick={() => {
setScheduleContext({
actions: { refetch: refetch },
context: {
jobId: null,
},
});
}}
>
{t("appointments.actions.new")}
</Button>
<ScheduleProductionList />
</div>
<ScheduleModal />