Make the part-time arrangement a state you can report on

Last step moved the four part-time arrangements out of the absence list
and recorded the reason in the history text. That answered "what
happened" but not "who is in one right now", and the profile showed
nothing at all. So it becomes a real field: teilzeit_art, with an
optional end date.

The objection I raised then still holds — a state goes stale, because
nobody goes back to note when a Bildungsteilzeit ended. teilzeit_bis is
the answer to it: with an end date a report decides for itself what is
still running instead of trusting that someone maintained the row. Left
empty it means "open end", which is an honest thing to say.

It runs through the ordinary change machinery rather than beside it. It
sits in app_feld_karte, so it shows up in the history as a field with
before and after, and can be corrected there like any other. The
description suffix from last step is gone — writing the same thing twice
is how two versions start disagreeing.

Reporting: filter by variant, by "in one at all", and by when it ends;
group headcount by variant, where the absence of one reads "Keine"
rather than a dash, because in a report that is an answer and not a gap.
Plus columns in the export and the import.

One gap found while rehearsing, and only because the probe happened to
pick a return date in the future: a scheduled return carries its payload
through pending_org_changes, and that payload did not include the
variant. Someone would have come back on reduced hours in April with the
reason gone. The daily run now carries it too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-14 13:07:41 +02:00
parent e6554e7982
commit f5ace8af2e
14 changed files with 595 additions and 12 deletions

View File

@@ -59,6 +59,8 @@ function mitarbeiter(teil: Partial<EmployeeRow> = {}): EmployeeRow {
dienstwagen_art: null,
has_kuendigungsschutz: false,
kuendigungsschutz_bis: null,
teilzeit_art: null,
teilzeit_bis: null,
is_laterale_fuehrung: false,
is_c_level: false,
title_prefix: [],

View File

@@ -52,6 +52,8 @@ function mitarbeiter(teil: Partial<EmployeeRow> = {}): EmployeeRow {
dienstwagen_art: null,
has_kuendigungsschutz: false,
kuendigungsschutz_bis: null,
teilzeit_art: null,
teilzeit_bis: null,
is_laterale_fuehrung: false,
is_c_level: false,
title_prefix: [],
@@ -123,3 +125,23 @@ describe("VertragTab — Kündigungsschutz", () => {
expect(wertZu("Besonderer Kündigungsschutz")).toBe("Nein");
});
});
// Die Teilzeitvarianten sind keine Abwesenheiten, sondern ein Zustand mit
// weniger Stunden. Damit darüber berichtet werden kann, steht die Variante an
// der Person — und dann muss sie auch am Profil zu sehen sein.
describe("VertragTab — Teilzeitvariante", () => {
it("nennt Variante und Ende", () => {
render(<VertragTab employee={mitarbeiter({ teilzeit_art: "Bildungsteilzeit", teilzeit_bis: "2027-06-30" })} />);
expect(wertZu("Teilzeitvariante")).toBe("Bildungsteilzeit bis 30.06.2027");
});
it("sagt es auch, wenn das Ende offen ist", () => {
render(<VertragTab employee={mitarbeiter({ teilzeit_art: "Elternteilzeit", teilzeit_bis: null })} />);
expect(wertZu("Teilzeitvariante")).toBe("Elternteilzeit (Ende offen)");
});
it("bleibt leer, wo keine besteht", () => {
render(<VertragTab employee={mitarbeiter()} />);
expect(wertZu("Teilzeitvariante")).toBe("–");
});
});