applied downloadable checkbox on submit of new appeal

This commit is contained in:
2026-03-16 13:58:02 +00:00
parent 72eafd0a8e
commit 7c84344d5d
9 changed files with 189 additions and 57 deletions
+48 -47
View File
@@ -4,7 +4,7 @@ import xpath from "xpath";
import {
bytesToSize,
getPickListLabel,
getDocumentTypeFromFilename,
getDocumentTypeFromFilename
} from "../../components/utils";
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
@@ -22,7 +22,7 @@ export const AppealRow_pdf = (props) => {
sectionCount,
onSubmit,
updateCurrentSection,
mandatoryFieldsData,
mandatoryFieldsData
} = props;
const styles = StyleSheet.create({
@@ -30,23 +30,23 @@ export const AppealRow_pdf = (props) => {
backgroundColor: "white",
padding: 20,
fontSize: 16,
paddingBottom: 50,
paddingBottom: 50
},
header: {
fontSize: 25,
fontFamily: "Helvetica",
flexDirection: "row",
justifyContent: "space-between",
justifyContent: "space-between"
},
subHeader: {
fontSize: 20,
fontSize: 20
},
logoImage: { width: "200pt" },
questionBullet: { width: "5%", fontSize: 12 },
questionText: {
width: "35%",
fontSize: 12,
marginRight: 5,
marginRight: 5
},
questionTextMid: { width: "80%", fontSize: 12 },
questionTextWide: { width: "95%", fontSize: 12, marginBottom: 5 },
@@ -60,7 +60,7 @@ export const AppealRow_pdf = (props) => {
paddingLeft: 10,
backgroundColor: "white",
display: "flex",
flexWrap: "wrap",
flexWrap: "wrap"
},
questionAnswerMid: {
color: "#757575",
@@ -72,7 +72,7 @@ export const AppealRow_pdf = (props) => {
paddingLeft: 10,
backgroundColor: "white",
display: "flex",
flexWrap: "wrap",
flexWrap: "wrap"
},
questionAnswerWide: {
color: "#757575",
@@ -81,26 +81,26 @@ export const AppealRow_pdf = (props) => {
border: 1,
borderColor: "#eee",
backgroundColor: "white",
padding: 5,
padding: 5
},
questionAnswerRow: {
width: "100%",
flex: 1,
flexDirection: "row",
flexGrow: 1,
flexGrow: 1
},
questionAnswerColLeft: {
width: "40%",
width: "40%"
},
questionAnswerColRight: {
padding: 5,
width: "40%",
width: "40%"
},
sectionContainer: {
backgroundColor: "#F8F8F8",
padding: 10,
marginTop: 20,
fontSize: 15,
fontSize: 15
},
pageNumber: {
position: "absolute",
@@ -109,15 +109,15 @@ export const AppealRow_pdf = (props) => {
left: 0,
right: 0,
textAlign: "center",
color: "grey",
color: "grey"
},
documentList: {
fontSize: 10,
fontSize: 10
},
richArea: {
fontSize: 12,
flexDirection: "column",
},
flexDirection: "column"
}
});
const parser = new DOMParser();
@@ -151,7 +151,7 @@ export const AppealRow_pdf = (props) => {
let formObj = jsonpath({
path: "$['" + appealtypes + "']",
json: fieldLookup,
eval: true,
eval: true
});
let labelTrans = label;
@@ -211,7 +211,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -243,7 +243,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -251,7 +251,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -301,11 +301,13 @@ export const AppealRow_pdf = (props) => {
? fieldCopy.split("|")[1]
: fieldCopy;
const transData = require("../../locales/en/" +
(typeof fieldCopy != "undefined"
? fieldCopy.split(":")[0]
: "common") +
".json");
const transData = require(
"../../locales/en/" +
(typeof fieldCopy != "undefined"
? fieldCopy.split(":")[0]
: "common") +
".json"
);
let transCopy =
typeof fieldCopy != "undefined"
@@ -316,7 +318,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -324,7 +326,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -350,14 +352,14 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -391,7 +393,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text style={styles.questionText}>
@@ -420,16 +422,15 @@ export const AppealRow_pdf = (props) => {
//const blobList = props.filesList || [];
const blobList = Array.isArray(
props.filesList?.value
)
? props.filesList.value
: [];
const blobList =
props.filesList.hasOwnProperty("value")
? props.filesList.value
: props.filesList || [];
return (
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -437,7 +438,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -489,7 +490,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -497,7 +498,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -516,7 +517,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
>
{(props.props.hasOwnProperty(
@@ -549,14 +550,14 @@ export const AppealRow_pdf = (props) => {
style={{
flexDirection:
"row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
style={{
width: "50%",
paddingRight:
"20",
"20"
}}
>
{tenant?.pinswg_agriculturaltenantname_firstname &&
@@ -579,7 +580,7 @@ export const AppealRow_pdf = (props) => {
<Text
style={{
width: "40%",
width: "40%"
}}
>
Notice
@@ -604,7 +605,7 @@ export const AppealRow_pdf = (props) => {
<View
style={{
flexDirection: "column",
marginBottom: 10,
marginBottom: 10
}}
wrap={false}
>
@@ -612,7 +613,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text
@@ -642,7 +643,7 @@ export const AppealRow_pdf = (props) => {
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
marginBottom: 10
}}
>
<Text style={styles.questionText}>