Added visual indicators for jobs missing a close date. RPS-30

This commit is contained in:
Patrick Fic
2020-10-27 11:04:24 -07:00
parent 7218dcd3ff
commit 854ff7ea0a
3 changed files with 20 additions and 2 deletions

View File

@@ -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 (
<div style={{ cursor: "pointer" }} onClick={() => setEditMode(true)}>
{value && value.isValid() ? value.format(DateFormat) : "No date set"}
{value && value.isValid() ? (
value.format(DateFormat)
) : (
<div>
<span>No date set.</span>
<WarningOutlined style={{ marginLeft: ".5rem", color: "orange" }} />
</div>
)}
</div>
);
}