Zahlungen, Kosten und Aufgaben im Terminplan, Aufgaben-Vorlage, Schlussrechnung als Rest, Zahlungsplan verschieben (0.14.0)
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
Claude
2026-10-20 11:20:13 +00:00
parent 6d0c5f238b
commit 4e07e0b89e
19 changed files with 842 additions and 54 deletions

View File

@@ -1,5 +1,7 @@
import { randomBytes } from "node:crypto";
import { erstellePool } from "./db.js";
import { erstellePool, transaktion } from "./db.js";
import { EinstellungenSchema } from "./einstellungen.js";
import { vorlageAnwenden } from "./vorlage.js";
import { migriere } from "./migrate.js";
import { baueApp } from "./app.js";
import { Nextcloud } from "./nextcloud.js";
@@ -12,6 +14,12 @@ if (!url) {
const pool = erstellePool(url);
await migriere(pool, (t) => console.log(t));
// Aufgaben-Vorlage für Projekte, die seit dem letzten Start nichts geändert haben (z. B. nach einem Update)
{
const e = EinstellungenSchema.parse((await pool.query("select daten from einstellungen limit 1")).rows[0]?.daten ?? {});
const neu = await transaktion(pool, "system", (c) => vorlageAnwenden(c, e.aufgabenVorlage, { tage: e.arbeitstage }));
if (neu) console.log(`Aufgaben-Vorlage: ${neu} neue Aufgaben angelegt`);
}
// P10: Ordner der Projekte; gleicher Zugang wie für die Sicherung, eigene Adresse
const { NEXTCLOUD_PROJEKTE_URL: ncUrl, NEXTCLOUD_BENUTZER: ncBenutzer, NEXTCLOUD_PASSWORT: ncPasswort } = process.env;
const nextcloud = ncUrl && ncBenutzer && ncPasswort ? new Nextcloud({ url: ncUrl, benutzer: ncBenutzer, passwort: ncPasswort }) : undefined;