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 { View, Text } from "@react-pdf/renderer";
|
||||
|
||||
const TestReportFooter = () => (
|
||||
interface Props {
|
||||
userId?: string;
|
||||
}
|
||||
|
||||
const TestReportFooter = ({ userId }: Props) => (
|
||||
<View
|
||||
style={[
|
||||
{
|
||||
@@ -25,9 +29,22 @@ const TestReportFooter = () => (
|
||||
</Text>
|
||||
</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>
|
||||
{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 }}>
|
||||
<Text style={styles.textBold}>Declaration</Text>
|
||||
<Text style={{ paddingTop: 5 }}>
|
||||
|
||||
@@ -124,7 +124,7 @@ const TestReport = ({
|
||||
</View>
|
||||
</View>
|
||||
<View style={[{ paddingTop: 30 }, styles.separator]}></View>
|
||||
<TestReportFooter />
|
||||
<TestReportFooter userId={id}/>
|
||||
</Page>
|
||||
<Page style={styles.body}>
|
||||
<View>
|
||||
@@ -165,7 +165,7 @@ const TestReport = ({
|
||||
</View>
|
||||
<View style={[{ paddingBottom: 30 }, styles.separator]}></View>
|
||||
<View style={{ flexGrow: 1 }}></View>
|
||||
<TestReportFooter />
|
||||
<TestReportFooter userId={id}/>
|
||||
</Page>
|
||||
</Document>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user