uat defect 130, reps 14
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from "../../components/utils";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
|
||||
import { StyleSheet, Text, View } from "@react-pdf/renderer";
|
||||
import { StyleSheet, Text, View, Font } from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
|
||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||
@@ -153,6 +153,16 @@ export const AppealRow_pdf = (props) => {
|
||||
let labelTrans = label;
|
||||
return labelTrans;
|
||||
};
|
||||
Font.registerHyphenationCallback((word) => [word]);
|
||||
|
||||
function CleanHTML(htmlStr) {
|
||||
let cleanStr =
|
||||
typeof htmlStr === "string"
|
||||
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||
: "";
|
||||
|
||||
return cleanStr;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -187,6 +197,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text
|
||||
style={styles.questionTextWide}
|
||||
@@ -214,6 +225,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -282,6 +294,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -337,9 +350,12 @@ export const AppealRow_pdf = (props) => {
|
||||
}
|
||||
>
|
||||
<Html style={styles.richArea}>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] || ""}
|
||||
{CleanHTML(
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
)}
|
||||
</Html>
|
||||
</View>
|
||||
</View>
|
||||
@@ -385,6 +401,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -438,6 +455,7 @@ export const AppealRow_pdf = (props) => {
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<View
|
||||
wrap={false}
|
||||
@@ -522,22 +540,37 @@ export const AppealRow_pdf = (props) => {
|
||||
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
||||
return (
|
||||
<View
|
||||
wrap={true}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexDirection: "column",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
wrap={false}
|
||||
>
|
||||
<Text style={styles.questionText}>
|
||||
{rows[0].value}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] == "true"
|
||||
? "Yes"
|
||||
: "No"}
|
||||
</Text>
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={styles.questionText}
|
||||
wrap={false}
|
||||
>
|
||||
{rows[0].value}
|
||||
</Text>
|
||||
<Text
|
||||
style={
|
||||
styles.questionAnswer
|
||||
}
|
||||
>
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] == "true"
|
||||
? "Yes"
|
||||
: "No"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user