FL statt VL, Stufen 1 bis 7
Die Angabe heisst ueberall "FL" (Einstellung, Wiedereintritt, Daten aendern,
Akte, Zusammenfassung, Export, Austauschdatei). Gespeichert bleibt sie in
vl, in Historie und Feldkarte als "VL"; anzeige() zeigt dort "FL".
Migration 20261201120000: chk_vl auf 1 bis 7. Bestand mit 8 wird geleert
und je Person im Protokoll vermerkt ("FL geleert"). Geplante Aenderungen
auf 8 verlieren diese Angabe in Vormerkung und Historienzeile; bleibt
nichts uebrig, entfaellt der Vorgang samt Zeile. Jeweils Protokolleintrag.
Geprueft: lint, tsc, types:check, npm test (1123), waechter; Migrationen auf
leerer Datenbank zweimal (Nichts anzuwenden), rauchtest.sql,
vertragsangaben.sql (FL 8 abgewiesen, Wiedereintritt mit FL 6); Bestand
mit FL 8, geplanter Aenderung FL 8 plus Bonus und geplanter Aenderung nur
FL 8: geleert, Bonus bleibt vorgemerkt, Vorgang entfaellt.
This commit is contained in:
@@ -14,16 +14,16 @@ describe("VertragsangabenFields", () => {
|
||||
expect(screen.getByLabelText(/Bonusregelung/)).toBeTruthy();
|
||||
});
|
||||
|
||||
it("steht bei Nein, ohne VL", () => {
|
||||
it("steht bei Nein, ohne FL", () => {
|
||||
render(<VertragsangabenFields value={LEER} onChange={() => {}} />);
|
||||
expect((screen.getByLabelText("Bonusanspruch") as HTMLSelectElement).value).toBe("nein");
|
||||
expect((screen.getByLabelText("VL") as HTMLSelectElement).value).toBe("");
|
||||
expect((screen.getByLabelText("FL") as HTMLSelectElement).value).toBe("");
|
||||
});
|
||||
|
||||
it("bietet VL 1 bis 8 und leer an", () => {
|
||||
it("bietet FL 1 bis 7 und leer an", () => {
|
||||
render(<VertragsangabenFields value={LEER} onChange={() => {}} />);
|
||||
const werte = [...(screen.getByLabelText("VL") as HTMLSelectElement).options].map((o) => o.value);
|
||||
expect(werte).toEqual(["", "1", "2", "3", "4", "5", "6", "7", "8"]);
|
||||
const werte = [...(screen.getByLabelText("FL") as HTMLSelectElement).options].map((o) => o.value);
|
||||
expect(werte).toEqual(["", "1", "2", "3", "4", "5", "6", "7"]);
|
||||
});
|
||||
|
||||
it("belegt bei Ja keine Regelung vor", () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { anzeige } from "@/lib/anzeige";
|
||||
import { KOLLEKTIVVERTRAEGE } from "@/lib/kollektivvertrag";
|
||||
import {
|
||||
BONUSREGELUNGEN,
|
||||
@@ -19,6 +20,7 @@ import {
|
||||
const migration = (datei: string) => readFileSync(join(process.cwd(), "db/migrations", datei), "utf8");
|
||||
const VERTRAG = migration("20261007100000_vl_bonus_zustaendige_hr.sql");
|
||||
const KV = migration("20261007090000_kollektivvertraege.sql");
|
||||
const FL = migration("20261201120000_fl_ohne_stufe_8.sql");
|
||||
|
||||
function werteDerBedingung(sql: string, name: string): string[] {
|
||||
const block = sql.match(new RegExp(`${name}\\s+check[\\s\\S]*?\\);`))?.[0];
|
||||
@@ -49,10 +51,18 @@ describe("Bonusregelungen", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("VL", () => {
|
||||
it("geht von 1 bis 8, wie in der Datenbank", () => {
|
||||
expect([...VL_STUFEN]).toEqual([1, 2, 3, 4, 5, 6, 7, 8]);
|
||||
expect(VERTRAG).toContain("vl is null or vl between 1 and 8");
|
||||
describe("FL", () => {
|
||||
it("geht von 1 bis 7, wie in der Datenbank", () => {
|
||||
expect([...VL_STUFEN]).toEqual([1, 2, 3, 4, 5, 6, 7]);
|
||||
expect(FL).toContain("vl is null or vl between 1 and 7");
|
||||
});
|
||||
|
||||
it("heisst in der Anzeige FL, auch als Feld der Historie", () => {
|
||||
expect(anzeige("VL")).toBe("FL");
|
||||
expect(anzeige("Geänderte Felder: VL, Bonusanspruch, wirksam ab 2026-12-01")).toBe(
|
||||
"Geänderte Felder: FL, Bonusanspruch, wirksam ab 01.12.2026"
|
||||
);
|
||||
expect(anzeige("VLB")).toBe("VLB");
|
||||
});
|
||||
|
||||
it("zeigt „–“, wenn nichts erfasst ist", () => {
|
||||
|
||||
Reference in New Issue
Block a user