Update worship export colors in worshipController.js: Introduce dynamic color assignment for title, organizer, service, and organ text based on the worship format and neighbor invitation status, enhancing visual differentiation in exported documents.
All checks were successful
Deploy miriamgemeinde / deploy (push) Successful in 6s
All checks were successful
Deploy miriamgemeinde / deploy (push) Successful in 6s
This commit is contained in:
@@ -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
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user