Angebote mit Kalkulation: Leistungsverzeichnis, Kostenzeilen, Versandprüfung, Annehmen macht den Auftrag (0.16.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 22:16:30 +00:00
parent 334cd9357e
commit 8979795502
17 changed files with 1567 additions and 19 deletions

View File

@@ -54,8 +54,17 @@ export async function baustellenKalender(pool: Pool, woche: Arbeitswoche): Promi
export async function aufgabenKalender(pool: Pool): Promise<string> {
const r = await pool.query(`select a.id, a.text, a.faellig_am, a.geaendert_am, p.nummer from aufgabe a left join projekt p on p.id = a.projekt_id
where a.erledigt_am is null and a.faellig_am is not null`);
return kalender("Aufgaben", r.rows.map((a) => ({
uid: `${a.id}@betrieb.schaarschmidt-holzbau.de`, von: a.faellig_am, bis: a.faellig_am,
titel: `Aufgabe: ${a.text}${a.nummer ? ` (${a.nummer})` : ""}`, geaendert: a.geaendert_am,
})));
// A35: Ende der Bindefrist offener Angebote als Termin (Outlook classic gleicht keine Aufgaben ab, E15)
const b = await pool.query(`select a.id, a.nummer, a.bindefrist, a.geaendert_am, p.bezeichnung from angebot a join projekt p on p.id = a.projekt_id
where a.status = 'versendet' and a.bindefrist is not null`);
return kalender("Aufgaben", [
...r.rows.map((a) => ({
uid: `${a.id}@betrieb.schaarschmidt-holzbau.de`, von: a.faellig_am, bis: a.faellig_am,
titel: `Aufgabe: ${a.text}${a.nummer ? ` (${a.nummer})` : ""}`, geaendert: a.geaendert_am,
})),
...b.rows.map((a) => ({
uid: `bindefrist-${a.id}@betrieb.schaarschmidt-holzbau.de`, von: a.bindefrist, bis: a.bindefrist,
titel: `Bindefrist Angebot ${a.nummer} (${a.bezeichnung})`, geaendert: a.geaendert_am,
})),
]);
}