minor UX change

This commit is contained in:
sairaj mote 2022-12-05 02:06:23 +05:30
parent 6cf70815e0
commit 5fa88fc750

View File

@ -359,13 +359,15 @@
canvas.getContext('2d').drawImage(img, 0, 0);
const imgData = canvas.toDataURL('image/png');
certPdf.addImage(imgData, 'PNG', 620, 670, 160, 160);
certPdf.save(`RanchiMall ${certType.toLowerCase()} for ${name}.pdf`);
if (downloadButton) {
downloadButton.disabled = false;
downloadButton.lastChild.textContent = "Download";
}
certPdf.save(`RanchiMall ${certType.toLowerCase()} for ${name}.pdf`, { returnPromise: true }).then(() => {
if (downloadButton) {
downloadButton.disabled = false;
downloadButton.lastChild.textContent = "Download";
}
});
};
}
}
floGlobals.validCerts = new Map()