uat defect 130, reps 14
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
|||||||
} from "../../components/utils";
|
} from "../../components/utils";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
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 Html from "react-pdf-html";
|
||||||
|
|
||||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||||
@@ -153,6 +153,16 @@ export const AppealRow_pdf = (props) => {
|
|||||||
let labelTrans = label;
|
let labelTrans = label;
|
||||||
return labelTrans;
|
return labelTrans;
|
||||||
};
|
};
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -187,6 +197,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
style={styles.questionTextWide}
|
style={styles.questionTextWide}
|
||||||
@@ -214,6 +225,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
wrap={false}
|
wrap={false}
|
||||||
@@ -282,6 +294,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
wrap={false}
|
wrap={false}
|
||||||
@@ -337,9 +350,12 @@ export const AppealRow_pdf = (props) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{props.props[
|
{CleanHTML(
|
||||||
datafieldname[0].value
|
props.props[
|
||||||
] || ""}
|
datafieldname[0]
|
||||||
|
.value
|
||||||
|
]
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -385,6 +401,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
wrap={false}
|
wrap={false}
|
||||||
@@ -438,6 +455,7 @@ export const AppealRow_pdf = (props) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
wrap={false}
|
wrap={false}
|
||||||
@@ -522,22 +540,37 @@ export const AppealRow_pdf = (props) => {
|
|||||||
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
wrap={true}
|
|
||||||
style={{
|
style={{
|
||||||
flexDirection: "row",
|
flexDirection: "column",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
|
wrap={false}
|
||||||
>
|
>
|
||||||
<Text style={styles.questionText}>
|
<View
|
||||||
{rows[0].value}
|
wrap={false}
|
||||||
</Text>
|
style={{
|
||||||
<Text style={styles.questionAnswer}>
|
flexDirection: "row",
|
||||||
{props.props[
|
marginBottom: 10,
|
||||||
datafieldname[0].value
|
}}
|
||||||
] == "true"
|
>
|
||||||
? "Yes"
|
<Text
|
||||||
: "No"}
|
style={styles.questionText}
|
||||||
</Text>
|
wrap={false}
|
||||||
|
>
|
||||||
|
{rows[0].value}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
styles.questionAnswer
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{props.props[
|
||||||
|
datafieldname[0].value
|
||||||
|
] == "true"
|
||||||
|
? "Yes"
|
||||||
|
: "No"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
Font,
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
import Html from "react-pdf-html";
|
import Html from "react-pdf-html";
|
||||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||||
@@ -98,6 +99,17 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
//console.log("//////////////////////\n docpropseeeee:".docProps);
|
//console.log("//////////////////////\n docpropseeeee:".docProps);
|
||||||
|
|
||||||
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -243,7 +255,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Written representations" && (
|
"Written representations" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.procedureTypeEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.procedureTypeEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -294,8 +308,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={{ fontSize: 12 }}>
|
<Html style={{ fontSize: 12 }}>
|
||||||
{values.enterNeighbouringLandToViewSiteEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.enterNeighbouringLandToViewSiteEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -333,8 +348,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.enterNeighbouringLandAccessRequiredEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.enterNeighbouringLandAccessRequiredEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -366,8 +382,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.healthAndSafetyIssues == "Yes" && (
|
{values.healthAndSafetyIssues == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.healthAndSafetyIssuesEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.healthAndSafetyIssuesEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -395,7 +412,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAcontactDetails || ""}
|
{CleanHTML(values.LPAcontactDetails)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -468,7 +485,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.feeExempt == "Yes" && (
|
{values.feeExempt == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.feeExemptEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.feeExemptEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -509,8 +528,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.previousGrantedCerts == "Yes" && (
|
{values.previousGrantedCerts == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.previousGrantedCertsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.previousGrantedCertsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -533,7 +553,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.stopNoticeServed == "Yes" && (
|
{values.stopNoticeServed == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.stopNoticeServedEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.stopNoticeServedEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -558,7 +580,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.relatedCases == "Yes" && (
|
{values.relatedCases == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.relatedCasesEvidence || ""}
|
{CleanHTML(values.relatedCasesEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -581,8 +603,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.previousEnforcement == "Yes" && (
|
{values.previousEnforcement == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.previousEnforcementEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.previousEnforcementEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -605,7 +628,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.subjectArticle4 == "Yes" && (
|
{values.subjectArticle4 == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.subjectArticle4Evidence || ""}
|
{CleanHTML(
|
||||||
|
values.subjectArticle4Evidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -629,8 +654,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.previousPDRRestriction == "Yes" && (
|
{values.previousPDRRestriction == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.previousPDRRestrictionEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.previousPDRRestrictionEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -663,7 +689,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.questionAnswer}>
|
<View style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAldpAndMap || ""}
|
{CleanHTML(values.LPAldpAndMap)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -681,7 +707,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.questionAnswer}>
|
<View style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAlocalGuidance || ""}
|
{CleanHTML(values.LPAlocalGuidance)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -757,7 +783,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.ROW == "Yes" && (
|
{values.ROW == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.ROWEvidence || ""}
|
{CleanHTML(values.ROWEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -788,8 +814,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.conservationArea == "Yes" && (
|
{values.conservationArea == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.conservationAreaEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.conservationAreaEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -822,8 +849,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.affectListedBuilding == "Yes" && (
|
{values.affectListedBuilding == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.affectListedBuildingEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.affectListedBuildingEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -854,7 +882,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.TPO == "Yes" && (
|
{values.TPO == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.TPOEvidence || ""}
|
{CleanHTML(values.TPOEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -887,8 +915,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.natureConservationSite == "Yes" && (
|
{values.natureConservationSite == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.natureConservationSiteEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.natureConservationSiteEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -919,8 +948,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.protectedSpecies == "Yes" && (
|
{values.protectedSpecies == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.protectedSpeciesEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.protectedSpeciesEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -967,7 +997,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.floodingIssue == "Yes" && (
|
{values.floodingIssue == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.floodingIssueEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.floodingIssueEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1002,8 +1034,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.governmentDepartmentCommentsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.governmentDepartmentCommentsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1073,8 +1106,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.developmentCarriedOutInAccordanceEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.developmentCarriedOutInAccordanceEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1155,8 +1189,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.developmentAnyOtherConditionsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.developmentAnyOtherConditionsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1200,8 +1235,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.copyOfEnforcementNoticeEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.copyOfEnforcementNoticeEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1231,7 +1267,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
|
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.enforcementNoticePlan || ""}
|
{CleanHTML(
|
||||||
|
values.enforcementNoticePlan
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1261,8 +1299,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.listOfNotifiedOfEnforcementEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.listOfNotifiedOfEnforcementEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1294,8 +1333,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.copyOfLetterOfAppealNotificationEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.copyOfLetterOfAppealNotificationEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1327,7 +1367,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.lpaEIAOS == "Yes" && (
|
{values.lpaEIAOS == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.lpaEIAOSEvidence || ""}
|
{CleanHTML(values.lpaEIAOSEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1360,8 +1400,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.detailsOfOtherAppeals == "Yes" && (
|
{values.detailsOfOtherAppeals == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.detailsOfOtherAppealsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.detailsOfOtherAppealsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1394,8 +1435,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.detailsOfPreviousAppeals == "Yes" && (
|
{values.detailsOfPreviousAppeals == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.detailsOfPreviousAppealsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.detailsOfPreviousAppealsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1427,8 +1469,9 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.otherRelevantInformation == "Yes" && (
|
{values.otherRelevantInformation == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.otherRelevantInformationEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.otherRelevantInformationEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -120,6 +120,17 @@ export const finalComments_pdf = ({ docProps }) => {
|
|||||||
})
|
})
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -229,8 +240,9 @@ export const finalComments_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.conditional_representationCapacity_Comments ||
|
{CleanHTML(
|
||||||
""}
|
values.conditional_representationCapacity_Comments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -321,7 +333,9 @@ export const finalComments_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.representationComments || ""}
|
{CleanHTML(
|
||||||
|
values.representationComments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
Font,
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
import Html from "react-pdf-html";
|
import Html from "react-pdf-html";
|
||||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||||
@@ -111,6 +112,18 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
let appealTypeValue = getFormCollectionByID(values.appealType);
|
let appealTypeValue = getFormCollectionByID(values.appealType);
|
||||||
|
|
||||||
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
//console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||||
|
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -239,7 +252,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
{appealTypeValue.value || ""}
|
{appealTypeValue.value}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -282,14 +295,16 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswerMid}>
|
<Text style={styles.questionAnswerMid}>
|
||||||
{values.procedureType || ""}
|
{values.procedureType}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{values.procedureType !=
|
{values.procedureType !=
|
||||||
"Written representations" && (
|
"Written representations" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.procedureTypeEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.procedureTypeEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -309,7 +324,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswerMid}>
|
<Text style={styles.questionAnswerMid}>
|
||||||
{values.enterToView || ""}
|
{values.enterToView}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -344,8 +359,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={{ fontSize: 12 }}>
|
<Html style={{ fontSize: 12 }}>
|
||||||
{values.enterNeighbouringLandToViewSiteEvidence ||
|
{CleanHTML(
|
||||||
" "}
|
values.enterNeighbouringLandToViewSiteEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -380,8 +396,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.enterNeighbouringLandAccessRequiredEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.enterNeighbouringLandAccessRequiredEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -408,14 +425,15 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswerMid}>
|
<Text style={styles.questionAnswerMid}>
|
||||||
{values.healthAndSafetyIssues || ""}
|
{values.healthAndSafetyIssues}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{values.healthAndSafetyIssues == "Yes" && (
|
{values.healthAndSafetyIssues == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.healthAndSafetyIssuesEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.healthAndSafetyIssuesEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -445,7 +463,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAcontactDetails || ""}
|
{CleanHTML(values.LPAcontactDetails)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -482,7 +500,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.questionAnswer}>
|
<View style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAcaseFileAndReps || ""}
|
{CleanHTML(values.LPAcaseFileAndReps)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -502,7 +520,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.questionAnswer}>
|
<View style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAldpAndMap || ""}
|
{CleanHTML(values.LPAldpAndMap)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -522,7 +540,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={styles.questionAnswer}>
|
<View style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.LPAlocalGuidance || ""}
|
{CleanHTML(values.LPAlocalGuidance)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -608,7 +626,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.ROW == "Yes" && (
|
{values.ROW == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.ROWEvidence || ""}
|
{CleanHTML(values.ROWEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -641,8 +659,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.conservationArea == "Yes" && (
|
{values.conservationArea == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.conservationAreaEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.conservationAreaEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -675,8 +694,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.affectListedBuilding == "Yes" && (
|
{values.affectListedBuilding == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.affectListedBuildingEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.affectListedBuildingEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -709,7 +729,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.TPO == "Yes" && (
|
{values.TPO == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.TPOEvidence || ""}
|
{CleanHTML(values.TPOEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -742,8 +762,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.natureConservationSite == "Yes" && (
|
{values.natureConservationSite == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.natureConservationSiteEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.natureConservationSiteEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -776,8 +797,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.protectedSpecies == "Yes" && (
|
{values.protectedSpecies == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.protectedSpeciesEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.protectedSpeciesEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -829,8 +851,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.governmentDepartmentCommentsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.governmentDepartmentCommentsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -918,8 +941,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.developmentCarriedOutInAccordanceEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.developmentCarriedOutInAccordanceEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -989,8 +1013,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.developmentAnyOtherConditionsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.developmentAnyOtherConditionsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1039,8 +1064,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.copyOfApplicantsCertificateEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.copyOfApplicantsCertificateEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1072,7 +1098,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
|
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.advertismentGivenEvidence || ""}
|
{CleanHTML(
|
||||||
|
values.advertismentGivenEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1105,8 +1133,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.copyOfLetterOfAppealNotificationEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.copyOfLetterOfAppealNotificationEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1138,7 +1167,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.lpaEIAOS == "Yes" && (
|
{values.lpaEIAOS == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.lpaEIAOSEvidence || ""}
|
{CleanHTML(values.lpaEIAOSEvidence)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1174,8 +1203,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
"Yes" && (
|
"Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.advertismentConsentDiscontinuanceNoticeEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.advertismentConsentDiscontinuanceNoticeEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1208,8 +1238,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.detailsOfOtherAppeals == "Yes" && (
|
{values.detailsOfOtherAppeals == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.detailsOfOtherAppealsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.detailsOfOtherAppealsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1242,8 +1273,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.detailsOfPreviousAppeals == "Yes" && (
|
{values.detailsOfPreviousAppeals == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.detailsOfPreviousAppealsEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.detailsOfPreviousAppealsEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
@@ -1276,8 +1308,9 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
|||||||
{values.otherRelevantInformation == "Yes" && (
|
{values.otherRelevantInformation == "Yes" && (
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.otherRelevantInformationEvidence ||
|
{CleanHTML(
|
||||||
""}
|
values.otherRelevantInformationEvidence
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -120,6 +120,17 @@ export const other_pdf = ({ docProps }) => {
|
|||||||
})
|
})
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -262,7 +273,9 @@ export const other_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.representationComments || ""}
|
{CleanHTML(
|
||||||
|
values.representationComments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
|
|
||||||
//console.log("\n//////////\n The Case:\n", docProps.caseObj);
|
//console.log("\n//////////\n The Case:\n", docProps.caseObj);
|
||||||
|
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
Font,
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
import Html from "react-pdf-html";
|
import Html from "react-pdf-html";
|
||||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
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 (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -224,8 +236,9 @@ export const statement_pdf = ({ docProps }) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.conditional_representationCapacity_Comments ||
|
{CleanHTML(
|
||||||
""}
|
values.conditional_representationCapacity_Comments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -315,7 +328,10 @@ export const statement_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.representationComments || ""}
|
(
|
||||||
|
{CleanHTML(
|
||||||
|
values.representationComments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
Font,
|
||||||
} from "@react-pdf/renderer";
|
} from "@react-pdf/renderer";
|
||||||
import Html from "react-pdf-html";
|
import Html from "react-pdf-html";
|
||||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||||
@@ -104,6 +105,17 @@ export const writtenStatement_pdf = ({ docProps }) => {
|
|||||||
})
|
})
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
Font.registerHyphenationCallback((word) => [word]);
|
||||||
|
|
||||||
|
function CleanHTML(htmlStr) {
|
||||||
|
let cleanStr =
|
||||||
|
typeof htmlStr === "string"
|
||||||
|
? htmlStr.replace(/<p><br><\/p>/g, "")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
return cleanStr;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Document>
|
<Document>
|
||||||
<Page size="A4" style={styles.page} wrap>
|
<Page size="A4" style={styles.page} wrap>
|
||||||
@@ -239,7 +251,9 @@ export const writtenStatement_pdf = ({ docProps }) => {
|
|||||||
</View>
|
</View>
|
||||||
<View style={styles.questionAnswerWide}>
|
<View style={styles.questionAnswerWide}>
|
||||||
<Html style={styles.richArea}>
|
<Html style={styles.richArea}>
|
||||||
{values.representationComments || ""}
|
{CleanHTML(
|
||||||
|
values.representationComments
|
||||||
|
)}
|
||||||
</Html>
|
</Html>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user