uat defect 130, reps 14
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
@@ -116,6 +117,17 @@ export const statement_pdf = ({ docProps }) => {
|
||||
})
|
||||
: [];
|
||||
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<Document>
|
||||
<Page size="A4" style={styles.page} wrap>
|
||||
@@ -224,8 +236,9 @@ export const statement_pdf = ({ docProps }) => {
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.conditional_representationCapacity_Comments ||
|
||||
""}
|
||||
{CleanHTML(
|
||||
values.conditional_representationCapacity_Comments
|
||||
)}
|
||||
</Html>
|
||||
</Text>
|
||||
</View>
|
||||
@@ -315,7 +328,10 @@ export const statement_pdf = ({ docProps }) => {
|
||||
</View>
|
||||
<View style={styles.questionAnswerWide}>
|
||||
<Html style={styles.richArea}>
|
||||
{values.representationComments || ""}
|
||||
(
|
||||
{CleanHTML(
|
||||
values.representationComments
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user