Added user id to the footer of the report
This commit is contained in:
@@ -2,7 +2,11 @@ import React from "react";
|
|||||||
import { styles } from "./styles";
|
import { styles } from "./styles";
|
||||||
import { View, Text } from "@react-pdf/renderer";
|
import { View, Text } from "@react-pdf/renderer";
|
||||||
|
|
||||||
const TestReportFooter = () => (
|
interface Props {
|
||||||
|
userId?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TestReportFooter = ({ userId }: Props) => (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
{
|
{
|
||||||
@@ -25,9 +29,22 @@ const TestReportFooter = () => (
|
|||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<Text style={styles.textBold}>Confidential – <Text style={[styles.textFont, styles.textNormal]}>circulated for concern people</Text></Text>
|
<Text style={styles.textBold}>
|
||||||
|
Confidential –{" "}
|
||||||
|
<Text style={[styles.textFont, styles.textNormal]}>
|
||||||
|
circulated for concern people
|
||||||
|
</Text>
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
{userId && (
|
||||||
|
<View style={{ paddingTop: 10 }}>
|
||||||
|
<Text style={styles.textBold}>
|
||||||
|
User ID:{" "}
|
||||||
|
<Text style={[styles.textFont, styles.textNormal]}>{userId}</Text>
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
<View style={{ paddingTop: 10 }}>
|
<View style={{ paddingTop: 10 }}>
|
||||||
<Text style={styles.textBold}>Declaration</Text>
|
<Text style={styles.textBold}>Declaration</Text>
|
||||||
<Text style={{ paddingTop: 5 }}>
|
<Text style={{ paddingTop: 5 }}>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const TestReport = ({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={[{ paddingTop: 30 }, styles.separator]}></View>
|
<View style={[{ paddingTop: 30 }, styles.separator]}></View>
|
||||||
<TestReportFooter />
|
<TestReportFooter userId={id}/>
|
||||||
</Page>
|
</Page>
|
||||||
<Page style={styles.body}>
|
<Page style={styles.body}>
|
||||||
<View>
|
<View>
|
||||||
@@ -165,7 +165,7 @@ const TestReport = ({
|
|||||||
</View>
|
</View>
|
||||||
<View style={[{ paddingBottom: 30 }, styles.separator]}></View>
|
<View style={[{ paddingBottom: 30 }, styles.separator]}></View>
|
||||||
<View style={{ flexGrow: 1 }}></View>
|
<View style={{ flexGrow: 1 }}></View>
|
||||||
<TestReportFooter />
|
<TestReportFooter userId={id}/>
|
||||||
</Page>
|
</Page>
|
||||||
</Document>
|
</Document>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user