added agent details to new appeal pdf

This commit is contained in:
2024-01-23 13:14:52 +00:00
parent 9e3454e7bf
commit 89c38fe4c9
7 changed files with 758 additions and 354 deletions
+56 -2
View File
@@ -9,6 +9,7 @@ import {
getFormCollectionByID,
getPickListLabel,
getRadioLabel,
bytesToSize,
} from "../../components/utils";
import ReactPDF, {
@@ -178,9 +179,17 @@ export const AppealRow_pdf = (props) => {
var rows = xpath.select("//label/@description", doc);
var fieldtype = xpath.select("//@classid", doc);
var datafieldname = xpath.select("//@datafieldname", doc);
var datafieldcontent = xpath.select("//@datafieldcontent", doc);
var parentField = xpath.select("//@parentField", doc);
var parentFieldShowOnValue = xpath.select(
"//@parentFieldShowOnValue",
doc
);
var documentTypeCode = xpath.select(
"//@ishareDocumentCode",
doc
);
console.log(datafieldname[0].value);
return (
@@ -380,6 +389,52 @@ export const AppealRow_pdf = (props) => {
</View>
);
break;
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
const blobList = jsonpath.query(
props.filesList,
"$..[?(@.documentType=='" +
documentTypeCode[0].value +
"')]"
);
return (
<View
style={{
flexDirection: "column",
marginBottom: 10,
}}
>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionTextWide
}
>
{rows[0].value}
</Text>
</View>
<View
style={
styles.questionAnswerWide
}
>
{blobList.map((blob, i) => (
<Text>
{blob.name} -{" "}
{bytesToSize(
blob.contentLength
)}
</Text>
))}
</View>
</View>
);
break;
default:
return (
<View
@@ -390,7 +445,6 @@ export const AppealRow_pdf = (props) => {
}}
>
<Text style={styles.questionText}>
{/* {FieldsTranslations(rows[0].value)} */}
{rows[0].value}
</Text>
<Text style={styles.questionAnswer}>