Revert "Akte, Reiter Organisation: Stellenverlauf"
This reverts commit a6a360f770.
This commit is contained in:
@@ -7,7 +7,6 @@ import { Avatar } from "@/components/ui/Avatar";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { StatusChip } from "@/components/ui/StatusChip";
|
||||
import { abwesenheitsplan } from "@/lib/abwesenheitsplan";
|
||||
import type { StellenAbschnitt } from "@/lib/stellenverlauf";
|
||||
import { rueckkehrNachListe, type Checkliste } from "@/lib/checklist";
|
||||
import { fmtFullName, tenure } from "@/lib/format";
|
||||
import { fortschritt as fortschrittOffboarding, gehoertOffboarding } from "@/lib/offboarding";
|
||||
@@ -46,8 +45,6 @@ type EmployeeDetailProps = {
|
||||
breadcrumb: string;
|
||||
/** Die Kostenstelle der laufenden Planstellenbesetzung. */
|
||||
kostenstelle: { code: string; name: string } | null;
|
||||
/** Alle Besetzungen der Person, jüngste zuerst (lib/stellenverlauf.ts). */
|
||||
stellenverlauf: StellenAbschnitt[];
|
||||
/** Die Onboarding-Checklisten, jüngste zuerst; leer heisst: es gibt keine. */
|
||||
onboarding: Checkliste[];
|
||||
/** Die Offboarding-Checklisten, jüngste zuerst; leer heisst: es gibt keine. */
|
||||
@@ -74,7 +71,7 @@ const ALLE_TABS = ["Stammdaten", "Vertrag", "Organisation", "Onboarding", "Offbo
|
||||
type Tab = (typeof ALLE_TABS)[number];
|
||||
|
||||
export function EmployeeDetail(props: EmployeeDetailProps) {
|
||||
const { employee, placement, breadcrumb, kostenstelle, stellenverlauf, onboarding, offboarding, manager, formalManager, directReports, history, dependents, notes, locations, openPositions, today } = props;
|
||||
const { employee, placement, breadcrumb, kostenstelle, onboarding, offboarding, manager, formalManager, directReports, history, dependents, notes, locations, openPositions, today } = props;
|
||||
// Wer aus „Anstehend" kommt, will den Vorgang sehen und nicht die
|
||||
// Stammdaten — die Übersicht verlinkt deshalb mit ?tab=. Unbekanntes führt
|
||||
// auf die Stammdaten.
|
||||
@@ -250,7 +247,6 @@ export function EmployeeDetail(props: EmployeeDetailProps) {
|
||||
directReports={directReports}
|
||||
breadcrumb={breadcrumb}
|
||||
kostenstelle={kostenstelle}
|
||||
stellenverlauf={stellenverlauf}
|
||||
/>
|
||||
)}
|
||||
{tab === "Onboarding" && (
|
||||
|
||||
@@ -2,8 +2,7 @@ import { Network } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { Avatar } from "@/components/ui/Avatar";
|
||||
import { LINK_BUTTON_CLASS } from "@/components/ui/Button";
|
||||
import { fmtDate, fmtName } from "@/lib/format";
|
||||
import type { StellenAbschnitt } from "@/lib/stellenverlauf";
|
||||
import { fmtName } from "@/lib/format";
|
||||
|
||||
type MiniEmployee = { id: string; first_name: string; last_name: string; job_title: string; status?: string };
|
||||
|
||||
@@ -20,8 +19,6 @@ type OrganisationTabProps = {
|
||||
* hat die Person keine laufende Besetzung (geplanter Eintritt, Austritt).
|
||||
*/
|
||||
kostenstelle: { code: string; name: string } | null;
|
||||
/** Alle Besetzungen, jüngste zuerst. */
|
||||
stellenverlauf: StellenAbschnitt[];
|
||||
};
|
||||
|
||||
// Die Niederlassung steht fachlich bewusst nicht hier neben Einheit und
|
||||
@@ -34,7 +31,6 @@ export function OrganisationTab({
|
||||
directReports,
|
||||
breadcrumb,
|
||||
kostenstelle,
|
||||
stellenverlauf,
|
||||
}: OrganisationTabProps) {
|
||||
return (
|
||||
<div className="flex flex-col gap-6">
|
||||
@@ -108,49 +104,6 @@ export function OrganisationTab({
|
||||
<p className="text-sm text-ink-muted">Keine direkten Berichte.</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 className="mb-2 text-xs font-semibold uppercase tracking-wide text-ink-muted">Stellenverlauf</h3>
|
||||
{stellenverlauf.length > 0 ? (
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="border-b border-border text-left text-[11px] font-bold uppercase tracking-wider text-ink-muted">
|
||||
<th className="py-2 pr-4">Von</th>
|
||||
<th className="py-2 pr-4">Bis</th>
|
||||
<th className="py-2 pr-4">Planstelle</th>
|
||||
<th className="py-2 pr-4">Organisationseinheit</th>
|
||||
<th className="py-2 pr-4">Kostenstelle</th>
|
||||
<th className="py-2">Anlass</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{stellenverlauf.map((s) => (
|
||||
<tr key={`${s.von}-${s.planstelle}`} className={`border-b border-border-subtle align-top ${s.laufend ? "font-semibold text-ink" : "text-ink-body"}`}>
|
||||
<td className="whitespace-nowrap py-2 pr-4 tabular-nums">{fmtDate(s.von)}</td>
|
||||
<td className="whitespace-nowrap py-2 pr-4 tabular-nums">{s.bis ? fmtDate(s.bis) : "–"}</td>
|
||||
<td className="py-2 pr-4">
|
||||
<span className="tabular-nums">{s.planstelle}</span>
|
||||
<span className="font-normal text-ink-muted"> · {s.taetigkeit}</span>
|
||||
{s.leitung && <span className="font-normal text-ink-muted"> (Leitung)</span>}
|
||||
</td>
|
||||
<td className="py-2 pr-4">{s.einheit ?? "–"}</td>
|
||||
<td className="py-2 pr-4 tabular-nums" title={s.kostenstelle?.name}>
|
||||
{s.kostenstelle ? s.kostenstelle.code : "–"}
|
||||
</td>
|
||||
<td className="py-2 font-normal">{s.anlass ?? "–"}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
{/* Bis ist der letzte Tag auf der Stelle; der nächste Abschnitt
|
||||
beginnt am Tag danach. Fett steht die Besetzung zum Stichtag
|
||||
der Akte. */}
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-ink-muted">Keine Planstellenbesetzung erfasst.</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user