Erlernter Beruf und zustaendige HR im Report
- Neues freiwilliges Textfeld "Erlernter Beruf": Hiring Wizard (Person, Zusammenfassung), Daten aendern, Stammdaten, Wiedereintritt, Export, Historie. Gespeichert getrimmt, leer heisst nicht erfasst. - Reports: Aufteilen nach "Zustaendige HR" mit Gruppe "Nicht zugeordnet" und Vorlage "Headcount nach zustaendiger HR". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
measureValue,
|
||||
MEASURE_LABELS,
|
||||
messgroesseLabel,
|
||||
REPORT_PRESETS,
|
||||
GROUP_LABELS,
|
||||
type OrgLookups,
|
||||
type ReportEmployee,
|
||||
type ReportEvent,
|
||||
@@ -98,6 +100,33 @@ describe("groupKeyFor", () => {
|
||||
expect(groupKeyFor(emp({ entry_date: "2019-06-01" }), "entry_year", lookups)).toBe("2019");
|
||||
});
|
||||
|
||||
it("gruppiert nach dem Namen der zuständigen HR", () => {
|
||||
expect(groupKeyFor(emp({ zustaendige_hr: "Test HR Eins" }), "zustaendige_hr", lookups)).toBe("Test HR Eins");
|
||||
});
|
||||
|
||||
it("fasst Personen ohne zuständige HR als eigene Gruppe zusammen", () => {
|
||||
// Wer niemandem zugeordnet ist, ist genau die Antwort, nach der man hier sucht.
|
||||
expect(groupKeyFor(emp({ zustaendige_hr: null }), "zustaendige_hr", lookups)).toBe("Nicht zugeordnet");
|
||||
expect(groupKeyFor(emp(), "zustaendige_hr", lookups)).toBe("Nicht zugeordnet");
|
||||
});
|
||||
|
||||
it("bietet die zuständige HR als Gruppierung und als Vorlage an", () => {
|
||||
expect(GROUP_LABELS.zustaendige_hr).toBe("Zuständige HR");
|
||||
expect(REPORT_PRESETS.some((p) => p.group === "zustaendige_hr")).toBe(true);
|
||||
});
|
||||
|
||||
it("zählt je zuständiger HR", () => {
|
||||
const rows = aggregateReport(
|
||||
[emp({ id: "1", zustaendige_hr: "Anna" }), emp({ id: "2", zustaendige_hr: "Anna" }), emp({ id: "3", zustaendige_hr: null })],
|
||||
"headcount",
|
||||
"zustaendige_hr",
|
||||
null,
|
||||
lookups
|
||||
);
|
||||
const anzahl = Object.fromEntries(rows.map((r) => [r.key, r.value]));
|
||||
expect(anzahl).toMatchObject({ Anna: 2, "Nicht zugeordnet": 1 });
|
||||
});
|
||||
|
||||
it("resolves the Rolle & Anstellung boolean dimensions as Ja/Nein", () => {
|
||||
const e = emp({ is_betriebsrat: true, has_dienstwagen: false, is_laterale_fuehrung: true, is_c_level: false });
|
||||
expect(groupKeyFor(e, "betriebsrat", lookups)).toBe("Ja");
|
||||
|
||||
Reference in New Issue
Block a user