Enhance worship import functionality: Add neighbor invitation and self-information fields in worshipController.js and WorshipManagement.vue. Implement logic to automatically set self-information based on neighbor invitation status, improving user experience and data handling during worship imports.
All checks were successful
Deploy miriamgemeinde / deploy (push) Successful in 6s

This commit is contained in:
Torsten Schulz (local)
2026-04-29 19:49:45 +02:00
parent 7835c2da1a
commit aeaf747445
2 changed files with 27 additions and 1 deletions

View File

@@ -1829,6 +1829,9 @@ exports.saveImportedWorships = async (req, res) => {
// Freigabe-Status aus Import-Dialog übernehmen (Checkbox in der UI).
// Fallback: wenn kein Wert gesetzt ist, bleibt es false.
worshipData.approved = !!worshipData.approved;
worshipData.neighborInvitation = !!worshipData.neighborInvitation;
// Regel: Nachbarschaftsraum => automatisch Selbstinformation.
worshipData.selfInformation = !!worshipData.selfInformation || worshipData.neighborInvitation;
worshipData.title = normalizeText(worshipData.title) || 'Gottesdienst';
const replaceExistingIds = Array.isArray(worshipData._replaceExistingIds)
@@ -1844,6 +1847,8 @@ exports.saveImportedWorships = async (req, res) => {
sacristanService: worshipData.sacristanService || '',
organPlaying: worshipData.organPlaying || '',
approved: worshipData.approved,
neighborInvitation: worshipData.neighborInvitation,
selfInformation: worshipData.selfInformation,
eventPlaceId: worshipData.eventPlaceId,
};