From b3aeee4f45ba03c18cddb460ac33da90991a24cd Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 14 Feb 2022 10:33:21 -0800 Subject: [PATCH] IO-1667 Add print center to production detail drawer. --- .../production-list-detail.component.jsx | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/client/src/components/production-list-detail/production-list-detail.component.jsx b/client/src/components/production-list-detail/production-list-detail.component.jsx index 1ea6c49d0..9494d5fb2 100644 --- a/client/src/components/production-list-detail/production-list-detail.component.jsx +++ b/client/src/components/production-list-detail/production-list-detail.component.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import { Descriptions, Drawer, Space } from "antd"; +import { Descriptions, Drawer, Space, PageHeader, Button } from "antd"; import queryString from "query-string"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -16,8 +16,25 @@ import JobEmployeeAssignments from "../job-employee-assignments/job-employee-ass import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; import ProductionRemoveButton from "../production-remove-button/production-remove-button.component"; import JobAtChange from "../job-at-change/job-at-change.component"; +import { PrinterFilled } from "@ant-design/icons"; -export default function ProductionListDetail({ jobs }) { +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { setModalContext } from "../../redux/modals/modals.actions"; + +const mapStateToProps = createStructuredSelector({ + //currentUser: selectCurrentUser +}); +const mapDispatchToProps = (dispatch) => ({ + setPrintCenterContext: (context) => + dispatch(setModalContext({ context: context, modal: "printCenter" })), +}); +export default connect( + mapStateToProps, + mapDispatchToProps +)(ProductionListDetail); + +export function ProductionListDetail({ jobs, setPrintCenterContext }) { const search = queryString.parse(useLocation().search); const history = useHistory(); const { selected } = search; @@ -39,11 +56,29 @@ export default function ProductionListDetail({ jobs }) { return ( - {t("production.labels.jobdetail")} - {theJob.ro_number} - - + + {" "} + + + } + /> } placement="right" width={"33%"}