Employees from outside the EU, the EEA and Switzerland need a residence permit, and HR needs to know when it expires — about eighty people in the current data, across Türkei, Serbien and Bosnien. Two columns, the same shape as the dismissal protection: a flag and a date that only means anything with it. The date is optional, because an open-ended permit has none and a mandatory field would force an invented one. The nationality coupling deliberately stays out of the database. Putting it there would mean keeping the country list in two places — SQL and lib/countries.ts, where the picker needs it anyway — so an EU accession would become a migration instead of a line in a list. Worse, correcting somebody's nationality would fail the constraint while the old permit was still attached, which is exactly the moment someone is fixing a mistake. The UI decides whether the fields appear, and clears them when the nationality moves into the free-movement area. So the list is the load-bearing part, and it is tested: 31 entries, all of them values the picker can actually produce, no duplicates, no third countries. A missing nationality reads as "no permit required" — an unanswered question is a reason to record it, not to demand papers. The permit shows on the Stammdaten tab only for the nationalities it applies to. A line reading "Aufenthaltstitel: Nein" under an Austrian citizenship would look like information rather than a question that does not arise. Filter by it and by when it expires — the question behind that being "whose permit runs out next quarter" — plus columns in the export. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
260 lines
4.7 KiB
TypeScript
260 lines
4.7 KiB
TypeScript
// The 193 UN member states, German names, sorted alphabetically. Used for
|
|
// Staatsbürgerschaft and Wohnland — both are searchable pickers over this
|
|
// same list (see components/ui/Lookup + DatenAendernPanel).
|
|
export const UN_COUNTRIES: string[] = [
|
|
"Afghanistan",
|
|
"Ägypten",
|
|
"Albanien",
|
|
"Algerien",
|
|
"Andorra",
|
|
"Angola",
|
|
"Antigua und Barbuda",
|
|
"Äquatorialguinea",
|
|
"Argentinien",
|
|
"Armenien",
|
|
"Aserbaidschan",
|
|
"Äthiopien",
|
|
"Australien",
|
|
"Bahamas",
|
|
"Bahrain",
|
|
"Bangladesch",
|
|
"Barbados",
|
|
"Belgien",
|
|
"Belize",
|
|
"Benin",
|
|
"Bhutan",
|
|
"Bolivien",
|
|
"Bosnien und Herzegowina",
|
|
"Botsuana",
|
|
"Brasilien",
|
|
"Brunei",
|
|
"Bulgarien",
|
|
"Burkina Faso",
|
|
"Burundi",
|
|
"Chile",
|
|
"China",
|
|
"Costa Rica",
|
|
"Côte d'Ivoire",
|
|
"Dänemark",
|
|
"Deutschland",
|
|
"Dominica",
|
|
"Dominikanische Republik",
|
|
"Dschibuti",
|
|
"Ecuador",
|
|
"El Salvador",
|
|
"Eritrea",
|
|
"Estland",
|
|
"Eswatini",
|
|
"Fidschi",
|
|
"Finnland",
|
|
"Frankreich",
|
|
"Gabun",
|
|
"Gambia",
|
|
"Georgien",
|
|
"Ghana",
|
|
"Grenada",
|
|
"Griechenland",
|
|
"Guatemala",
|
|
"Guinea",
|
|
"Guinea-Bissau",
|
|
"Guyana",
|
|
"Haiti",
|
|
"Honduras",
|
|
"Indien",
|
|
"Indonesien",
|
|
"Irak",
|
|
"Iran",
|
|
"Irland",
|
|
"Island",
|
|
"Israel",
|
|
"Italien",
|
|
"Jamaika",
|
|
"Japan",
|
|
"Jemen",
|
|
"Jordanien",
|
|
"Kambodscha",
|
|
"Kamerun",
|
|
"Kanada",
|
|
"Kap Verde",
|
|
"Kasachstan",
|
|
"Katar",
|
|
"Kenia",
|
|
"Kirgisistan",
|
|
"Kiribati",
|
|
"Kolumbien",
|
|
"Komoren",
|
|
"Kongo, Demokratische Republik",
|
|
"Kongo, Republik",
|
|
"Kosovo",
|
|
"Kroatien",
|
|
"Kuba",
|
|
"Kuwait",
|
|
"Laos",
|
|
"Lesotho",
|
|
"Lettland",
|
|
"Libanon",
|
|
"Liberia",
|
|
"Libyen",
|
|
"Liechtenstein",
|
|
"Litauen",
|
|
"Luxemburg",
|
|
"Madagaskar",
|
|
"Malawi",
|
|
"Malaysia",
|
|
"Malediven",
|
|
"Mali",
|
|
"Malta",
|
|
"Marokko",
|
|
"Marshallinseln",
|
|
"Mauretanien",
|
|
"Mauritius",
|
|
"Mexiko",
|
|
"Mikronesien",
|
|
"Moldau",
|
|
"Monaco",
|
|
"Mongolei",
|
|
"Montenegro",
|
|
"Mosambik",
|
|
"Myanmar",
|
|
"Namibia",
|
|
"Nauru",
|
|
"Nepal",
|
|
"Neuseeland",
|
|
"Nicaragua",
|
|
"Niederlande",
|
|
"Niger",
|
|
"Nigeria",
|
|
"Nordkorea",
|
|
"Nordmazedonien",
|
|
"Norwegen",
|
|
"Oman",
|
|
"Österreich",
|
|
"Osttimor",
|
|
"Pakistan",
|
|
"Palau",
|
|
"Panama",
|
|
"Papua-Neuguinea",
|
|
"Paraguay",
|
|
"Peru",
|
|
"Philippinen",
|
|
"Polen",
|
|
"Portugal",
|
|
"Ruanda",
|
|
"Rumänien",
|
|
"Russland",
|
|
"Salomonen",
|
|
"Sambia",
|
|
"Samoa",
|
|
"San Marino",
|
|
"São Tomé und Príncipe",
|
|
"Saudi-Arabien",
|
|
"Schweden",
|
|
"Schweiz",
|
|
"Senegal",
|
|
"Serbien",
|
|
"Seychellen",
|
|
"Sierra Leone",
|
|
"Simbabwe",
|
|
"Singapur",
|
|
"Slowakei",
|
|
"Slowenien",
|
|
"Somalia",
|
|
"Spanien",
|
|
"Sri Lanka",
|
|
"St. Kitts und Nevis",
|
|
"St. Lucia",
|
|
"St. Vincent und die Grenadinen",
|
|
"Südafrika",
|
|
"Sudan",
|
|
"Südkorea",
|
|
"Südsudan",
|
|
"Suriname",
|
|
"Syrien",
|
|
"Tadschikistan",
|
|
"Tansania",
|
|
"Thailand",
|
|
"Togo",
|
|
"Tonga",
|
|
"Trinidad und Tobago",
|
|
"Tschad",
|
|
"Tschechien",
|
|
"Tunesien",
|
|
"Türkei",
|
|
"Turkmenistan",
|
|
"Tuvalu",
|
|
"Uganda",
|
|
"Ukraine",
|
|
"Ungarn",
|
|
"Uruguay",
|
|
"Usbekistan",
|
|
"Vanuatu",
|
|
"Venezuela",
|
|
"Vereinigte Arabische Emirate",
|
|
"Vereinigte Staaten",
|
|
"Vereinigtes Königreich",
|
|
"Vietnam",
|
|
"Weißrussland",
|
|
"Zentralafrikanische Republik",
|
|
"Zypern",
|
|
].sort((a, b) => a.localeCompare(b, "de"));
|
|
|
|
// Wer keinen Aufenthaltstitel braucht.
|
|
//
|
|
// EU-27, dazu Island, Liechtenstein und Norwegen (EWR) sowie die Schweiz.
|
|
// Für diese Staatsangehörigen gilt Freizügigkeit; ein Aufenthaltstitel ist
|
|
// weder nötig noch zu erfassen. Für alle übrigen ist er es, und dann will HR
|
|
// wissen, bis wann er läuft.
|
|
//
|
|
// Die Liste steht hier und nicht in der Datenbank: eine Prüfbedingung, die
|
|
// Staatsbürgerschaft und Titel koppelt, würde bei jeder Korrektur der
|
|
// Staatsbürgerschaft zuschlagen — und Beitritte müssten als Migration
|
|
// nachgezogen werden, statt als Zeile in einer Liste.
|
|
export const FREIZUEGIGKEIT: readonly string[] = [
|
|
// EU
|
|
"Belgien",
|
|
"Bulgarien",
|
|
"Dänemark",
|
|
"Deutschland",
|
|
"Estland",
|
|
"Finnland",
|
|
"Frankreich",
|
|
"Griechenland",
|
|
"Irland",
|
|
"Italien",
|
|
"Kroatien",
|
|
"Lettland",
|
|
"Litauen",
|
|
"Luxemburg",
|
|
"Malta",
|
|
"Niederlande",
|
|
"Österreich",
|
|
"Polen",
|
|
"Portugal",
|
|
"Rumänien",
|
|
"Schweden",
|
|
"Slowakei",
|
|
"Slowenien",
|
|
"Spanien",
|
|
"Tschechien",
|
|
"Ungarn",
|
|
"Zypern",
|
|
// EWR
|
|
"Island",
|
|
"Liechtenstein",
|
|
"Norwegen",
|
|
// Bilaterale Freizügigkeit
|
|
"Schweiz",
|
|
];
|
|
|
|
/**
|
|
* Braucht jemand mit dieser Staatsbürgerschaft einen Aufenthaltstitel?
|
|
*
|
|
* Bei leerer Angabe: nein. Eine fehlende Staatsbürgerschaft ist kein Anlass,
|
|
* jemandem einen Titel abzuverlangen — sie ist ein Anlass, sie zu erfassen.
|
|
*/
|
|
export function brauchtAufenthaltstitel(nationality: string | null | undefined): boolean {
|
|
const n = nationality?.trim();
|
|
if (!n) return false;
|
|
return !FREIZUEGIGKEIT.includes(n);
|
|
}
|