0.29.0: Rauten und Meilensteine auf Freitag nach Freigabe, Auslastung Team oben fest
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-22 08:51:45 +00:00
parent ba34664c02
commit e1b0406289
12 changed files with 94 additions and 29 deletions

View File

@@ -188,14 +188,14 @@ export async function baueApp(o: Optionen): Promise<FastifyInstance> {
async function versatzAusDatum(c: Client, tabelle: string, daten: Record<string, unknown>, id?: string): Promise<void> {
const feld = DATUM_FELD[tabelle];
if (!feld || typeof daten[feld] !== "string" || daten.bezug_tage !== undefined) return;
const alt = id ? (await c.query(`select vorgang_id, bezug_art from ${tabelle} where id = $1`, [id])).rows[0] : undefined;
const alt = id ? (await c.query(`select vorgang_id, bezug_art, freitag from ${tabelle} where id = $1`, [id])).rows[0] : undefined;
const vid = (daten.vorgang_id !== undefined ? daten.vorgang_id : alt?.vorgang_id) as string | null | undefined;
if (!vid) return;
const v = (await c.query("select id, start, dauer, freitage from vorgang where id = $1", [vid])).rows[0];
if (!v) return;
const e = await ladeEinstellungen();
const art = (daten.bezug_art ?? alt?.bezug_art ?? "EE") as BezugArt;
daten.bezug_tage = bezugsTage({ ...v, dauer: Number(v.dauer) }, art, daten[feld] as string, { tage: e.arbeitstage });
daten.bezug_tage = bezugsTage({ ...v, dauer: Number(v.dauer) }, art, daten[feld] as string, { tage: e.arbeitstage }, (daten.freitag ?? alt?.freitag) as boolean | undefined);
}
const projektDerZahlung = async (c: Client, tabelle: string, id: string) =>
tabelle === "zahlung" ? (await c.query("select projekt_id from zahlung where id = $1", [id])).rows[0]?.projekt_id as string | undefined : undefined;