Erlernter Beruf und zustaendige HR im Report
All checks were successful
CI / Lint, Typen, Tests, Build (push) Successful in 11m57s
CI / Migrationen auf leerer Datenbank (push) Successful in 10m15s

- 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:
2026-10-08 11:21:11 +02:00
parent 0e9d2f2296
commit e77eaf7fba
18 changed files with 314 additions and 6 deletions

View File

@@ -60,6 +60,7 @@ export function DatenAendernPanel({
const svNummerOk =
!svNummer.trim() || !requiresAustrianSvnr(locationCountry) || isValidSvnr(svNummer, birthDate || null);
const [nationality, setNationality] = useState(employee.nationality);
const [erlernterBeruf, setErlernterBeruf] = useState(employee.erlernter_beruf ?? "");
const [hatTitel, setHatTitel] = useState(employee.hat_aufenthaltstitel ?? false);
const [titelBis, setTitelBis] = useState(employee.aufenthaltstitel_bis ?? "");
// Die Staatsbürgerschaft entscheidet, ob die Frage überhaupt gestellt wird.
@@ -166,6 +167,7 @@ export function DatenAendernPanel({
birth_date: birthDate,
sv_nummer: svNummer,
nationality,
erlernter_beruf: erlernterBeruf.trim(),
// Wechselt die Staatsbürgerschaft in den Freizügigkeitsraum, fällt
// der Titel weg — sonst bliebe er als Rest an einer Person hängen,
// die ihn nicht mehr braucht. Die Datenbank prüft diese Kopplung
@@ -327,6 +329,7 @@ export function DatenAendernPanel({
)}
</>
)}
<TextField label="Erlernter Beruf" dense value={erlernterBeruf} onChange={setErlernterBeruf} />
<TextField label="Adresse (Straße und Hausnummer)" dense value={address} onChange={setAddress} />
<div className="grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-3">
<TextField label="Postleitzahl" dense inputMode="numeric" value={postalCode} onChange={setPostalCode} />

View File

@@ -50,6 +50,7 @@ export function StammdatenTab({ employee, location, dependents }: { employee: Em
],
] as [string, string][])
: []),
["Erlernter Beruf", employee.erlernter_beruf ?? "–"],
["Adresse", employee.address ?? "–"],
["Postleitzahl", employee.postal_code ?? "–"],
["Ort", employee.city ?? "–"],

View File

@@ -155,6 +155,7 @@ export function HireWizard({ open, onClose, openPositions, locations, resumeDraf
company_email: draft.companyEmail.trim() || undefined,
cornerstone_id: draft.cornerstoneId.trim() || undefined,
zustaendige_hr_id: draft.zustaendigeHrId || undefined,
erlernter_beruf: draft.erlernterBeruf.trim() || undefined,
phone: draft.phone || undefined,
position_id: draft.positionId,
location_id: draft.locationId,

View File

@@ -128,6 +128,7 @@ export function RehireWizard({ open, onClose, employee, openPositions, locations
company_email: draft.companyEmail.trim(),
cornerstone_id: draft.cornerstoneId.trim(),
zustaendige_hr_id: draft.zustaendigeHrId,
erlernter_beruf: draft.erlernterBeruf.trim(),
phone: draft.phone.trim(),
location_id: draft.locationId,
// Anschrift, Staatsbürgerschaft und Aufenthaltstitel stehen bewusst

View File

@@ -64,6 +64,12 @@ export function StepPerson({ draft, update, locations, onNummerBefund, nummerGes
locationCountry={locations.find((l) => l.id === draft.locationId)?.country}
birthDate={draft.birthDate || null}
/>
<TextField
label="Erlernter Beruf"
value={draft.erlernterBeruf}
onChange={(erlernterBeruf) => update({ erlernterBeruf })}
hint="Freiwillig. Der gelernte Beruf, nicht die Tätigkeit der Planstelle."
/>
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
{/* Die private Adresse, nicht die Firmenadresse — die entsteht erst
mit dem Eintritt. Freiwillig: wer keine hat oder keine angeben

View File

@@ -33,6 +33,7 @@ export function StepSummary({ draft, selectedPosition, locations }: StepSummaryP
["Geschlecht", draft.gender === "m" ? "männlich" : "weiblich"],
["Geburtsdatum", fmtDate(draft.birthDate)],
["SV-Nummer", draft.svNummer || "–"],
["Erlernter Beruf", draft.erlernterBeruf.trim() || "–"],
["E-Mail (privat)", draft.email || "–"],
["Telefon", draft.phone || "–"],
["Notfallkontakt", notfall || "–"],

View File

@@ -40,6 +40,8 @@ export type HireDraftData = {
cornerstoneId: string;
/** profiles.id der zuständigen Person in der Personalabteilung; "" heisst nicht zugeordnet. */
zustaendigeHrId: string;
/** Freier Text, freiwillig; "" heisst nicht erfasst. */
erlernterBeruf: string;
phone: string;
locationId: string;
positionId: string;
@@ -96,6 +98,7 @@ export const EMPTY_HIRE_DRAFT: HireDraftData = {
companyEmail: "",
cornerstoneId: "",
zustaendigeHrId: "",
erlernterBeruf: "",
phone: "",
locationId: "",
positionId: "",