WIP Read Only for Jobs BOD-409

This commit is contained in:
Patrick Fic
2020-09-28 14:00:35 -07:00
parent a7051c0f86
commit 3ee003000d
22 changed files with 278 additions and 129 deletions

View File

@@ -5,7 +5,7 @@ import { useMutation } from "react-apollo";
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
import { useTranslation } from "react-i18next";
export default function JobLineNotePopup({ jobline }) {
export default function JobLineNotePopup({ jobline, disabled }) {
const [editing, setEditing] = useState(false);
const [loading, setLoading] = useState(false);
const [note, setNote] = useState(jobline.note);
@@ -57,7 +57,7 @@ export default function JobLineNotePopup({ jobline }) {
return (
<div
style={{ width: "100%", minHeight: "2rem", cursor: "pointer" }}
onClick={() => setEditing(true)}
onClick={() => !disabled && setEditing(true)}
>
{jobline.notes}
</div>