IO-3020 IO-3036 Extend blur wrapper, add lock wrapper to components throughout the system. Many placeholders still left for upsell components.
This commit is contained in:
@@ -8,6 +8,7 @@ import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import BlurWrapperComponent from "../feature-wrapper/blur-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser
|
||||
@@ -41,7 +42,12 @@ export function JobAuditTrail({ currentUser, jobId }) {
|
||||
{
|
||||
title: t("audit.fields.operation"),
|
||||
dataIndex: "operation",
|
||||
key: "operation"
|
||||
key: "operation",
|
||||
render: (text, record) => (
|
||||
<BlurWrapperComponent featureName="audit">
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
}
|
||||
];
|
||||
const emailColumns = [
|
||||
@@ -64,52 +70,78 @@ export function JobAuditTrail({ currentUser, jobId }) {
|
||||
dataIndex: "to",
|
||||
key: "to",
|
||||
|
||||
render: (text, record) => record.to && record.to.map((email, idx) => <Tag key={idx}>{email}</Tag>)
|
||||
render: (text, record) =>
|
||||
record.to &&
|
||||
record.to.map((email, idx) => (
|
||||
<Tag key={idx}>
|
||||
<BlurWrapperComponent featureName="audit">
|
||||
<div>{email}</div>
|
||||
</BlurWrapperComponent>
|
||||
</Tag>
|
||||
))
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.cc"),
|
||||
dataIndex: "cc",
|
||||
key: "cc",
|
||||
|
||||
render: (text, record) => record.cc && record.cc.map((email, idx) => <Tag key={idx}>{email}</Tag>)
|
||||
render: (text, record) =>
|
||||
record.cc &&
|
||||
record.cc.map((email, idx) => (
|
||||
<Tag key={idx}>
|
||||
<BlurWrapperComponent featureName="audit">
|
||||
<div>{email}</div>
|
||||
</BlurWrapperComponent>
|
||||
</Tag>
|
||||
))
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.subject"),
|
||||
dataIndex: "subject",
|
||||
key: "subject"
|
||||
key: "subject",
|
||||
render: (text, record) => (
|
||||
<BlurWrapperComponent featureName="audit">
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("audit.fields.status"),
|
||||
dataIndex: "status",
|
||||
key: "status"
|
||||
key: "status",
|
||||
render: (text, record) => (
|
||||
<BlurWrapperComponent featureName="audit">
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
},
|
||||
...(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>
|
||||
)
|
||||
}
|
||||
]
|
||||
: [])
|
||||
|
||||
{
|
||||
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]}>
|
||||
{
|
||||
//TODO:Upsell
|
||||
}
|
||||
<Col span={24}>
|
||||
<Card
|
||||
title={t("jobs.labels.audit")}
|
||||
|
||||
Reference in New Issue
Block a user