Mitarbeiter:innen, Organisationsstruktur, Planstellen, Eintritt, Austritt, Versetzung, Befoerderung, Karenz, On- und Offboarding, Berichte, Massenimport und ein lueckenloser Nachweis jeder Aenderung. Next.js 16 mit React 19 und TypeScript, PostgreSQL 17 ueber Kysely, Anmeldung ueber Microsoft Entra ID. Die Fachlogik liegt in der Datenbank: rund dreissig PL/pgSQL-Funktionen fuehren eine Aenderung, ihren Historieneintrag und ihren Protokolleintrag in einer Transaktion aus. Die Zugriffsschranke ist Row Level Security, nicht die Oberflaeche. Betrieb auf Windows Server ohne Docker: ein fertiges Paket, ein Windows-Dienst, der IIS als HTTPS-Vorschaltung und zwei geplante Aufgaben. Siehe deploy/windows/README.md.
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
// Last resort: catches errors thrown by the root layout itself, where
|
|
// (app)/error.tsx is not mounted yet. It replaces <html>, so it cannot use
|
|
// the app's fonts, Tailwind layer or shared components — hence the inline
|
|
// styles. Kept deliberately plain; anything clever here can fail too.
|
|
//
|
|
// Die Farben sind dieselben wie in app/globals.css, nur von Hand: surface,
|
|
// border, ink, ink-body, ink-muted und brand-500. Sie stehen hier doppelt,
|
|
// weil diese Seite gerade dann erscheint, wenn das Stylesheet nicht
|
|
// getragen hat — eine Variable waere hier genau das, worauf man sich nicht
|
|
// verlassen kann.
|
|
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
|
useEffect(() => {
|
|
console.error("Global error:", error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html lang="de-AT">
|
|
<body style={{ margin: 0, backgroundColor: "#fdf6f4", fontFamily: "system-ui, sans-serif", color: "#231f20" }}>
|
|
<div style={{ maxWidth: 480, margin: "15vh auto", padding: 24, background: "#fff", border: "1px solid #f0dbd4", borderRadius: 8 }}>
|
|
<h1 style={{ fontSize: 18, margin: "0 0 8px" }}>Die Anwendung konnte nicht geladen werden</h1>
|
|
<p style={{ fontSize: 14, lineHeight: 1.5, color: "#4b4446", margin: "0 0 16px" }}>
|
|
Es ist ein unerwarteter Fehler aufgetreten. Ihre Daten sind davon nicht betroffen.
|
|
</p>
|
|
{error.digest && (
|
|
<p style={{ fontSize: 12, fontFamily: "monospace", color: "#756c6e", margin: "0 0 16px" }}>Fehlerkennung: {error.digest}</p>
|
|
)}
|
|
<button
|
|
onClick={reset}
|
|
style={{
|
|
background: "#164194",
|
|
color: "#fff",
|
|
border: "none",
|
|
borderRadius: 4,
|
|
padding: "8px 16px",
|
|
fontSize: 14,
|
|
fontWeight: 600,
|
|
cursor: "pointer",
|
|
}}
|
|
>
|
|
Erneut versuchen
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|