Honestly und LOLYO: Personalnummer als Kennung, LOLYO-Passwort Geburtsdatum
Fachlich vorgegeben: - Honestly: ImportId ist die Personalnummer, ReportsToId die der Fuehrungskraft. - LOLYO: Benutzername ist die Personalnummer, Passwort das Geburtsdatum als TT.MM.JJJJ. LOLYO_STARTPASSWORT ist das Ersatzpasswort fuer Personen ohne Geburtsdatum; fehlt es und hat jemand in der Auswahl kein Geburtsdatum, lehnt der Export mit der Anzahl ab, statt Konten ohne Passwort anzulegen. README, .env.example, app.env.vorlage beschreiben die neue Bedeutung. Geprueft: lint, tsc, 1031 Tests, Waechter.
This commit is contained in:
@@ -21,12 +21,12 @@ import { buildOrgMaps, orgKette, type OrgUnit } from "@/lib/org";
|
||||
// CSV-Liste), in ihrer Reihenfolge.
|
||||
const VORGABE = "Benutzername;E-Mail;Passwort;Titel;Vorname;Nachname;Position;Gruppen;Telefon;Anrede";
|
||||
|
||||
const UUID = "8f2b1c40-9d3e-4a77-b2c1-5e6f70a81234";
|
||||
const STARTWERT = "test-startwert";
|
||||
|
||||
function person(teil: Partial<LolyoQuelle> = {}): LolyoQuelle {
|
||||
return {
|
||||
id: UUID,
|
||||
personnel_number: 4711,
|
||||
birth_date: "1990-05-12",
|
||||
company_email: "max.beispiel@firma.example",
|
||||
title_prefix: ["Mag."],
|
||||
title_suffix: ["MBA"],
|
||||
@@ -70,8 +70,8 @@ describe("Spalten", () => {
|
||||
});
|
||||
|
||||
describe("Die Zuordnung", () => {
|
||||
it("nimmt als Benutzername die Alpenwerk-UUID", () => {
|
||||
expect(zeile().Benutzername).toBe(UUID);
|
||||
it("nimmt als Benutzername die Personalnummer", () => {
|
||||
expect(zeile().Benutzername).toBe("4711");
|
||||
});
|
||||
|
||||
it("nimmt die Firmenadresse und nie die private", () => {
|
||||
@@ -81,8 +81,12 @@ describe("Die Zuordnung", () => {
|
||||
expect(zeile({ company_email: null })["E-Mail"]).toBe("");
|
||||
});
|
||||
|
||||
it("trägt das Passwort ein, das die Route hereinreicht", () => {
|
||||
expect(zeile().Passwort).toBe(STARTWERT);
|
||||
it("nimmt als Passwort das Geburtsdatum als TT.MM.JJJJ", () => {
|
||||
expect(zeile().Passwort).toBe("12.05.1990");
|
||||
});
|
||||
|
||||
it("nimmt ohne Geburtsdatum das Ersatzpasswort, das die Route hereinreicht", () => {
|
||||
expect(zeile({ birth_date: null }).Passwort).toBe(STARTWERT);
|
||||
});
|
||||
|
||||
it("setzt Titel, Name und Position aus Alpenwerk", () => {
|
||||
@@ -178,7 +182,7 @@ describe("Typografische Zeichen", () => {
|
||||
it("gelten nicht für das Passwort", () => {
|
||||
// Ein ersetztes Zeichen fiele niemandem auf — es gäbe nur ein Konto, in
|
||||
// das niemand hineinkommt.
|
||||
expect(baueLolyoZeile(person(), "Pass–wort–2026", KETTE).Passwort).toBe("Pass–wort–2026");
|
||||
expect(baueLolyoZeile(person({ birth_date: null }), "Pass–wort–2026", KETTE).Passwort).toBe("Pass–wort–2026");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user