From fa943846849f9c3577c9d91c1975391133f8c275 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 8 Feb 2021 10:00:46 -0800 Subject: [PATCH] Updated production note display. IO-495 --- .../jobs-detail-header.component.jsx | 15 ++++++++++++--- ...tion-list-columns.productionnote.component.jsx | 14 +++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx index 5a2a7e7a6..32c103813 100644 --- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -1,11 +1,12 @@ import { PrinterFilled } from "@ant-design/icons"; import { Button, Divider, PageHeader, Tag } from "antd"; -import React from "react"; +import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { setModalContext } from "../../redux/modals/modals.actions"; +import { selectBodyshop } from "../../redux/user/user.selectors"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; import JobEmployeeAssignments from "../job-employee-assignments/job-employee-assignments.container"; import JobsChangeStatus from "../jobs-change-status/jobs-change-status.component"; @@ -18,6 +19,7 @@ import "./jobs-detail-header.styles.scss"; const mapStateToProps = createStructuredSelector({ jobRO: selectJobReadOnly, + bodyshop: selectBodyshop, }); const mapDispatchToProps = (dispatch) => ({ @@ -32,9 +34,16 @@ export function JobsDetailHeader({ refetch, loading, form, + bodyshop, }) { const { t } = useTranslation(); + const jobInPostProduction = useMemo(() => { + return bodyshop.md_ro_statuses.post_production_statuses.includes( + job.status + ); + }, [job.status, bodyshop.md_ro_statuses.post_production_statuses]); + const menuExtra = (