IO-1984 Resolve error on email audit tab.

This commit is contained in:
Patrick Fic
2022-08-29 08:13:12 -07:00
parent f5c9a7dfef
commit 5adfef6ce0

View File

@@ -85,28 +85,30 @@ export function JobAuditTrail({ currentUser, jobId }) {
dataIndex: "subject",
key: "subject",
},
...(currentUser?.email.includes("@imex.") && [
{
title: t("audit.fields.contents"),
dataIndex: "contents",
key: "contents",
width: "10%",
render: (text, record) => (
<Button
onClick={() => {
var win = window.open(
"",
"Title",
"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=400,"
);
win.document.body.innerHTML = record.contents;
}}
>
Preview
</Button>
),
},
]),
...(currentUser?.email.includes("@imex.")
? [
{
title: t("audit.fields.contents"),
dataIndex: "contents",
key: "contents",
width: "10%",
render: (text, record) => (
<Button
onClick={() => {
var win = window.open(
"",
"Title",
"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=400,"
);
win.document.body.innerHTML = record.contents;
}}
>
Preview
</Button>
),
},
]
: []),
];
return (
<Row gutter={[16, 16]}>