Zeiterfassung mit Pausenabzug, offline am Handy, Ansicht für alle (0.9.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 06:43:52 +00:00
parent 859a076e83
commit e4754f329a
16 changed files with 832 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ import { legeZahlungsplanAn, zahlungsplanFest, zahlungsplaeneAutomatisch } from
import { uebersicht } from "./uebersicht.js";
import { aufgabenKalender, baustellenKalender } from "./kalender.js";
import { type Nextcloud, ordnerAbgleichen } from "./nextcloud.js";
import { TABELLEN } from "./tabellen.js";
import { NUR_SICHERUNG, TABELLEN } from "./tabellen.js";
import { EinstellungenSchema, type Einstellungen } from "./einstellungen.js";
import { liquiditaet } from "../domain/liquiditaet.js";
import { liquiditaetsDaten } from "../domain/projektplan.js";
@@ -22,6 +22,7 @@ import { VERSION } from "./version.js";
import { type Anmeldeart, registriereAnmeldung, werName } from "./anmeldung.js";
import { istEingeteilt, registriereIch } from "./ich.js";
import { registrierePersonal } from "./personal.js";
import { registriereZeiten } from "./zeiten.js";
export interface Optionen {
pool: Pool;
@@ -64,6 +65,7 @@ export async function baueApp(o: Optionen): Promise<FastifyInstance> {
registriereIch(app, pool, ladeEinstellungen);
registrierePersonal(app, pool, ladeEinstellungen);
registriereZeiten(app, pool, ladeEinstellungen);
app.get("/api/status", async () => {
await pool.query("select 1");
@@ -350,7 +352,7 @@ export async function baueApp(o: Optionen): Promise<FastifyInstance> {
// D1: kompletter Stand als JSON-Datei
app.get("/api/export", async (_req, reply) => {
const daten: Record<string, unknown[]> = {};
for (const t of TABELLEN) daten[t.pfad] = (await pool.query(`select * from ${t.name} order by ${t.sortierung}`)).rows;
for (const t of [...TABELLEN, ...NUR_SICHERUNG]) daten[t.pfad] = (await pool.query(`select * from ${t.name} order by ${t.sortierung}`)).rows;
daten.benutzer = await benutzerFuerSicherung(pool);
const stand = new Date().toISOString();
reply.header("content-disposition", `attachment; filename="betrieb-${stand.slice(0, 10)}.json"`);