Update worship approval logic: Modify the import process to set the approval status based on the UI checkbox, ensuring a fallback to false if no value is provided. This enhances the clarity of the approval mechanism during worship data imports.
This commit is contained in:
@@ -1192,8 +1192,9 @@ exports.saveImportedWorships = async (req, res) => {
|
||||
continue; // Überspringe vergangene Daten
|
||||
}
|
||||
|
||||
// approved auf false setzen
|
||||
worshipData.approved = false;
|
||||
// Freigabe-Status aus Import-Dialog übernehmen (Checkbox in der UI).
|
||||
// Fallback: wenn kein Wert gesetzt ist, bleibt es false.
|
||||
worshipData.approved = !!worshipData.approved;
|
||||
|
||||
// Prüfen ob bereits ein Eintrag für dieses Datum und diese Uhrzeit existiert
|
||||
const whereClause = {
|
||||
|
||||
Reference in New Issue
Block a user