Added visual indicators for jobs missing a close date. RPS-30
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
}}
|
||||
>
|
||||
<strong>{item.clm_no || "No Claim Number"}</strong>
|
||||
<strong>
|
||||
{item.clm_no || "No Claim Number"}
|
||||
{!item.close_date && (
|
||||
<WarningOutlined
|
||||
title="No close date has been set for this job."
|
||||
style={{ marginLeft: ".5rem", color: "orange" }}
|
||||
/>
|
||||
)}
|
||||
</strong>
|
||||
<span style={{ fontStyle: "italic" }}>
|
||||
<TimeAgoFormatter>{item.updated_at}</TimeAgoFormatter>
|
||||
</span>
|
||||
|
||||
@@ -26,6 +26,7 @@ export const QUERY_ALL_JOBS_PAGINATED = gql`
|
||||
id
|
||||
ins_co_nm
|
||||
clm_no
|
||||
close_date
|
||||
updated_at
|
||||
}
|
||||
jobs_aggregate {
|
||||
|
||||
Reference in New Issue
Block a user