v1.0.0-beta3: Teams notifications, Excel formula preservation

This commit is contained in:
2025-12-20 18:51:01 +00:00
parent def6f323df
commit 7b4f58a807
6 changed files with 348 additions and 85 deletions
@@ -3,7 +3,7 @@
// Uses the same Graph API token from the server to avoid re-authentication
const { DRIVE_ID, PARENT_ITEM_ID } = require('./config');
const { Document, Packer, Paragraph, HeadingLevel, convertInchesToTwip } = require('docx');
const { Document, Packer, Paragraph, HeadingLevel, TextRun, convertInchesToTwip } = require('docx');
/**
* Creates a manager info document template
@@ -45,27 +45,45 @@ async function createManagerInfoDocument(jobNumber, jobName, record) {
spacing: { before: 200, after: 100 }
}),
new Paragraph({
text: `Job Name: ${jobName}`,
children: [
new TextRun({ text: 'Job Name: ' }),
new TextRun({ text: jobName, underline: {} })
],
spacing: { after: 50 }
}),
new Paragraph({
text: `Job Address: ${jobAddress}`,
children: [
new TextRun({ text: 'Job Address: ' }),
new TextRun({ text: jobAddress, underline: {} })
],
spacing: { after: 50 }
}),
new Paragraph({
text: `Job Division: ${jobDivision}`,
children: [
new TextRun({ text: 'Job Division: ' }),
new TextRun({ text: jobDivision, underline: {} })
],
spacing: { after: 50 }
}),
new Paragraph({
text: `Customer/Client Name: ${companyClient}`,
children: [
new TextRun({ text: 'Customer/Client Name: ' }),
new TextRun({ text: companyClient, underline: {} })
],
spacing: { after: 50 }
}),
new Paragraph({
text: `Job Type: ${jobType}`,
children: [
new TextRun({ text: 'Job Type: ' }),
new TextRun({ text: jobType, underline: {} })
],
spacing: { after: 50 }
}),
new Paragraph({
text: `Job Status: ${jobStatus}`,
children: [
new TextRun({ text: 'Job Status: ' }),
new TextRun({ text: jobStatus, underline: {} })
],
spacing: { after: 200 }
}),