Commit Graph

3 Commits

Author SHA1 Message Date
9637471f29 Austrittsdatum am Status, Behinderung eigene Ebene, Mutterschutz, geplante Vorgaenge aendern
All checks were successful
CI / Lint, Typen, Tests, Build (push) Successful in 11m41s
CI / Migrationen auf leerer Datenbank (push) Successful in 10m24s
CI / Ausrollen (push) Successful in 9s
- Statuschip: bei Ausgetretenen das Austrittsdatum in Klammern (Liste und
  Akte).
- "Beguenstigt behindert" steht auf derselben Ebene wie der besondere
  Kuendigungsschutz und gilt auch ohne ihn; nennt der Personenkreis die
  Beguenstigung, ist das Kaestchen angehakt und gesperrt.
- Personenkreis "Schwangerschaft" heisst in Anzeige und Export
  "Mutterschutz"; gespeichert bleibt der Wert. lib/ohne-gendern.ts wird
  dafuer zu lib/anzeige.ts (anzeige, anzeigeAuswahl).
- Geplante Versetzung und Befoerderung lassen sich aendern: Stift in der
  Historie oeffnet Versetzen bzw. Befoerdern vorbelegt (Datum, Planstelle,
  Bezeichnung, Hay-Grade). Gespeichert wird als Abbrechen und neu Erfassen
  in einer Transaktion (geplantenVorgangErsetzen), damit dieselben
  Pruefungen gelten wie bei einer neuen; scheitert eine, bleibt die alte
  Vormerkung stehen. Ohne Migration.

Geprueft: lint, tsc, types:check, 904 Tests, Waechter
2026-10-19 14:18:38 +02:00
002472741a Bezeichnungen ohne Gendern in Oberflaeche und Exporten
All checks were successful
CI / Lint, Typen, Tests, Build (push) Successful in 12m0s
CI / Migrationen auf leerer Datenbank (push) Successful in 10m27s
CI / Ausrollen (push) Successful in 5s
Fachlich vorgegeben: nicht gendern, auch in den Exporten. Gespeichert
bleibt der Wert der Datenbank ("Angestellte:r", "Arbeiter:in",
"Praktikant:in", "Ehepartner:in", "Lebenspartner:in") - er steht in
Aufzaehlungstypen, Pruefbedingungen, der Historie und der Sicht fuer die
IT. Uebersetzt wird nur die Anzeige.

lib/ohne-gendern.ts: eine Regel ueber den Text (":innen", ":in", "e:r",
"e:n"), damit auch Texte aus der Datenbank wie "Angehoerige:r
hinzugefuegt" und Feldnamen der Historie ohne Gendern erscheinen.
Auswahllisten senden weiter den gespeicherten Wert.

Angewendet in Formularen, Historie, Protokoll, Berichten und Filtern,
Mitarbeiter- und Ereignisexport, Importvorlage; der Import nimmt beide
Schreibweisen an. Feste Texte (Menue, Liste, Notizen, Anmeldung)
direkt umformuliert.

Geprueft: lint, tsc, types:check, 885 Tests, Waechter
2026-10-19 12:24:29 +02:00
16b37244c8 Read an import file without guessing what it means
First half of the mass import: a file becomes named sheets with typed rows,
and every rule that could reject a row is stated in one place.

Nothing here touches a database. The parser turns bytes into sheets, the
schema says which columns exist, and validation reports findings — the
existing state is passed in as a parameter. That is what makes 36 tests
possible without a connection, and the rules are the part worth testing.

Three decisions where the easy choice would have been silent corruption:

  - A two-digit year is refused. "15.08.68" is 1968 as a birth date and 2068
    as a contract end, and any rule invented here creates people not yet
    born.
  - "31.02.2026" is refused. Date turns it into March 3rd without complaint.
  - An unrecognised value in a yes/no column is an error, not "no". Read the
    other way, a typo in "Betriebsrat" quietly removes someone's dismissal
    protection.

CSV is parsed rather than split. German Excel writes semicolons because the
comma is the decimal separator, so the delimiter is sniffed from the header;
a semicolon inside a quoted address would otherwise shift every following
column and import the row plausibly wrong. Quoted newlines, doubled quotes
and the byte-order mark Excel prepends are all handled — the last one makes
the first column read as "?Personalnummer", which is invisible in an editor.

Validation collects every finding instead of stopping at the first. With 800
rows that is the difference between correcting once and uploading eight
hundred times.

One rule earns its place from experience: a history event dated before the
entry it belongs to is refused here, with a row number, because the database
refuses it too — mid-insert, without one.

My own slip, caught by the type checker: `a ?? b ? c : d` does not mean what
it looks like; ?? binds tighter than the conditional.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 14:27:49 +02:00