fix: registration code (broke in merge)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
51f8d0fb42
commit
123509d0a6
|
@ -13,5 +13,4 @@ const config = {
|
|||
url_imprint: '',
|
||||
// optional, will fallback to baseurl_selfservice/privacy
|
||||
url_privacy: '',
|
||||
codeformat: 'code39'
|
||||
};
|
||||
|
|
|
@ -638,17 +638,19 @@ import axios from "redaxios";
|
|||
import bwipjs from "bwip-js";
|
||||
|
||||
function textToBase64Barcode(text) {
|
||||
var canvas = document.createElement("canvas");
|
||||
bwipjs.toCanvas(canvas, {
|
||||
bcid: config.codeformat || "code39",
|
||||
const canvas = document.createElement("canvas");
|
||||
let codeconfig = {
|
||||
bcid: config.code_format || "code39",
|
||||
text: `${text}`,
|
||||
scale: 3,
|
||||
height: 10,
|
||||
// width: 10,
|
||||
includetext: false,
|
||||
textxalign: "center",
|
||||
backgroundcolor: "ffffff",
|
||||
});
|
||||
};
|
||||
if (codeconfig.bcid === "code39" || codeconfig.bcid === "code128"|| codeconfig.bcid === "ean13") {
|
||||
codeconfig.height = 10;
|
||||
}
|
||||
bwipjs.toCanvas(canvas, codeconfig);
|
||||
return canvas.toDataURL("image/png");
|
||||
}
|
||||
|
||||
|
@ -749,13 +751,13 @@ function get_certificate() {
|
|||
} else {
|
||||
var fileURL = window.URL.createObjectURL(
|
||||
new Blob([response.data], { type: "application/pdf" })
|
||||
);
|
||||
);
|
||||
var fileLink = document.createElement("a");
|
||||
|
||||
fileLink.href = fileURL;
|
||||
fileLink.setAttribute("download", "Certificate.pdf");
|
||||
document.body.appendChild(fileLink);
|
||||
|
||||
|
||||
fileLink.click();
|
||||
fileLink.remove();
|
||||
toast.clear();
|
||||
|
|
Loading…
Reference in New Issue