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}> <Html style={styles.richArea}>
{ {props.props[
props.props[ datafieldname[0].value
datafieldname[0] ] || ""}{" "}
.value
]
}{" "}
</Html> </Html>
</View> </View>
</View> </View>
+51 -58
View File
@@ -247,7 +247,7 @@ 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} {values.procedureTypeEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -298,9 +298,8 @@ 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 ||
values.enterNeighbouringLandToViewSiteEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -338,9 +337,8 @@ 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 ||
values.enterNeighbouringLandAccessRequiredEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -372,9 +370,8 @@ 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 ||
values.healthAndSafetyIssuesEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -402,7 +399,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} {values.LPAcontactDetails || ""}
</Html> </Html>
</View> </View>
</View> </View>
@@ -475,7 +472,7 @@ 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} {values.feeExemptEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -516,7 +513,8 @@ 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} {values.previousGrantedCertsEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -539,7 +537,7 @@ 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} {values.stopNoticeServedEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -564,7 +562,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} {values.relatedCasesEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -587,7 +585,8 @@ 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} {values.previousEnforcementEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -610,7 +609,7 @@ 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} {values.subjectArticle4Evidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -634,7 +633,8 @@ 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} {values.previousPDRRestrictionEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -667,7 +667,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} {values.LPAldpAndMap || ""}
</Html> </Html>
</View> </View>
</View> </View>
@@ -685,7 +685,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} {values.LPAlocalGuidance || ""}
</Html> </Html>
</View> </View>
</View> </View>
@@ -761,7 +761,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} {values.ROWEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -792,7 +792,8 @@ 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} {values.conservationAreaEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -825,9 +826,8 @@ 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 ||
values.affectListedBuildingEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -858,7 +858,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} {values.TPOEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -891,9 +891,8 @@ 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 ||
values.natureConservationSiteEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -924,7 +923,8 @@ 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} {values.protectedSpeciesEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -971,7 +971,7 @@ 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} {values.floodingIssueEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -1006,9 +1006,8 @@ 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 ||
values.governmentDepartmentCommentsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1078,9 +1077,8 @@ 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 ||
values.developmentCarriedOutInAccordanceEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1161,9 +1159,8 @@ 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 ||
values.developmentAnyOtherConditionsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1207,7 +1204,8 @@ 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} {values.copyOfEnforcementNoticeEvidence ||
""}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1237,7 +1235,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.enforcementNoticePlan} {values.enforcementNoticePlan || ""}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1267,9 +1265,8 @@ 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 ||
values.listOfNotifiedOfEnforcementEvidence ""}
}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1301,9 +1298,8 @@ 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 ||
values.copyOfLetterOfAppealNotificationEvidence ""}
}
</Html> </Html>
</View> </View>
</View> </View>
@@ -1335,7 +1331,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} {values.lpaEIAOSEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -1368,9 +1364,8 @@ 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 ||
values.detailsOfOtherAppealsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1403,9 +1398,8 @@ 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 ||
values.detailsOfPreviousAppealsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1437,9 +1431,8 @@ 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 ||
values.otherRelevantInformationEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
+3 -4
View File
@@ -226,9 +226,8 @@ 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 ||
values.conditional_representationCapacity_Comments ""}
}
</Html> </Html>
</Text> </Text>
</View> </View>
@@ -319,7 +318,7 @@ 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} {values.representationComments || ""}
</Html> </Html>
</View> </View>
</View> </View>
+1 -1
View File
@@ -245,7 +245,7 @@ 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} {values.representationComments || ""}
</Html> </Html>
</View> </View>
</View> </View>
+2 -3
View File
@@ -224,9 +224,8 @@ 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 ||
values.conditional_representationCapacity_Comments ""}
}
</Html> </Html>
</Text> </Text>
</View> </View>
@@ -238,7 +238,7 @@ 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} {values.representationComments || ""}
</Html> </Html>
</View> </View>
</View> </View>