diff --git a/controllers/worshipController.js b/controllers/worshipController.js index b75e8fa..15906ea 100644 --- a/controllers/worshipController.js +++ b/controllers/worshipController.js @@ -2686,6 +2686,13 @@ exports.exportWorships = async (req, res) => { const sacristanServiceStr = worship.sacristanService || ''; const organPlayingStr = worship.organPlaying || ''; const includeInternalServiceInfo = format !== 'newsletter'; + const isNeighborInvitation = !!worship.neighborInvitation; + const titleColor = format === 'newsletter' + ? (isNeighborInvitation ? '0432FF' : '000000') + : (isNeighborInvitation ? '0432FF' : '009051'); + const organizerColor = 'EE0000'; + const serviceColor = '0070C0'; + const organColor = 'FF9300'; const secondCellChildren = []; @@ -2693,7 +2700,7 @@ exports.exportWorships = async (req, res) => { secondCellChildren.push(new TextRun({ text: `${timeStr} ${titleStr}`, bold: true, - color: '000000', + color: titleColor, font: 'Arial', size: 22 // 11pt = 22 half-points })); @@ -2707,14 +2714,14 @@ exports.exportWorships = async (req, res) => { secondCellChildren.push(new TextRun({ text: 'Gestaltung: ', bold: true, - color: '000000', + color: organizerColor, font: 'Arial', size: 22 })); secondCellChildren.push(new TextRun({ text: organizerStr, bold: true, - color: '000000', + color: organizerColor, font: 'Arial', size: 22 })); @@ -2728,13 +2735,13 @@ exports.exportWorships = async (req, res) => { })); secondCellChildren.push(new TextRun({ text: 'Dienst: ', - color: '000000', + color: serviceColor, font: 'Arial', size: 22 })); secondCellChildren.push(new TextRun({ text: sacristanServiceStr, - color: '000000', + color: serviceColor, font: 'Arial', size: 22 })); @@ -2768,13 +2775,13 @@ exports.exportWorships = async (req, res) => { })); secondCellChildren.push(new TextRun({ text: 'Orgel: ', - color: '000000', + color: organColor, font: 'Arial', size: 22 })); secondCellChildren.push(new TextRun({ text: organPlayingStr, - color: '000000', + color: organColor, font: 'Arial', size: 22 }));