From 7c641508ce50a5db9905d5c90aa71b8a39a8ac86 Mon Sep 17 00:00:00 2001 From: Joao Ramos Date: Sat, 27 Jan 2024 19:34:15 +0000 Subject: [PATCH] Added user id to the footer of the report --- src/exams/pdf/test.report.footer.tsx | 21 +++++++++++++++++++-- src/exams/pdf/test.report.tsx | 4 ++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/exams/pdf/test.report.footer.tsx b/src/exams/pdf/test.report.footer.tsx index 3771fee7..e8c493e6 100644 --- a/src/exams/pdf/test.report.footer.tsx +++ b/src/exams/pdf/test.report.footer.tsx @@ -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) => ( ( - Confidential – circulated for concern people + + Confidential –{" "} + + circulated for concern people + + + {userId && ( + + + User ID:{" "} + {userId} + + + )} Declaration diff --git a/src/exams/pdf/test.report.tsx b/src/exams/pdf/test.report.tsx index 9c409554..df1479d7 100644 --- a/src/exams/pdf/test.report.tsx +++ b/src/exams/pdf/test.report.tsx @@ -124,7 +124,7 @@ const TestReport = ({ - + @@ -165,7 +165,7 @@ const TestReport = ({ - + );