From 7ef2c64bc40fd7e99eeeb811d67da4e9be119f3f Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 13 Sep 2024 09:47:06 -0400 Subject: [PATCH] ? --- mccs-it/thermal/modules/Thermal.js | 38 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/mccs-it/thermal/modules/Thermal.js b/mccs-it/thermal/modules/Thermal.js index 89fed1e..180315d 100644 --- a/mccs-it/thermal/modules/Thermal.js +++ b/mccs-it/thermal/modules/Thermal.js @@ -23,33 +23,33 @@ module.exports = { credentials(username, studentId) { // Create the output text return [ - { font: 'public/Outfit-Regular.ttf', text: `Username:` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${username}\n` }, - { font: 'public/Outfit-Regular.ttf', text: 'Email:' }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${username}@kvcc.me.edu\n` }, - { font: 'public/Outfit-Regular.ttf', text: `Student ID:` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${studentId}\n` }, - { font: 'public/Outfit-Regular.ttf', text: 'Note: the MyKV Portal uses your username to sign in, not email.' }, + { font: 'public/Outfit-Regular.ttf', text: `Username:`, moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${username}`, moveDownAfter: true }, + { font: 'public/Outfit-Regular.ttf', text: 'Email:', moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${username}@kvcc.me.edu`, moveDownAfter: true }, + { font: 'public/Outfit-Regular.ttf', text: `Student ID:`, moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${studentId}`, moveDownAfter: true }, + { font: 'public/Outfit-Regular.ttf', text: 'Note: the MyKV Portal uses your username to sign in, not email.', moveDownAfter: true }, ] }, maineCC() { // Create the output text return [ - { font: 'public/Outfit-Regular.ttf', text: 'Kennebec Valley Community College is migrating email domains from @kvcc.me.edu to @mainecc.edu.\n' }, - { font: 'public/Outfit-Regular.ttf', text: `For support with this transition, please contact:` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.name}` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.phone}` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.email}` }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.site}\n` } + { font: 'public/Outfit-Regular.ttf', text: 'Kennebec Valley Community College is migrating email domains from @kvcc.me.edu to @mainecc.edu.', moveDownAfter: true }, + { font: 'public/Outfit-Regular.ttf', text: `For support with this transition, please contact:`, moveDownAfter: true }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.name}`, moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.phone}`, moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.email}`, moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${mccContractor.site}`, moveDownAfter: true } ]; }, tempPassword(password) { // Create the output text return [ - { font: 'public/Outfit-Regular.ttf', text: 'We have changed your password to a temporary password, shown below. Next time you log into Microsoft you will be prompted to change your password.\n' }, - { font: 'public/Outfit-Regular.ttf', text: 'Temporary Password:' }, - { font: 'public/RobotoMono-SemiBold.ttf', text: `${password}\n` }, - { font: 'public/Outfit-Regular.ttf', text: 'Password requirements:\n8+ characters\n1+ Uppercase\n1+ Lowercase\n1+ Special (!/_=.,?)\n' } + { font: 'public/Outfit-Regular.ttf', text: 'We have changed your password to a temporary password, shown below. Next time you log into Microsoft you will be prompted to change your password.\n', moveDownAfter: true }, + { font: 'public/Outfit-Regular.ttf', text: 'Temporary Password:', moveDownAfter: false }, + { font: 'public/RobotoMono-SemiBold.ttf', text: `${password}\n`, moveDownAfter: false }, + { font: 'public/Outfit-Regular.ttf', text: 'Password requirements:\n8+ characters\n1+ Uppercase\n1+ Lowercase\n1+ Special (!/_=.,?)\n', moveDownAfter: true } ] } }, @@ -91,10 +91,12 @@ module.exports = { // }); for (row of infoArray) { - // doc.moveDown(); doc.font(row.font).text(row.text, { align: 'left', }); + if (row.moveDownAfter) { + doc.moveDown(); + } } doc.font('public/Outfit-Regular.ttf').text(receiptFooter, {