From ce1a5007e1e91692dc669fa90ae6992df62e8676 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 22 Jan 2020 16:05:18 -0800 Subject: [PATCH] Added new note to the job details screen. --- .../jobs-notes/jobs.notes.component.jsx | 30 ++++++++++++++++++- .../jobs-detail.page.container.jsx | 3 +- .../pages/jobs-detail/jobs-detail.page.jsx | 8 ++--- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/client/src/components/jobs-notes/jobs.notes.component.jsx b/client/src/components/jobs-notes/jobs.notes.component.jsx index 0616fe196..0a1071a2f 100644 --- a/client/src/components/jobs-notes/jobs.notes.component.jsx +++ b/client/src/components/jobs-notes/jobs.notes.component.jsx @@ -15,17 +15,36 @@ export default function JobNotesComponent({ const [noteModalVisible, setNoteModalVisible] = useState(false); const [existingNote, setExistingNote] = useState(null); const columns = [ + { + title: "", + dataIndex: "icons", + key: "icons", + width: 80, + render: (text, record) => ( + + {" "} + {record.critical ? ( + + ) : null} + {record.private ? ( + + ) : null} + + ) + }, { title: t("notes.fields.text"), dataIndex: "text", key: "text", ellipsis: true }, + { title: t("notes.fields.updatedat"), dataIndex: "updated_at", key: "updated_at", defaultSortOrder: "descend", + width: 200, sorter: (a, b) => new Date(a.updated_at) - new Date(b.updated_at), render: (text, record) => ( @@ -36,12 +55,14 @@ export default function JobNotesComponent({ { title: t("notes.fields.createdby"), dataIndex: "created_by", - key: "created_by" + key: "created_by", + width: 200 }, { title: t("notes.actions.actions"), dataIndex: "actions", key: "actions", + width: 150, render: (text, record) => ( ; if (error) return ; + return ( @@ -18,7 +18,7 @@ function JobsDetailPage({ jobId, hash, data, match, history }) { { history.push(p); }}>