Zeiterfassung mit Pausenabzug, offline am Handy, Ansicht für alle (0.9.0)
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:
@@ -10,11 +10,13 @@ import m005 from "../src/server/migrations/005_projektseite_kategorien.sql";
|
||||
import m006 from "../src/server/migrations/006_zahlungsplan_automatisch.sql";
|
||||
import m007 from "../src/server/migrations/007_anmeldung.sql";
|
||||
import m008 from "../src/server/migrations/008_personal.sql";
|
||||
import m009 from "../src/server/migrations/009_zeiterfassung.sql";
|
||||
|
||||
const MIGRATIONEN: [string, string][] = [
|
||||
["001_grundlage.sql", m001], ["002_v70_uebernahme.sql", m002], ["003_vorgangsnummer.sql", m003], ["004_besetzung.sql", m004],
|
||||
["005_projektseite_kategorien.sql", m005], ["006_zahlungsplan_automatisch.sql", m006],
|
||||
["007_anmeldung.sql", m007], ["008_personal.sql", m008],
|
||||
["009_zeiterfassung.sql", m009],
|
||||
];
|
||||
|
||||
export async function starte(db: PGlite, v70?: unknown) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { PGlite } from "@electric-sql/pglite";
|
||||
import { starte } from "./kern.js";
|
||||
import { PARSER } from "./pool.js";
|
||||
import { TABELLEN } from "../src/server/tabellen.js";
|
||||
import { NUR_SICHERUNG, TABELLEN } from "../src/server/tabellen.js";
|
||||
|
||||
type Doc = { id: string; exists: boolean; data(): Record<string, unknown> | undefined };
|
||||
type Query = { where(f: string, op: string, v: unknown): Query; orderBy(f: string): Query; limit(n: number): Query; get(): Promise<{ docs: Doc[] }> };
|
||||
@@ -62,7 +62,7 @@ async function main() {
|
||||
if (speicher) {
|
||||
melde("Deine Daten werden geladen …");
|
||||
const daten: Record<string, Record<string, unknown>[]> = {};
|
||||
for (const pfad of [...TABELLEN.map((t) => t.pfad), "benutzer"]) daten[pfad] = await nochmal(() => alle(speicher, pfad));
|
||||
for (const pfad of [...TABELLEN, ...NUR_SICHERUNG].map((t) => t.pfad).concat("benutzer")) daten[pfad] = await nochmal(() => alle(speicher, pfad));
|
||||
const e = await nochmal(() => speicher.doc("meta/einstellungen").get());
|
||||
if (Object.values(daten).some((z) => z.length) || e.exists) {
|
||||
const r = await app.verarbeite("POST", "/api/import/stand", { programm: "betrieb", einstellungen: e.data()?.daten, daten });
|
||||
|
||||
Reference in New Issue
Block a user