0.29.0: Rauten und Meilensteine auf Freitag nach Freigabe, Auslastung Team oben fest
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user