Stundenliste fürs Steuerbüro als CSV (0.10.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:52:48 +00:00
parent e4754f329a
commit 8634791c68
10 changed files with 285 additions and 19 deletions

View File

@@ -110,19 +110,19 @@ async function main() {
return antwort;
};
const datei = async (filename: string, data: string) => {
if (!laden) throw new Error("Speichern als Datei geht in dieser Ansicht nicht.");
try {
await laden.save({ filename, data });
return "Datei gesichert.";
} catch (e) {
if ((e as { code?: string }).code === "declined") return "Abgebrochen.";
throw e;
}
};
(globalThis as { betriebTestversion?: unknown }).betriebTestversion = {
async sichern() {
if (!laden) throw new Error("Speichern als Datei geht in dieser Ansicht nicht.");
const datei = JSON.stringify(await exportiere(), null, 1);
const tag = new Date().toISOString().slice(0, 10);
try {
await laden.save({ filename: `betrieb-${tag}.json`, data: datei });
return "Datei gesichert.";
} catch (e) {
if ((e as { code?: string }).code === "declined") return "Abgebrochen.";
throw e;
}
},
sichern: async () => datei(`betrieb-${new Date().toISOString().slice(0, 10)}.json`, JSON.stringify(await exportiere(), null, 1)),
datei,
};
melde(speicher ? "Gespeichert" : "Nur ansehen: Änderungen werden hier nicht gespeichert.", speicher ? "ok" : "fehler");