Implemented missing unifiSsid check for PDF exports

This commit is contained in:
Glenn de Haan
2024-09-21 12:28:18 +02:00
parent 9cc7fe7cb5
commit f97a61fcd2
2 changed files with 27 additions and 20 deletions

View File

@@ -65,6 +65,7 @@ module.exports = {
doc.moveDown(2);
if(variables.unifiSsid !== '') {
doc.font('Helvetica')
.fontSize(10)
.text(`Connect to: `, {
@@ -86,6 +87,7 @@ module.exports = {
doc.moveDown(6);
doc.moveDown(2);
}
doc.font('Helvetica-Bold')
.fontSize(12)

View File

@@ -1,8 +1,13 @@
/**
* Import own modules
*/
const variables = require('../modules/variables');
/**
* Util function to calculate paper size based on voucher data
*/
module.exports = (voucher) => {
let base = 375;
let base = variables.unifiSsid !== '' ? 375 : 260;
if(voucher.qos_usage_quota) {
base += 10;