Removed decimals from export pdf
This commit is contained in:
@@ -370,7 +370,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
studentsData={studentsData}
|
||||
showLevel={showLevel}
|
||||
summaryPNG={overallPNG}
|
||||
summaryScore={`${(overallResult * 100).toFixed(0)}%`}
|
||||
summaryScore={`${Math.floor(overallResult * 100)}%`}
|
||||
groupScoreSummary={groupScoreSummary}
|
||||
passportId={demographicInformation?.passport_id || ""}
|
||||
/>,
|
||||
|
||||
@@ -136,14 +136,14 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
const userId = stats[statIndex].user;
|
||||
|
||||
|
||||
if (hasPDF) {
|
||||
// if it does, return the pdf url
|
||||
const fileRef = ref(storage, hasPDF.pdf.path);
|
||||
const url = await getDownloadURL(fileRef);
|
||||
// if (hasPDF) {
|
||||
// // if it does, return the pdf url
|
||||
// const fileRef = ref(storage, hasPDF.pdf.path);
|
||||
// const url = await getDownloadURL(fileRef);
|
||||
|
||||
res.status(200).end(url);
|
||||
return;
|
||||
}
|
||||
// res.status(200).end(url);
|
||||
// return;
|
||||
// }
|
||||
|
||||
try {
|
||||
// generate the pdf report
|
||||
@@ -286,7 +286,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
logo={"public/logo_title.png"}
|
||||
qrcode={qrcode}
|
||||
summaryPNG={overallPNG}
|
||||
summaryScore={`${(overallResult * 100).toFixed(0)}%`}
|
||||
summaryScore={`${Math.floor(overallResult * 100)}%`}
|
||||
passportId={demographicInformation?.passport_id || ""}
|
||||
/>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user