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