questionnaire download empty licences fix
This commit is contained in:
parent
6d9f56d38d
commit
2ea055e43f
@ -175,14 +175,20 @@ export default async function handler(req, res)
|
|||||||
|
|
||||||
if(questionnaire[group] !== null)
|
if(questionnaire[group] !== null)
|
||||||
{
|
{
|
||||||
page.drawText(questionnaire[group], {
|
let licenses = questionnaire[group];
|
||||||
|
if(typeof licenses !== "string")
|
||||||
|
{
|
||||||
|
licenses = licenses.join(", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
page.drawText(licenses, {
|
||||||
x: 152,
|
x: 152,
|
||||||
y: questionnaire[group].length > 500 ? 195 : (questionnaire[group].length > 400) ? 195 : 193,
|
y: licenses.length > 500 ? 195 : (licenses.length > 400) ? 195 : 193,
|
||||||
size: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6,
|
size: licenses.length > 500 ? 4 : (licenses.length > 400) ? 5 : 6,
|
||||||
font: formFont,
|
font: formFont,
|
||||||
color: rgb(0, 0, 0),
|
color: rgb(0, 0, 0),
|
||||||
maxWidth: 412,
|
maxWidth: 412,
|
||||||
lineHeight: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6,
|
lineHeight: licenses.length > 500 ? 4 : (licenses.length > 400) ? 5 : 6,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user