From 854ff7ea0a1011eefc1fff2b63fc42d36fb17510 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 27 Oct 2020 11:04:24 -0700 Subject: [PATCH] Added visual indicators for jobs missing a close date. RPS-30 --- .../close-date-display.molecule.jsx | 10 +++++++++- .../jobs-list-item/jobs-list-item.molecule.jsx | 11 ++++++++++- src/graphql/jobs.queries.js | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/close-date-display/close-date-display.molecule.jsx b/src/components/molecules/close-date-display/close-date-display.molecule.jsx index a771319..7618087 100644 --- a/src/components/molecules/close-date-display/close-date-display.molecule.jsx +++ b/src/components/molecules/close-date-display/close-date-display.molecule.jsx @@ -1,3 +1,4 @@ +import { WarningOutlined } from "@ant-design/icons"; import { useMutation } from "@apollo/client"; import { DatePicker, message, Spin } from "antd"; import moment from "moment"; @@ -43,7 +44,14 @@ export default function CloseDateDisplayMolecule({ jobId, close_date }) { return (
setEditMode(true)}> - {value && value.isValid() ? value.format(DateFormat) : "No date set"} + {value && value.isValid() ? ( + value.format(DateFormat) + ) : ( +
+ No date set. + +
+ )}
); } diff --git a/src/components/molecules/jobs-list-item/jobs-list-item.molecule.jsx b/src/components/molecules/jobs-list-item/jobs-list-item.molecule.jsx index 8dfdbc9..6af24c8 100644 --- a/src/components/molecules/jobs-list-item/jobs-list-item.molecule.jsx +++ b/src/components/molecules/jobs-list-item/jobs-list-item.molecule.jsx @@ -6,6 +6,7 @@ import { setSelectedJobId } from "../../../redux/application/application.actions import { selectSelectedJobId } from "../../../redux/application/application.selectors"; import TimeAgoFormatter from "../../atoms/time-ago-formatter/time-ago-formatter.atom"; import "./jobs-list-item.styles.scss"; +import { WarningOutlined } from "@ant-design/icons"; const mapStateToProps = createStructuredSelector({ selectedJobId: selectSelectedJobId, @@ -41,7 +42,15 @@ export function JobsListItemMolecule({ justifyContent: "space-between", }} > - {item.clm_no || "No Claim Number"} + + {item.clm_no || "No Claim Number"} + {!item.close_date && ( + + )} + {item.updated_at} diff --git a/src/graphql/jobs.queries.js b/src/graphql/jobs.queries.js index 5175feb..03e7064 100644 --- a/src/graphql/jobs.queries.js +++ b/src/graphql/jobs.queries.js @@ -26,6 +26,7 @@ export const QUERY_ALL_JOBS_PAGINATED = gql` id ins_co_nm clm_no + close_date updated_at } jobs_aggregate {