error checking on pdf

This commit is contained in:
2024-05-13 16:52:25 +01:00
parent c94e61196a
commit 62e8179e3a
6 changed files with 61 additions and 73 deletions
+3 -6
View File
@@ -348,12 +348,9 @@ export const AppealRow_pdf = (props) => {
}
>
<Html style={styles.richArea}>
{
props.props[
datafieldname[0]
.value
]
}{" "}
{props.props[
datafieldname[0].value
] || ""}{" "}
</Html>
</View>
</View>
+51 -58
View File
@@ -247,7 +247,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Written representations" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.procedureTypeEvidence}
{values.procedureTypeEvidence || ""}
</Html>
</View>
)}
@@ -298,9 +298,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={{ fontSize: 12 }}>
{
values.enterNeighbouringLandToViewSiteEvidence
}
{values.enterNeighbouringLandToViewSiteEvidence ||
""}
</Html>
</View>
)}
@@ -338,9 +337,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.enterNeighbouringLandAccessRequiredEvidence
}
{values.enterNeighbouringLandAccessRequiredEvidence ||
""}
</Html>
</View>
)}
@@ -372,9 +370,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.healthAndSafetyIssues == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.healthAndSafetyIssuesEvidence
}
{values.healthAndSafetyIssuesEvidence ||
""}
</Html>
</View>
)}
@@ -402,7 +399,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.LPAcontactDetails}
{values.LPAcontactDetails || ""}
</Html>
</View>
</View>
@@ -475,7 +472,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.feeExempt == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.feeExemptEvidence}
{values.feeExemptEvidence || ""}
</Html>
</View>
)}
@@ -516,7 +513,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousGrantedCerts == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.previousGrantedCertsEvidence}
{values.previousGrantedCertsEvidence ||
""}
</Html>
</View>
)}
@@ -539,7 +537,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.stopNoticeServed == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.stopNoticeServedEvidence}
{values.stopNoticeServedEvidence || ""}
</Html>
</View>
)}
@@ -564,7 +562,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.relatedCases == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.relatedCasesEvidence}
{values.relatedCasesEvidence || ""}
</Html>
</View>
)}
@@ -587,7 +585,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousEnforcement == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.previousEnforcementEvidence}
{values.previousEnforcementEvidence ||
""}
</Html>
</View>
)}
@@ -610,7 +609,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.subjectArticle4 == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.subjectArticle4Evidence}
{values.subjectArticle4Evidence || ""}
</Html>
</View>
)}
@@ -634,7 +633,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.previousPDRRestriction == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.previousPDRRestrictionEvidence}
{values.previousPDRRestrictionEvidence ||
""}
</Html>
</View>
)}
@@ -667,7 +667,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</Text>
<View style={styles.questionAnswer}>
<Html style={styles.richArea}>
{values.LPAldpAndMap}
{values.LPAldpAndMap || ""}
</Html>
</View>
</View>
@@ -685,7 +685,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</Text>
<View style={styles.questionAnswer}>
<Html style={styles.richArea}>
{values.LPAlocalGuidance}
{values.LPAlocalGuidance || ""}
</Html>
</View>
</View>
@@ -761,7 +761,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.ROW == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.ROWEvidence}
{values.ROWEvidence || ""}
</Html>
</View>
)}
@@ -792,7 +792,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.conservationArea == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.conservationAreaEvidence}
{values.conservationAreaEvidence ||
""}
</Html>
</View>
)}
@@ -825,9 +826,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.affectListedBuilding == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.affectListedBuildingEvidence
}
{values.affectListedBuildingEvidence ||
""}
</Html>
</View>
)}
@@ -858,7 +858,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.TPO == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.TPOEvidence}
{values.TPOEvidence || ""}
</Html>
</View>
)}
@@ -891,9 +891,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.natureConservationSite == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.natureConservationSiteEvidence
}
{values.natureConservationSiteEvidence ||
""}
</Html>
</View>
)}
@@ -924,7 +923,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.protectedSpecies == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.protectedSpeciesEvidence}
{values.protectedSpeciesEvidence ||
""}
</Html>
</View>
)}
@@ -971,7 +971,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.floodingIssue == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.floodingIssueEvidence}
{values.floodingIssueEvidence || ""}
</Html>
</View>
)}
@@ -1006,9 +1006,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.governmentDepartmentCommentsEvidence
}
{values.governmentDepartmentCommentsEvidence ||
""}
</Html>
</View>
)}
@@ -1078,9 +1077,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.developmentCarriedOutInAccordanceEvidence
}
{values.developmentCarriedOutInAccordanceEvidence ||
""}
</Html>
</View>
)}
@@ -1161,9 +1159,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.developmentAnyOtherConditionsEvidence
}
{values.developmentAnyOtherConditionsEvidence ||
""}
</Html>
</View>
)}
@@ -1207,7 +1204,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.copyOfEnforcementNoticeEvidence}
{values.copyOfEnforcementNoticeEvidence ||
""}
</Html>
</View>
</View>
@@ -1237,7 +1235,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.enforcementNoticePlan}
{values.enforcementNoticePlan || ""}
</Html>
</View>
</View>
@@ -1267,9 +1265,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.listOfNotifiedOfEnforcementEvidence
}
{values.listOfNotifiedOfEnforcementEvidence ||
""}
</Html>
</View>
</View>
@@ -1301,9 +1298,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.copyOfLetterOfAppealNotificationEvidence
}
{values.copyOfLetterOfAppealNotificationEvidence ||
""}
</Html>
</View>
</View>
@@ -1335,7 +1331,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.lpaEIAOS == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.lpaEIAOSEvidence}
{values.lpaEIAOSEvidence || ""}
</Html>
</View>
)}
@@ -1368,9 +1364,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfOtherAppeals == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.detailsOfOtherAppealsEvidence
}
{values.detailsOfOtherAppealsEvidence ||
""}
</Html>
</View>
)}
@@ -1403,9 +1398,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfPreviousAppeals == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.detailsOfPreviousAppealsEvidence
}
{values.detailsOfPreviousAppealsEvidence ||
""}
</Html>
</View>
)}
@@ -1437,9 +1431,8 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
{values.otherRelevantInformation == "Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{
values.otherRelevantInformationEvidence
}
{values.otherRelevantInformationEvidence ||
""}
</Html>
</View>
)}
+3 -4
View File
@@ -226,9 +226,8 @@ export const finalComments_pdf = ({ docProps }) => {
</Text>
<Text style={styles.questionAnswer}>
<Html style={styles.richArea}>
{
values.conditional_representationCapacity_Comments
}
{values.conditional_representationCapacity_Comments ||
""}
</Html>
</Text>
</View>
@@ -319,7 +318,7 @@ export const finalComments_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.representationComments}
{values.representationComments || ""}
</Html>
</View>
</View>
+1 -1
View File
@@ -245,7 +245,7 @@ export const other_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.representationComments}
{values.representationComments || ""}
</Html>
</View>
</View>
+2 -3
View File
@@ -224,9 +224,8 @@ export const statement_pdf = ({ docProps }) => {
</Text>
<Text style={styles.questionAnswer}>
<Html style={styles.richArea}>
{
values.conditional_representationCapacity_Comments
}
{values.conditional_representationCapacity_Comments ||
""}
</Html>
</Text>
</View>
@@ -238,7 +238,7 @@ export const writtenStatement_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.representationComments}
{values.representationComments || ""}
</Html>
</View>
</View>