Added the missing radial progress
This commit is contained in:
@@ -263,12 +263,14 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
);
|
||||
const overallResult = overallScore / overallTotal;
|
||||
|
||||
const overallPNG = getRadialProgressPNG("laranja", overallScore, overallTotal);
|
||||
|
||||
// generate the overall detail report
|
||||
const overallDetail = {
|
||||
module: "Overall",
|
||||
score: overallScore,
|
||||
total: overallTotal,
|
||||
png: getRadialProgressPNG("laranja", overallScore, overallTotal),
|
||||
png: overallPNG,
|
||||
} as ModuleScore;
|
||||
const testDetails = [overallDetail, ...finalResults];
|
||||
|
||||
@@ -301,6 +303,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
};
|
||||
|
||||
const { title, details } = getCustomData();
|
||||
|
||||
const pdfStream = await ReactPDF.renderToStream(
|
||||
<TestReport
|
||||
title={title}
|
||||
@@ -314,6 +317,8 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
renderDetails={details}
|
||||
logo={"public/logo_title.png"}
|
||||
qrcode={qrcode}
|
||||
summaryPNG={overallPNG}
|
||||
summaryScore={`${(overallResult * 100).toFixed(0)}%`}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user