Renamed to setup for group testing
This commit is contained in:
33
src/exams/pdf/group.test.report.tsx
Normal file
33
src/exams/pdf/group.test.report.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
/* eslint-disable jsx-a11y/alt-text */
|
||||
import React from "react";
|
||||
import { Document, Page, View, Text, Image } from "@react-pdf/renderer";
|
||||
import { styles } from "./styles";
|
||||
|
||||
import { StyleSheet } from "@react-pdf/renderer";
|
||||
|
||||
|
||||
interface Props {
|
||||
// date: string;
|
||||
// name: string;
|
||||
// email: string;
|
||||
// id: string;
|
||||
// gender?: string;
|
||||
// testDetails: ModuleScore[];
|
||||
// summary: string;
|
||||
// logo: string;
|
||||
// qrcode: string;
|
||||
// renderDetails: React.ReactNode;
|
||||
// title: string;
|
||||
}
|
||||
|
||||
const GroupTestReport = ({}: Props) => {
|
||||
return (
|
||||
<Document>
|
||||
<Page style={styles.body}>
|
||||
<View></View>
|
||||
</Page>
|
||||
</Document>
|
||||
);
|
||||
};
|
||||
|
||||
export default GroupTestReport;
|
||||
@@ -32,7 +32,7 @@ interface Props {
|
||||
title: string;
|
||||
}
|
||||
|
||||
const PDFReport = ({
|
||||
const TestReport = ({
|
||||
title,
|
||||
date,
|
||||
name,
|
||||
@@ -218,4 +218,4 @@ const PDFReport = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default PDFReport;
|
||||
export default TestReport;
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { withIronSessionApiRoute } from "iron-session/next";
|
||||
import { sessionOptions } from "@/lib/session";
|
||||
import ReactPDF from "@react-pdf/renderer";
|
||||
import PDFReport from "@/exams/pdf";
|
||||
import TestReport from "@/exams/pdf/test.report";
|
||||
import { ref, uploadBytes } from "firebase/storage";
|
||||
import { Stat } from "@/interfaces/user";
|
||||
import { User } from "@/interfaces/user";
|
||||
@@ -337,7 +337,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
const { title, details } = getCustomData();
|
||||
const pdfStream = await ReactPDF.renderToStream(
|
||||
<PDFReport
|
||||
<TestReport
|
||||
title={title}
|
||||
date={new Date(stat.date).toLocaleString()}
|
||||
name={user.name}
|
||||
|
||||
Reference in New Issue
Block a user