updated naming convention meta and pdf fixes

This commit is contained in:
2024-05-20 12:42:53 +01:00
parent 206d08fa5e
commit d829213a6a
16 changed files with 254 additions and 143 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ export const finalComments_pdf = ({ docProps }) => {
:
</Text>
<Text style={styles.questionAnswer}>
{appealTypeValue.value}
{appealTypeValue.value || ""}
</Text>
</View>
</View>
+18 -19
View File
@@ -208,7 +208,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswer}>
{values.lpaRef}
{values.lpaRef || " "}
</Text>
</View>
<View
@@ -244,7 +244,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswer}>
{appealTypeValue.value}
{appealTypeValue.value || ""}
</Text>
</View>
</View>
@@ -287,14 +287,14 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{values.procedureType}
{values.procedureType || ""}
</Text>
</View>
{values.procedureType !=
"Written representations" && (
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.procedureTypeEvidence}
{values.procedureTypeEvidence || ""}
</Html>
</View>
)}
@@ -314,7 +314,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{values.enterToView}
{values.enterToView || ""}
</Text>
</View>
@@ -340,7 +340,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{values.enterNeighbouringLandToViewSite}
{values.enterNeighbouringLandToViewSite ||
" "}
</Text>
</View>
@@ -348,9 +349,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && (
<View style={styles.questionAnswerWide}>
<Html style={{ fontSize: 12 }}>
{
values.enterNeighbouringLandToViewSiteEvidence
}
{values.enterNeighbouringLandToViewSiteEvidence ||
" "}
</Html>
</View>
)}
@@ -377,9 +377,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{
values.enterNeighbouringLandAccessRequired
}
{values.enterNeighbouringLandAccessRequired ||
" "}
</Text>
</View>
{values.enterNeighbouringLandAccessRequired !=
@@ -414,7 +413,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{values.healthAndSafetyIssues}
{values.healthAndSafetyIssues || ""}
</Text>
</View>
{values.healthAndSafetyIssues == "Yes" && (
@@ -451,13 +450,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.LPAcontactDetails}
{values.LPAcontactDetails || ""}
</Html>
</View>
</View>
</View>
</View>
<View>
<View
style={{
@@ -489,7 +487,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</Text>
<View style={styles.questionAnswer}>
<Html style={styles.richArea}>
{values.LPAcaseFileAndReps}
{values.LPAcaseFileAndReps || ""}
</Html>
</View>
</View>
@@ -509,7 +507,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</Text>
<View style={styles.questionAnswer}>
<Html style={styles.richArea}>
{values.LPAldpAndMap}
{values.LPAldpAndMap || ""}
</Html>
</View>
</View>
@@ -529,7 +527,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</Text>
<View style={styles.questionAnswer}>
<Html style={styles.richArea}>
{values.LPAlocalGuidance}
{values.LPAlocalGuidance || ""}
</Html>
</View>
</View>
@@ -548,7 +546,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
)}
</Text>
<Text style={styles.questionAnswerMid}>
{values.LPAintentionToSubmitFullStatement}
{values.LPAintentionToSubmitFullStatement ||
""}
</Text>
</View>
</View>
+2
View File
@@ -11,6 +11,7 @@ import ReactPDF, {
import { createElement } from "react";
import Html from "react-pdf-html";
import { getFormCollectionByID } from "../../components/utils";
import useTranslation from "next-translate/useTranslation";
const styles = StyleSheet.create({
page: {
@@ -88,6 +89,7 @@ const styles = StyleSheet.create({
});
export const other_pdf = ({ docProps }) => {
let { t } = useTranslation();
//console.log("----", docProps);
function formatDates(dateObj) {
var dateObj = new Date(dateObj);
+2 -2
View File
@@ -270,7 +270,7 @@ export const statement_pdf = ({ docProps }) => {
:
</Text>
<Text style={styles.questionAnswer}>
{appealTypeValue.value}
{appealTypeValue.value || ""}
</Text>
</View>
</View>
@@ -315,7 +315,7 @@ export const statement_pdf = ({ docProps }) => {
</View>
<View style={styles.questionAnswerWide}>
<Html style={styles.richArea}>
{values.representationComments}
{values.representationComments || ""}
</Html>
</View>
</View>
@@ -201,7 +201,7 @@ export const writtenStatement_pdf = ({ docProps }) => {
Case Type:
</Text>
<Text style={styles.questionAnswer}>
{appealTypeValue.value}
{appealTypeValue.value || ""}
</Text>
</View>
</View>