IO-723 Audit notes

This commit is contained in:
Patrick Fic
2021-03-08 14:38:50 -08:00
parent 5b281094b4
commit 30e0f106d7
17 changed files with 30233 additions and 894 deletions

View File

@@ -158,6 +158,7 @@ export function ContractConvertToRo({
text: t("contracts.labels.noteconvertedfrom", {
agreementnumber: contract.agreementnumber,
}),
audit: true,
created_by: currentUser.email,
},
],

View File

@@ -122,6 +122,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
notes: {
data: {
created_by: currentUser.email,
audit: true,
text: t("jobs.labels.importnote", {
date: moment().format("MM/DD/yyy"),
time: moment().format("hh:mm a"),
@@ -279,6 +280,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
{
jobid: selectedJob,
created_by: currentUser.email,
audit: true,
text: t("jobs.labels.supplementnote", {
date: moment().format("MM/DD/yyy"),
time: moment().format("hh:mm a"),

View File

@@ -1,4 +1,5 @@
import {
AuditOutlined,
DeleteFilled,
EditFilled,
EyeInvisibleFilled,
@@ -40,6 +41,7 @@ export function JobNotesComponent({
<WarningFilled style={{ margin: 4, color: "red" }} />
) : null}
{record.private ? <EyeInvisibleFilled style={{ margin: 4 }} /> : null}
{record.audit ? <AuditOutlined style={{ margin: 4 }} /> : null}
</span>
),
},
@@ -76,11 +78,13 @@ export function JobNotesComponent({
<span>
<Button
loading={deleteLoading}
disabled={record.audit}
onClick={() => handleNoteDelete(record.id)}
>
<DeleteFilled />
</Button>
<Button
disabled={record.audit}
onClick={() => {
setNoteUpsertContext({
actions: { refetch: refetch },

View File

@@ -23,6 +23,7 @@ export const QUERY_NOTES_BY_JOB_PK = gql`
private
text
updated_at
audit
}
}
}