update view texteditor
This commit is contained in:
@@ -248,10 +248,7 @@ export default function ServiceMonitoring() {
|
|||||||
};
|
};
|
||||||
}, [corporateValue]);
|
}, [corporateValue]);
|
||||||
|
|
||||||
const clearCodeHtml = (text:any) => {
|
|
||||||
return new DOMParser().parseFromString(text, 'text/html').documentElement.textContent
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderHTML = (data:string) => {
|
const renderHTML = (data:string) => {
|
||||||
return (
|
return (
|
||||||
<div style={{marginLeft: 20}}
|
<div style={{marginLeft: 20}}
|
||||||
@@ -990,7 +987,7 @@ export default function ServiceMonitoring() {
|
|||||||
<Typography variant="h6">Subject</Typography>
|
<Typography variant="h6">Subject</Typography>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.subject
|
{dailyMonitoring.subject
|
||||||
? clearCodeHtml(dailyMonitoring.subject)
|
? renderHTML(dailyMonitoring.subject)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -1002,7 +999,7 @@ export default function ServiceMonitoring() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.object
|
{dailyMonitoring.object
|
||||||
? clearCodeHtml(dailyMonitoring.object)
|
? renderHTML(dailyMonitoring.object)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -1100,7 +1097,7 @@ export default function ServiceMonitoring() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.analysis
|
{dailyMonitoring.analysis
|
||||||
? clearCodeHtml(dailyMonitoring.analysis)
|
? renderHTML(dailyMonitoring.analysis)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -172,11 +172,7 @@ export default function DetailMonitoringList() {
|
|||||||
setDetailMonitoringList(response);
|
setDetailMonitoringList(response);
|
||||||
setOrganizationId(organization_id);
|
setOrganizationId(organization_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const clearCodeHtml = (text:any) => {
|
|
||||||
return new DOMParser().parseFromString(text, 'text/html').documentElement.textContent
|
|
||||||
}
|
|
||||||
|
|
||||||
const renderHTML = (data:string) => {
|
const renderHTML = (data:string) => {
|
||||||
return (
|
return (
|
||||||
<div style={{marginLeft: 20}}
|
<div style={{marginLeft: 20}}
|
||||||
@@ -268,7 +264,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{clearCodeHtml(row.subject)}
|
{renderHTML(row.subject)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -283,7 +279,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} paddingY={2}>
|
<Grid item xs={12} paddingY={2}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{clearCodeHtml(row.object)}
|
{renderHTML(row.object)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
@@ -342,7 +338,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{clearCodeHtml(row.analysis)}
|
{renderHTML(row.analysis)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -433,7 +429,7 @@ export default function DetailMonitoringList() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={6}>
|
<Grid item xs={6}>
|
||||||
<Typography variant="body2" color={"GrayText"}>
|
<Typography variant="body2" color={"GrayText"}>
|
||||||
{row.examination != null ? clearCodeHtml(row.examination) : '-' }
|
{row.examination != null ? renderHTML(row.examination) : '-' }
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user