Buchungskalender: Abschluss – Kleinigkeiten Server (Betrag/Waehrung, Erstattungs-Webhook, Obergrenze, Zaehler, Cache, Kommentare, Setup-Check)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
knsoandClaude Opus 5.5 committed 2026-10-07 15:29:55 +00:00
1 parent 6d35674c1e
commit 1d9515823c
13 files changed
+123 -14

No files matched your search

+14
View File
@@ -44,6 +44,20 @@ export async function main({ check = false, client, log = console.log } = {}) {
plan.push({ id, exists, absentAttributes, absentIndexes })
}
// Rechnungs-PDF an Gastmails: termineOutbox braucht das Attribut `anhang` (Schema des Terminplaners). Fehlt es, meldet --check das (Exit 1) und
// der normale Lauf legt es an. Fehlt die ganze Collection, ist das ein Fall fuer scripts/termine-setup.mjs (nur Hinweis).
const outboxId = config.collections.termineOutbox
const anhang = { key: 'anhang', type: 'string', size: 500, required: false }
if (await api.collectionExists(outboxId)) {
if (!(await api.listAttributes(outboxId)).some((a) => a.key === 'anhang')) {
if (check) log(`- ${outboxId}.anhang FEHLT`)
missing.push({ ...anhang, collection: outboxId })
plan.push({ id: outboxId, exists: true, absentAttributes: [anhang], absentIndexes: [] })
}
} else {
log(`! ${outboxId} fehlt: zuerst scripts/termine-setup.mjs ausfuehren (Gastmails mit Rechnungs-PDF brauchen termineOutbox.anhang)`)
}
const result = { missing, missingCollections, missingIndexes }
if (check) {
const open = missing.length + missingCollections.length + missingIndexes.length