Added initial group report pdf

This commit is contained in:
Joao Ramos
2024-01-09 02:22:54 +00:00
parent 2540398ab0
commit bdf65a7215
8 changed files with 687 additions and 130 deletions

View File

@@ -1,21 +1,16 @@
/* eslint-disable jsx-a11y/alt-text */
import React from "react";
import { Document, Page, View, Text, Image } from "@react-pdf/renderer";
import ProgressBar from "./progress.bar";
import { ModuleScore } from "@/interfaces/module.scores";
import { styles } from "./styles";
import { StyleSheet } from "@react-pdf/renderer";
import TestReportFooter from "./test.report.footer";
const customStyles = StyleSheet.create({
testDetails: {
display: "flex",
gap: 4,
},
qrcode: {
width: "80px",
height: "80px",
},
});
interface Props {
@@ -148,71 +143,13 @@ const TestReport = ({
<View style={styles.alignRightRow}>
<Image
src={qrcode}
style={customStyles.qrcode}
style={styles.qrcode}
/>
</View>
</View>
<View style={[{ paddingBottom: 30 }, styles.separator]}></View>
{false && (
<View>
<ProgressBar
width={200}
height={18}
backgroundColor="#cc5b55"
progressColor="#fab7b0"
percentage={60}
/>
</View>
)}
<View style={{ flexGrow: 1 }}></View>
<View style={[{ paddingTop: 30, fontSize: 5 }, styles.textFont]}>
<View
style={[
styles.spacedRow,
{
paddingHorizontal: 10,
},
]}
>
<View>
<Text>Validity</Text>
<Text>
This report remains valid for a duration of three months from
the test date.
</Text>
</View>
<View>
<Text>Confidential circulated for concern people</Text>
</View>
</View>
<View style={{ paddingTop: 10 }}>
<Text>Declaration</Text>
<Text style={{ paddingTop: 5 }}>
We hereby declare that exam results on our platform, assessed by
AI, are not the sole determinants of candidates&apos; English
proficiency levels. While EnCoach provides feedback based on
assessments, we recognize that language proficiency encompasses
practical application, cultural understanding, and real-life
communication. We urge users to consider exam results as a measure
of progress and improvement, and we continuously enhance our
system to ensure accuracy and reliability.
</Text>
</View>
<View style={[styles.textColor, { paddingTop: 5 }]}>
<Text style={styles.textUnderline}>info@encoach.com</Text>
<Text>https://encoach.com</Text>
<View style={styles.spacedRow}>
<Text>Group ID: TRI64BNBOIU5043</Text>
<Text
// style={styles.pageNumber}
render={({ pageNumber, totalPages }) =>
`${pageNumber} / ${totalPages}`
}
fixed
/>
</View>
</View>
</View>
<TestReportFooter />
</Page>
</Document>
);