Merged PR 1121: moved personal details to end of pdf document

moved personal details to end of pdf document

Related work items: #10832
This commit is contained in:
Robert Bond
2024-04-10 13:14:56 +00:00
+308 -320
View File
@@ -181,326 +181,6 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
/>
</View>
<View>
<View
style={{
marginTop: 10,
fontFamily: "Helvetica-Bold",
}}
>
<Text style={{ fontSize: 14 }}>Case Details</Text>
<View style={styles.sectionContainer}>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<View
style={{
flexDirection: "column",
marginBottom: 10,
}}
>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appeal submitted on behalf of:
</Text>
<Text style={styles.questionAnswer}>
{" "}
{
values.caseObj
.pinswg_onbehalfof
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant or Agent
</Text>
<Text style={styles.questionAnswer}>
{" "}
{values.caseObj
.pinswg_appellantagent ==
"846040000"
? "Appellant"
: "Agent"}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant name
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_appellantfirstname +
" " +
values.caseObj
.pinswg_appellantlastname}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant email address
</Text>
<Text style={styles.questionAnswer}>
{
values.caseObj
.pinswg_appellantemailaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant address
</Text>
<Text style={styles.questionAnswer}>
{
values.caseObj
.pinswg_appellantaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant phone number
</Text>
<Text style={styles.questionAnswer}>
{" "}
{
values.caseObj
.pinswg_appellantphonenumber
}
</Text>
</View>
{values.caseObj.pinswg_appellantagent !=
"846040000" && (
<>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionText
}
>
Company name
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentcompanyname
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionText
}
>
Agent name
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentfirstname
}{" "}
{
values.caseObj
.pinswg_agentlastname
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionText
}
>
Agent email address
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentemailaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionText
}
>
Agent address
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={
styles.questionText
}
>
Agent phone number
</Text>
<Text
style={
styles.questionAnswer
}
>
{" "}
{
values.caseObj
.pinswg_agentphonenumber
}
</Text>
</View>
</>
)}
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
LPA
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj.pinswg_lpaname}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Contact Preference
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_contactprefs ==
"846040000"
? "Email"
: "Post"}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Language Preference
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_contactprefs ==
"846040000"
? "English"
: "Welsh"}
</Text>
</View>
</View>
</View>
</View>
</View>
</View>
{Object.keys(titles).map((key) => (
<View key={key}>
<View
@@ -565,6 +245,314 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
}}
></View>
</Page>
<Page size="A4" style={styles.page} wrap>
<View>
<View
style={{
marginTop: 10,
fontFamily: "Helvetica-Bold",
}}
>
<Text style={{ fontSize: 14 }}>Case Details</Text>
<View style={styles.sectionContainer}>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<View
style={{
flexDirection: "column",
marginBottom: 10,
}}
>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appeal submitted on behalf of:
</Text>
<Text style={styles.questionAnswer}>
{" "}
{values.caseObj.pinswg_onbehalfof}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant or Agent
</Text>
<Text style={styles.questionAnswer}>
{" "}
{values.caseObj
.pinswg_appellantagent ==
"846040000"
? "Appellant"
: "Agent"}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant name
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_appellantfirstname +
" " +
values.caseObj
.pinswg_appellantlastname}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant email address
</Text>
<Text style={styles.questionAnswer}>
{
values.caseObj
.pinswg_appellantemailaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant address
</Text>
<Text style={styles.questionAnswer}>
{
values.caseObj
.pinswg_appellantaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Appellant phone number
</Text>
<Text style={styles.questionAnswer}>
{" "}
{
values.caseObj
.pinswg_appellantphonenumber
}
</Text>
</View>
{values.caseObj.pinswg_appellantagent !=
"846040000" && (
<>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={styles.questionText}
>
Company name
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentcompanyname
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={styles.questionText}
>
Agent name
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentfirstname
}{" "}
{
values.caseObj
.pinswg_agentlastname
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={styles.questionText}
>
Agent email address
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentemailaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={styles.questionText}
>
Agent address
</Text>
<Text
style={
styles.questionAnswer
}
>
{
values.caseObj
.pinswg_agentaddress
}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text
style={styles.questionText}
>
Agent phone number
</Text>
<Text
style={
styles.questionAnswer
}
>
{" "}
{
values.caseObj
.pinswg_agentphonenumber
}
</Text>
</View>
</>
)}
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
LPA
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj.pinswg_lpaname}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Contact Preference
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_contactprefs ==
"846040000"
? "Email"
: "Post"}
</Text>
</View>
<View
wrap={false}
style={{
flexDirection: "row",
marginBottom: 10,
}}
>
<Text style={styles.questionText}>
Language Preference
</Text>
<Text style={styles.questionAnswer}>
{values.caseObj
.pinswg_contactprefs ==
"846040000"
? "English"
: "Welsh"}
</Text>
</View>
</View>
</View>
</View>
</View>
</View>
</Page>
</Document>
);
};