rep defect 41 update final comments in line
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
import ReactPDF, {
|
||||
import {
|
||||
Document,
|
||||
Image,
|
||||
Page,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
Image,
|
||||
StyleSheet,
|
||||
PDFViewer,
|
||||
Font,
|
||||
} from "@react-pdf/renderer";
|
||||
import { createElement } from "react";
|
||||
import Html from "react-pdf-html";
|
||||
import { getFormCollectionByID, bytesToSize } from "../../components/utils";
|
||||
|
||||
import transLookupCY from "../../locales/cy/myrepresentations.json";
|
||||
import transLookupEN from "../../locales/en/myrepresentations.json";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
|
||||
const getTrans = (locale, key) => {
|
||||
let jsonQuery = `$.${key}`;
|
||||
@@ -56,6 +53,28 @@ const styles = StyleSheet.create({
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "white",
|
||||
},
|
||||
questionAnswerSmall: {
|
||||
color: "#757575",
|
||||
width: "300",
|
||||
fontSize: 12,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
backgroundColor: "white",
|
||||
marginRight: 10,
|
||||
},
|
||||
questionAnswerSmaller: {
|
||||
color: "#757575",
|
||||
width: "90",
|
||||
fontSize: 12,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "white",
|
||||
},
|
||||
questionAnswerMid: {
|
||||
color: "#757575",
|
||||
width: "20%",
|
||||
@@ -242,7 +261,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
<Html style={styles.richArea}>
|
||||
{CleanHTML(
|
||||
values.conditional_representationCapacity_Comments
|
||||
)}
|
||||
) || "N/A"}
|
||||
</Html>
|
||||
</Text>
|
||||
</View>
|
||||
@@ -443,7 +462,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{ width: "40%", fontSize: 12 }}
|
||||
style={{ width: "15%", fontSize: 12 }}
|
||||
>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
@@ -451,7 +470,18 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Text
|
||||
style={{
|
||||
color: "#757575",
|
||||
width: "310",
|
||||
fontSize: 12,
|
||||
padding: 5,
|
||||
border: 1,
|
||||
borderColor: "#eee",
|
||||
backgroundColor: "white",
|
||||
paddingRight: 10,
|
||||
}}
|
||||
>
|
||||
{values.firstname} {values.lastname}
|
||||
</Text>
|
||||
</View>
|
||||
@@ -462,14 +492,20 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Text style={styles.questionText}>
|
||||
<Text
|
||||
style={{
|
||||
width: "40",
|
||||
fontSize: 12,
|
||||
marginLeft: 10,
|
||||
}}
|
||||
>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-date-label"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
<Text style={styles.questionAnswerSmaller}>
|
||||
{signedDate}
|
||||
</Text>
|
||||
</View>
|
||||
@@ -482,6 +518,7 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
@@ -501,6 +538,28 @@ export const finalComments_pdf = ({ docProps }) => {
|
||||
: ""}
|
||||
</Text>
|
||||
</View>
|
||||
) : values.hasOwnProperty("onBehalfOfLPA") ? (
|
||||
<View
|
||||
wrap={false}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginBottom: 10,
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{ width: "18%", fontSize: 12 }}
|
||||
>
|
||||
{getTrans(
|
||||
docProps.locale,
|
||||
"statement-onbehalf-label"
|
||||
)}
|
||||
:
|
||||
</Text>
|
||||
<Text style={styles.questionAnswerWide}>
|
||||
{values.onBehalfOfLPA}
|
||||
</Text>
|
||||
</View>
|
||||
) : (
|
||||
<View />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user