Aufraeumen: Audit-Filter aus dem Protokoll, Reorganisation entfernt, toter Code
- Audit-Log: die Auswahl der Aktionen kommt aus dem Protokoll selbst (distinct action) statt aus einer festen Liste, die vier tote Aktionen fuehrte und rund dreissig aktuelle nicht kannte. - "Reorganisation" nicht mehr als Ereignistyp in den Berichten (immer leer) und nicht im Import; Texte in Organigramm, Nachtlauf (nachtlauf.ps1) und Kommentaren ohne Reorg. Import kennt "Uebernahme", nicht mehr "Gehaltsanpassung". - adjust_karenz_return entfernt (Migration): sie setzte nur die Spalte und liess die vorgemerkte Rueckkehr stehen; rueckkehr_anpassen ist der Weg. lib/acting-manager.ts entfernt (die Berichtslinie rechnet om_reporting_lines in der Datenbank). - Export Mitarbeiter: "Auf wessen Wunsch" mit "Wunsch Dienstnehmer/ Dienstgeber" wie in der Oberflaeche. Geprueft: lint, tsc, types:check, Tests, Uebergabe-Waechter
This commit is contained in:
@@ -4,32 +4,15 @@ import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
import { FILTER_SELECT_CLASS } from "@/components/ui/Field";
|
||||
import { SearchInput } from "@/components/ui/SearchInput";
|
||||
import { anzeige } from "@/lib/anzeige";
|
||||
|
||||
// The value is the string stored in audit_log.action and must not change;
|
||||
// only what the user reads does — 'Karenz' is displayed as
|
||||
// "Langzeitabwesenheit" (see lib/absence.ts).
|
||||
const ACTIONS: { value: string; label: string }[] = [
|
||||
{ value: "Neueinstellung", label: "Neueinstellung" },
|
||||
{ value: "Wiedereinstellung", label: "Wiedereinstellung" },
|
||||
{ value: "Rückkehr", label: "Rückkehr aus Langzeitabwesenheit" },
|
||||
{ value: "Austritt", label: "Austritt" },
|
||||
{ value: "Versetzung", label: "Versetzung" },
|
||||
{ value: "Ausschreibung", label: "Ausschreibung" },
|
||||
{ value: "Interne Besetzung", label: "Interne Besetzung" },
|
||||
{ value: "Beförderung", label: "Beförderung" },
|
||||
{ value: "Reorganisation", label: "Reorganisation" },
|
||||
{ value: "Reorganisation rückgängig", label: "Reorganisation rückgängig" },
|
||||
{ value: "Karenz", label: "Langzeitabwesenheit" },
|
||||
{ value: "Vertragsänderung", label: "Vertragsänderung" },
|
||||
{ value: "Stammdatenänderung", label: "Stammdatenänderung" },
|
||||
// „Gehaltsanpassung" steht nicht zur Auswahl: das Gehalt gehört nicht zum
|
||||
// Funktionsumfang (es wird in Loga geführt), keine Funktion schreibt diese
|
||||
// Art, und ein Filter, der immer leer ausgeht, sieht aus wie ein Fehler.
|
||||
// Der Wert bleibt im Aufzählungstyp, damit vorhandene Einträge dieser Art
|
||||
// lesbar bleiben.
|
||||
];
|
||||
|
||||
export function AuditFilters() {
|
||||
// Der Wert ist der in audit_log.action gespeicherte Text und bleibt; nur die
|
||||
// Anzeige weicht ab, wo die fachliche Bezeichnung eine andere ist.
|
||||
const BESCHRIFTUNG: Record<string, string> = {
|
||||
Karenz: "Langzeitabwesenheit",
|
||||
Rückkehr: "Rückkehr aus Langzeitabwesenheit",
|
||||
};
|
||||
export function AuditFilters({ aktionen }: { aktionen: string[] }) {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
@@ -66,9 +49,9 @@ export function AuditFilters() {
|
||||
className={FILTER_SELECT_CLASS}
|
||||
>
|
||||
<option value="">Alle Aktionen</option>
|
||||
{ACTIONS.map((a) => (
|
||||
<option key={a.value} value={a.value}>
|
||||
{a.label}
|
||||
{aktionen.map((a) => (
|
||||
<option key={a} value={a}>
|
||||
{BESCHRIFTUNG[a] ?? anzeige(a)}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
|
||||
@@ -84,7 +84,7 @@ export function AsOfPicker({ asOf, today, projectedCount, historyStartsAt }: AsO
|
||||
{isFuture && (
|
||||
<p className="mt-2 rounded bg-info-bg px-3 py-2 text-xs text-info-text">
|
||||
Vorschau: {projectedCount > 0
|
||||
? `${projectedCount} geplante Versetzung(en)/Reorganisation(en) sind eingerechnet.`
|
||||
? `${projectedCount} geplante Versetzung(en) oder Beförderung(en) sind eingerechnet.`
|
||||
: "Für diesen Zeitraum sind keine Versetzungen vorgemerkt."}{" "}
|
||||
Ein-/Austritte und Karenzen sind berücksichtigt.
|
||||
</p>
|
||||
|
||||
@@ -50,7 +50,7 @@ export function EmployeeTree({ employees, focusId = null }: { employees: OrgEmpl
|
||||
for (const list of byManager.values()) list.sort((a, b) => a.last_name.localeCompare(b.last_name));
|
||||
|
||||
// Nothing in the schema forbids a manager_id cycle (A reports to B
|
||||
// reports to A), and a reorg that moves a lead under one of their own
|
||||
// reports to A), and a transfer that moves a lead under one of their own
|
||||
// reports would create one. Every walk below is recursive, so an
|
||||
// unguarded cycle is an infinite recursion that hangs the tab rather
|
||||
// than a wrong number — hence the on-path set.
|
||||
|
||||
@@ -20,8 +20,8 @@ type LookupProps<T> = {
|
||||
"aria-invalid"?: true;
|
||||
};
|
||||
|
||||
// Generic async search-select used by the position lookup (hire wizard),
|
||||
// manager/superior lookup (create position), and the reorg workbench.
|
||||
// Generic async search-select used by the Planstelle, Einheit and
|
||||
// Kostenstelle pickers (components/positions).
|
||||
//
|
||||
// Implements the combobox contract rather than just looking like one:
|
||||
// without it a keyboard user could type but never reach a result, and a
|
||||
|
||||
Reference in New Issue
Block a user