Update worship export logic to conditionally include internal service information: Modify exportWorships function in worshipController.js to check format before including sacristan service and organ playing details, enhancing export customization based on the output type.
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:
@@ -2685,6 +2685,7 @@ exports.exportWorships = async (req, res) => {
|
|||||||
const collectionStr = worship.collection || '';
|
const collectionStr = worship.collection || '';
|
||||||
const sacristanServiceStr = worship.sacristanService || '';
|
const sacristanServiceStr = worship.sacristanService || '';
|
||||||
const organPlayingStr = worship.organPlaying || '';
|
const organPlayingStr = worship.organPlaying || '';
|
||||||
|
const includeInternalServiceInfo = format !== 'newsletter';
|
||||||
|
|
||||||
const secondCellChildren = [];
|
const secondCellChildren = [];
|
||||||
|
|
||||||
@@ -2720,7 +2721,7 @@ exports.exportWorships = async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Dienst (nicht bold, schwarz, Arial 11pt)
|
// Dienst (nicht bold, schwarz, Arial 11pt)
|
||||||
if (sacristanServiceStr) {
|
if (includeInternalServiceInfo && sacristanServiceStr) {
|
||||||
secondCellChildren.push(new TextRun({
|
secondCellChildren.push(new TextRun({
|
||||||
text: '',
|
text: '',
|
||||||
break: 1 // Zeilenumbruch
|
break: 1 // Zeilenumbruch
|
||||||
@@ -2760,7 +2761,7 @@ exports.exportWorships = async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Orgelspiel (nicht bold, schwarz, Arial 11pt)
|
// Orgelspiel (nicht bold, schwarz, Arial 11pt)
|
||||||
if (organPlayingStr) {
|
if (includeInternalServiceInfo && organPlayingStr) {
|
||||||
secondCellChildren.push(new TextRun({
|
secondCellChildren.push(new TextRun({
|
||||||
text: '',
|
text: '',
|
||||||
break: 1
|
break: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user